找 CreateDecompressor
IDA 搜 Decompressing this format (%d) is not supported on this platform.
找 ArchiveStorageReader::Initialize
IDA 搜 Unable to read header from archive file: %s
LZ4 虚表定义
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
| typedef struct core_string { void *p; } core_string; typedef struct ShaderLab_SubPrograms { unsigned char _; } ShaderLab_SubPrograms; typedef struct ShaderPropertySheet { unsigned char _; } ShaderPropertySheet;
typedef int Collider2D_CompositeCapability;
typedef void *(__fastcall *LZ4D_ScalarDeletingDtor_t)( void *this_, unsigned int flags );
typedef Collider2D_CompositeCapability (__fastcall *PolygonCollider2D_GetCompositeCapability_t)( const void *this_ );
typedef bool (__fastcall *Lz4_DecompressMemory_t)( const void *this_, const void *src, unsigned __int64 *pSrcSize, void *dst, unsigned __int64 *pDstSize );
typedef bool (__fastcall *SuiteAssetStore_GetEnvReturnsFalse_t)( const core_string *name, core_string *outValue );
typedef void (__fastcall *GfxDeviceNull_SetShadersMainThread_t)( void *this_, const ShaderLab_SubPrograms *subPrograms, const ShaderPropertySheet *sheetA, const ShaderPropertySheet *sheetB );
struct Lz4Decompressor_vtbl_full { LZ4D_ScalarDeletingDtor_t dtor_scalar; PolygonCollider2D_GetCompositeCapability_t polygon_GetCompositeCapability; Lz4_DecompressMemory_t DecompressMemory; SuiteAssetStore_GetEnvReturnsFalse_t GetEnvReturnsFalse_1; GfxDeviceNull_SetShadersMainThread_t SetShadersMainThread; SuiteAssetStore_GetEnvReturnsFalse_t GetEnvReturnsFalse_2; };
struct Lz4Decompressor { const struct Lz4Decompressor_vtbl_full *vfptr; };
|
标准 LoadFromFile 流程

导出汇编 (IDA)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| #include <idc.idc>
static get_idb_dir() { auto file_full_path = get_idb_path(); auto idbdir = qdirname(file_full_path); return idbdir; }
static main() { auto cea = ScreenEA(); msg("ea = 0x08%x\n", cea);
auto addr_func_start = get_func_attr(cea, FUNCATTR_START); auto addr_func_end = get_func_attr(cea, FUNCATTR_END); if (addr_func_start != -1 && addr_func_end != -1) { if (addr_func_start >= addr_func_end) { msg("ERR: start addr <= end addr"); return; }
msg("func start: %08x\n", addr_func_start); msg("func end : %08x\n", addr_func_end);
auto filepath = sprintf("%s\\func_%08x.asm", get_idb_dir(), addr_func_start); msg("path: %s\n", filepath); auto hf = fopen(filepath, "w"); if (hf != 0) { auto f = gen_file(OFILE_LST, hf, addr_func_start, addr_func_end, 0); if (f != -1) { msg("make asm file ok.\n"); } else { msg("ERR: gen_file error.\n"); } } else { msg("ERR: fopen %s error.\n", filepath); } } else { msg("ERR: find func error.\n"); } }
|