{"type": "func", "start": 6443135472, "end": 6443135699, "name": "cocos2d::ZipUtils::ccInflateGZipFile", "pseudocode": "// \n// cocos2d::ZipUtils::ccInflateGZipFile from 0x1800a71f0 to 0x1800a72d3 (227 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x1800adb1a\n// > <???> @ 0x180148c48\n// > <???> @ 0x180148c60\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1d94\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:22:16 +0000\n// \n\n__int64 __fastcall cocos2d::ZipUtils::ccInflateGZipFile(const char *a1, unsigned __int8 **a2)\n{\n  unsigned int v3; // edi\n  __int64 v4; // r14\n  __int64 result; // rax\n  unsigned int v6; // ebx\n  unsigned int v7; // ebp\n  unsigned __int8 *v8; // rax\n  int v9; // eax\n  bool v10; // zf\n  unsigned __int8 *v11; // rax\n\n  v3 = 0;\n  v4 = gzopen(a1, \"rb\");\n  if ( !v4 )\n    return 0xFFFFFFFFLL;\n  v6 = 0x80000;\n  v7 = 0x80000;\n  v8 = (unsigned __int8 *)malloc(0x80000u);\n  *a2 = v8;\n  v9 = gzread(v4, v8, 0x80000);\n  v10 = v9 == 0;\n  if ( v9 < 0 )\n  {\nLABEL_8:\n    free(*a2);\n    result = 0xFFFFFFFFLL;\n    *a2 = nullptr;\n  }\n  else\n  {\n    while ( !v10 )\n    {\n      v3 += v9;\n      if ( v9 < v6 )\n        break;\n      v7 += 2 * v6;\n      v6 *= 2;\n      v11 = (unsigned __int8 *)realloc(*a2, v7);\n      if ( v11 )\n      {\n        *a2 = v11;\n        v9 = gzread(v4, &v11[v3], v6);\n        v10 = v9 == 0;\n        if ( v9 >= 0 )\n          continue;\n      }\n      goto LABEL_8;\n    }\n    gzclose(v4);\n    return v3;\n  }\n  return result;\n}", "assembly": "; \n; cocos2d::ZipUtils::ccInflateGZipFile from 0x1800a71f0 to 0x1800a72d3 (227 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x1800adb1a\n; > <???> @ 0x180148c48\n; > <???> @ 0x180148c60\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1d94\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:22:16 +0000\n; \nmov     [rsp+arg_10], rsi                                              ; +0x0, 0x1800a71f0\nmov     [rsp+arg_18], rdi                                              ; +0x5, 0x1800a71f5\npush    r14                                                            ; +0xa, 0x1800a71fa\nsub     rsp, 20h                                                       ; +0xc, 0x1800a71fc\nmov     rsi, rdx                                                       ; +0x10, 0x1800a7200\nxor     edi, edi                                                       ; +0x13, 0x1800a7203\nlea     rdx, aRb_0; \"rb\"                                               ; +0x15, 0x1800a7205\ncall    cs:gzopen                                                      ; +0x1c, 0x1800a720c\nmov     r14, rax                                                       ; +0x22, 0x1800a7212\ntest    rax, rax                                                       ; +0x25, 0x1800a7215\njnz     short loc_1800A7230                                            ; +0x28, 0x1800a7218\nmov     eax, 0FFFFFFFFh                                                ; +0x2a, 0x1800a721a\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x2f, 0x1800a721f\nmov     rdi, [rsp+28h+arg_18]                                          ; +0x34, 0x1800a7224\nadd     rsp, 20h                                                       ; +0x39, 0x1800a7229\npop     r14                                                            ; +0x3d, 0x1800a722d\nretn                                                                   ; +0x3f, 0x1800a722f\nmov     [rsp+28h+arg_0], rbx                                           ; +0x40, 0x1800a7230\nmov     ebx, 80000h                                                    ; +0x45, 0x1800a7235\nmov     ecx, ebx; Size                                                 ; +0x4a, 0x1800a723a\nmov     [rsp+28h+arg_8], rbp                                           ; +0x4c, 0x1800a723c\nmov     ebp, ebx                                                       ; +0x51, 0x1800a7241\ncall    cs:__imp_malloc                                                ; +0x53, 0x1800a7243\nmov     r8d, ebx                                                       ; +0x59, 0x1800a7249\nmov     rcx, r14                                                       ; +0x5c, 0x1800a724c\nmov     rdx, rax                                                       ; +0x5f, 0x1800a724f\nmov     [rsi], rax                                                     ; +0x62, 0x1800a7252\ncall    cs:gzread                                                      ; +0x65, 0x1800a7255\ntest    eax, eax                                                       ; +0x6b, 0x1800a725b\njs      short loc_1800A7296                                            ; +0x6d, 0x1800a725d\njz      short loc_1800A72C6                                            ; +0x6f, 0x1800a725f\nadd     edi, eax                                                       ; +0x71, 0x1800a7261\ncmp     eax, ebx                                                       ; +0x73, 0x1800a7263\njb      short loc_1800A72C6                                            ; +0x75, 0x1800a7265\nmov     rcx, [rsi]; Block                                              ; +0x77, 0x1800a7267\nlea     eax, [rbx+rbx]                                                 ; +0x7a, 0x1800a726a\nadd     ebp, eax                                                       ; +0x7d, 0x1800a726d\nmov     ebx, eax                                                       ; +0x7f, 0x1800a726f\nmov     edx, ebp; Size                                                 ; +0x81, 0x1800a7271\ncall    cs:realloc                                                     ; +0x83, 0x1800a7273\ntest    rax, rax                                                       ; +0x89, 0x1800a7279\njz      short loc_1800A7296                                            ; +0x8c, 0x1800a727c\nmov     edx, edi                                                       ; +0x8e, 0x1800a727e\nmov     r8d, ebx                                                       ; +0x90, 0x1800a7280\nadd     rdx, rax                                                       ; +0x93, 0x1800a7283\nmov     [rsi], rax                                                     ; +0x96, 0x1800a7286\nmov     rcx, r14                                                       ; +0x99, 0x1800a7289\ncall    cs:gzread                                                      ; +0x9c, 0x1800a728c\ntest    eax, eax                                                       ; +0xa2, 0x1800a7292\njns     short loc_1800A725F                                            ; +0xa4, 0x1800a7294\nmov     rcx, [rsi]; Block                                              ; +0xa6, 0x1800a7296\ncall    cs:__imp_free                                                  ; +0xa9, 0x1800a7299\nmov     eax, 0FFFFFFFFh                                                ; +0xaf, 0x1800a729f\nmov     qword ptr [rsi], 0                                             ; +0xb4, 0x1800a72a4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xbb, 0x1800a72ab\nmov     rbp, [rsp+28h+arg_8]                                           ; +0xc0, 0x1800a72b0\nmov     rsi, [rsp+28h+arg_10]                                          ; +0xc5, 0x1800a72b5\nmov     rdi, [rsp+28h+arg_18]                                          ; +0xca, 0x1800a72ba\nadd     rsp, 20h                                                       ; +0xcf, 0x1800a72bf\npop     r14                                                            ; +0xd3, 0x1800a72c3\nretn                                                                   ; +0xd5, 0x1800a72c5\nmov     rcx, r14                                                       ; +0xd6, 0x1800a72c6\ncall    cs:gzclose                                                     ; +0xd9, 0x1800a72c9\nmov     eax, edi                                                       ; +0xdf, 0x1800a72cf\njmp     short loc_1800A72AB                                            ; +0xe1, 0x1800a72d1", "xrefs": ["cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x1800adb1a", "<???> @ 0x180148c48", "<???> @ 0x180148c60", "<???> @ 0x18014cf68", "<???> @ 0x1801c1d94"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}