Dumps the application.
(fileName, path)
| 10593 | } |
| 10594 | /** Dumps the application. */ |
| 10595 | static dump(fileName, path) { |
| 10596 | fileName = fileName ?? `${Il2Cpp.applicationIdentifier ?? "unknown"}_${Il2Cpp.applicationVersion ?? "unknown"}.cs`; |
| 10597 | const destination = `${path ?? Il2Cpp.applicationDataPath}/${fileName}`; |
| 10598 | const file = new File(destination, "w"); |
| 10599 | for (const assembly of Il2Cpp.Domain.assemblies) { |
| 10600 | (0, console_1.inform)(`dumping ${assembly.name}...`); |
| 10601 | for (const klass of assembly.image.classes) { |
| 10602 | file.write(`${klass}\n\n`); |
| 10603 | } |
| 10604 | } |
| 10605 | file.flush(); |
| 10606 | file.close(); |
| 10607 | (0, console_1.ok)(`dump saved to ${destination}`); |
| 10608 | } |
| 10609 | /** Frees memory. */ |
| 10610 | static free(pointer) { |
| 10611 | return Il2Cpp.Api._free(pointer); |