// // cocos2d::unzReadCurrentFile from 0x1800a5cd0 to 0x1800a5f88 (696 bytes) // // 6 xrefs: // > cocos2d::CCFileUtils::getFileDataFromZip @ 0x1800721d0 // > @ 0x18014875c // > @ 0x180148784 // > @ 0x180148794 // > @ 0x18014cf68 // > @ 0x1801c1c5c // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:22:15 +0000 // __int64 __fastcall cocos2d::unzReadCurrentFile(cocos2d *this, void *a2, void *a3) { unsigned int v3; // r12d __int64 v4; // rbx unsigned __int64 v6; // rax unsigned __int64 v7; // r9 __int64 v8; // rcx __int64 v9; // rdx unsigned int v10; // esi unsigned __int64 v11; // rax int v12; // eax __int64 v13; // r14 __int64 v14; // r15 int v15; // ebp unsigned int v16; // esi __int64 v17; // rcx __int64 v18; // rdi int v19; // eax __int64 v20; // rdx __int64 v21; // r8 __int64 v22; // rdx __int64 v23; // rcx int v24; // eax v3 = 0; if ( !this ) return 4294967194LL; v4 = *((_QWORD *)this + 34); if ( !v4 ) return 4294967194LL; if ( !*(_QWORD *)v4 ) return 4294967196LL; if ( (_DWORD)a3 ) { v6 = *(_QWORD *)(v4 + 160); v7 = (unsigned int)a3; *(_QWORD *)(v4 + 24) = a2; *(_DWORD *)(v4 + 32) = (_DWORD)a3; if ( (unsigned int)a3 > v6 && !*(_DWORD *)(v4 + 280) ) { *(_DWORD *)(v4 + 32) = v6; LODWORD(a3) = v6; } v8 = *(_QWORD *)(v4 + 152); v9 = *(unsigned int *)(v4 + 16); if ( v7 > v8 + v9 && *(_DWORD *)(v4 + 280) ) { LODWORD(a3) = v8 + v9; *(_DWORD *)(v4 + 32) = v8 + v9; } if ( !(_DWORD)a3 ) return v3; while ( 1 ) { v10 = *(_DWORD *)(v4 + 16); if ( !v10 ) { v11 = *(_QWORD *)(v4 + 152); if ( v11 ) { v10 = 0x4000; if ( v11 < 0x4000 ) v10 = *(_QWORD *)(v4 + 152); if ( (unsigned int)sub_1800A3520( v4 + 168, *(_QWORD *)(v4 + 256), *(_QWORD *)(v4 + 96) + *(_QWORD *)(v4 + 272)) || (*(unsigned int (__fastcall **)(_QWORD, _QWORD, _QWORD, _QWORD))(v4 + 176))( *(_QWORD *)(v4 + 224), *(_QWORD *)(v4 + 256), *(_QWORD *)v4, v10) != v10 ) { return 0xFFFFFFFFLL; } *(_QWORD *)(v4 + 96) += v10; *(_QWORD *)(v4 + 152) -= v10; *(_QWORD *)(v4 + 8) = *(_QWORD *)v4; *(_DWORD *)(v4 + 16) = v10; } } v12 = *(_DWORD *)(v4 + 264); if ( !v12 || *(_DWORD *)(v4 + 280) ) { if ( !v10 && !*(_QWORD *)(v4 + 152) ) return v3; if ( *(_DWORD *)(v4 + 32) < v10 ) v10 = *(_DWORD *)(v4 + 32); if ( v10 ) { v20 = 0; v21 = v10; do { ++v20; *(_BYTE *)(v20 + *(_QWORD *)(v4 + 24) - 1) = *(_BYTE *)(v20 + *(_QWORD *)(v4 + 8) - 1); --v21; } while ( v21 ); } v22 = *(_QWORD *)(v4 + 24); v23 = *(unsigned int *)(v4 + 144); *(_QWORD *)(v4 + 136) += v10; v24 = crc32(v23, v22, v10); *(_QWORD *)(v4 + 160) -= v10; *(_DWORD *)(v4 + 16) -= v10; *(_DWORD *)(v4 + 32) -= v10; *(_QWORD *)(v4 + 24) += v10; *(_QWORD *)(v4 + 8) += v10; *(_DWORD *)(v4 + 36) += v10; *(_DWORD *)(v4 + 144) = v24; v3 += v10; } else if ( v12 != 12 ) { v13 = *(unsigned int *)(v4 + 36); v14 = *(_QWORD *)(v4 + 24); v15 = inflate(v4 + 8, 2); if ( v15 >= 0 ) { if ( *(_QWORD *)(v4 + 40) ) v15 = -3; } v16 = *(_DWORD *)(v4 + 36); v17 = *(unsigned int *)(v4 + 144); v18 = v16 - v13; *(_QWORD *)(v4 + 136) += v18; v19 = crc32(v17, v14, (unsigned int)v18); *(_QWORD *)(v4 + 160) -= v18; v3 += v16 - v13; *(_DWORD *)(v4 + 144) = v19; if ( v15 == 1 ) return v3; if ( v15 ) return (unsigned int)v15; } if ( !*(_DWORD *)(v4 + 32) ) return v3; } } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source