{"type": "func", "start": 6443111632, "end": 6443112283, "name": "cocos2d::unzOpenCurrentFile3", "pseudocode": "// \n// cocos2d::unzOpenCurrentFile3 from 0x1800a14d0 to 0x1800a175b (651 bytes)\n// \n// 7 xrefs:\n// > cocos2d::unzOpenCurrentFile2 @ 0x1800a14bd\n// > cocos2d::unzOpenCurrentFile @ 0x1800a1775\n// > <???> @ 0x18013f438\n// > <???> @ 0x18013f474\n// > <???> @ 0x18013f484\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b78d8\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall cocos2d::unzOpenCurrentFile3(cocos2d *this, _DWORD *a2, int *a3, int *a4, __int64 a5)\n{\n  int v5; // ebp\n  char *v10; // rbx\n  void *v11; // rax\n  _DWORD *v12; // rcx\n  int v13; // eax\n  __int128 v14; // xmm0\n  __int128 v15; // xmm1\n  int v16; // edx\n  __int64 v17; // rax\n  __int128 v18; // xmm0\n  __int128 v19; // xmm1\n  __int128 v20; // xmm0\n  __int64 v21; // rcx\n  __int64 v22; // rcx\n  unsigned int v23; // esi\n  unsigned int v24; // [rsp+20h] [rbp-28h] BYREF\n  _QWORD v25[4]; // [rsp+28h] [rbp-20h] BYREF\n\n  v5 = (int)a4;\n  if ( a5 || !this || !*((_QWORD *)this + 18) )\n    return 4294967194LL;\n  if ( *((_QWORD *)this + 34) )\n    cocos2d::unzCloseCurrentFile(this, a2);\n  if ( (unsigned int)sub_18009FA30((__int64)this, &v24, v25, (unsigned int *)&a5) )\n    return 4294967193LL;\n  v10 = (char *)malloc(0x120u);\n  if ( !v10 )\n    return 4294967192LL;\n  v11 = malloc(0x4000u);\n  *((_QWORD *)v10 + 14) = v25[0];\n  *((_DWORD *)v10 + 30) = a5;\n  *(_QWORD *)v10 = v11;\n  *((_QWORD *)v10 + 16) = 0;\n  *((_DWORD *)v10 + 70) = v5;\n  if ( v11 )\n  {\n    *((_DWORD *)v10 + 26) = 0;\n    v12 = (_DWORD *)((char *)this + 188);\n    if ( a2 )\n      *a2 = *v12;\n    if ( a3 )\n    {\n      *a3 = 6;\n      v13 = *((_DWORD *)this + 46) & 6;\n      switch ( v13 )\n      {\n        case 2:\n          *a3 = 9;\n          break;\n        case 4:\n          *a3 = 2;\n          break;\n        case 6:\n          *a3 = 1;\n          v12 = (_DWORD *)((char *)this + 188);\n          break;\n      }\n    }\n    v14 = *(_OWORD *)this;\n    v15 = *((_OWORD *)this + 1);\n    v16 = *v12;\n    *((_DWORD *)v10 + 37) = *((_DWORD *)this + 49);\n    *((_QWORD *)v10 + 32) = *((_QWORD *)this + 12);\n    v17 = *((_QWORD *)this + 15);\n    *((_DWORD *)v10 + 36) = 0;\n    *((_QWORD *)v10 + 17) = 0;\n    *((_DWORD *)v10 + 66) = v16;\n    *((_QWORD *)v10 + 34) = v17;\n    *((_DWORD *)v10 + 9) = 0;\n    *(_OWORD *)(v10 + 168) = v14;\n    v18 = *((_OWORD *)this + 2);\n    *(_OWORD *)(v10 + 184) = v15;\n    v19 = *((_OWORD *)this + 3);\n    *(_OWORD *)(v10 + 200) = v18;\n    v20 = *((_OWORD *)this + 4);\n    *(_OWORD *)(v10 + 216) = v19;\n    *(_QWORD *)&v19 = *((_QWORD *)this + 10);\n    *(_OWORD *)(v10 + 232) = v20;\n    *((_QWORD *)v10 + 31) = v19;\n    if ( v16 == 12 )\n    {\n      if ( !v5 )\n        *((_DWORD *)v10 + 70) = 1;\n    }\n    else if ( v16 == 8 && !v5 )\n    {\n      *((_QWORD *)v10 + 7) = 0;\n      *((_QWORD *)v10 + 1) = 0;\n      *((_QWORD *)v10 + 8) = 0;\n      *((_QWORD *)v10 + 9) = 0;\n      *((_DWORD *)v10 + 4) = 0;\n      v23 = inflateInit2_(v10 + 8, 4294967281LL, \"1.3.0\", 88);\n      if ( v23 )\n      {\n        free(v10);\n        return v23;\n      }\n      *((_DWORD *)v10 + 26) = 8;\n    }\n    v21 = v24;\n    *((_QWORD *)v10 + 19) = *((_QWORD *)this + 25);\n    v22 = *((_QWORD *)this + 33) + v21 + 30;\n    *((_QWORD *)v10 + 20) = *((_QWORD *)this + 26);\n    *((_QWORD *)v10 + 12) = v22;\n    *((_DWORD *)v10 + 4) = 0;\n    *((_QWORD *)this + 34) = v10;\n    *((_DWORD *)this + 70) = 0;\n    return 0;\n  }\n  free(v10);\n  return 4294967192LL;\n}", "assembly": "; \n; cocos2d::unzOpenCurrentFile3 from 0x1800a14d0 to 0x1800a175b (651 bytes)\n; \n; 7 xrefs:\n; > cocos2d::unzOpenCurrentFile2 @ 0x1800a14bd\n; > cocos2d::unzOpenCurrentFile @ 0x1800a1775\n; > <???> @ 0x18013f438\n; > <???> @ 0x18013f474\n; > <???> @ 0x18013f484\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b78d8\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_10], rbp                                              ; +0x0, 0x1800a14d0\npush    rsi                                                            ; +0x5, 0x1800a14d5\npush    rdi                                                            ; +0x6, 0x1800a14d6\npush    r14                                                            ; +0x7, 0x1800a14d7\nsub     rsp, 30h                                                       ; +0x9, 0x1800a14d9\ncmp     [rsp+48h+arg_20], 0                                            ; +0xd, 0x1800a14dd\nmov     ebp, r9d                                                       ; +0x13, 0x1800a14e3\nmov     rsi, r8                                                        ; +0x16, 0x1800a14e6\nmov     r14, rdx                                                       ; +0x19, 0x1800a14e9\nmov     rdi, rcx                                                       ; +0x1c, 0x1800a14ec\njnz     loc_1800A1748                                                  ; +0x1f, 0x1800a14ef\ntest    rcx, rcx                                                       ; +0x25, 0x1800a14f5\njz      loc_1800A1748                                                  ; +0x28, 0x1800a14f8\ncmp     qword ptr [rcx+90h], 0                                         ; +0x2e, 0x1800a14fe\njz      loc_1800A1748                                                  ; +0x36, 0x1800a1506\ncmp     qword ptr [rcx+110h], 0                                        ; +0x3c, 0x1800a150c\njz      short loc_1800A151B                                            ; +0x44, 0x1800a1514\ncall    ?unzCloseCurrentFile@cocos2d@@YAHPEAX@Z; cocos2d::unzCloseCurrentFile(void *) ; +0x46, 0x1800a1516\nlea     r9, [rsp+48h+arg_20]                                           ; +0x4b, 0x1800a151b\nmov     rcx, rdi                                                       ; +0x50, 0x1800a1520\nlea     r8, [rsp+48h+var_20]                                           ; +0x53, 0x1800a1523\nlea     rdx, [rsp+48h+var_28]                                          ; +0x58, 0x1800a1528\ncall    sub_18009FA30                                                  ; +0x5d, 0x1800a152d\ntest    eax, eax                                                       ; +0x62, 0x1800a1532\njz      short loc_1800A1549                                            ; +0x64, 0x1800a1534\nmov     eax, 0FFFFFF99h                                                ; +0x66, 0x1800a1536\nmov     rbp, [rsp+48h+arg_10]                                          ; +0x6b, 0x1800a153b\nadd     rsp, 30h                                                       ; +0x70, 0x1800a1540\npop     r14                                                            ; +0x74, 0x1800a1544\npop     rdi                                                            ; +0x76, 0x1800a1546\npop     rsi                                                            ; +0x77, 0x1800a1547\nretn                                                                   ; +0x78, 0x1800a1548\nmov     ecx, 120h; Size                                                ; +0x79, 0x1800a1549\nmov     [rsp+48h+arg_0], rbx                                           ; +0x7e, 0x1800a154e\ncall    cs:__imp_malloc                                                ; +0x83, 0x1800a1553\nmov     rbx, rax                                                       ; +0x89, 0x1800a1559\ntest    rax, rax                                                       ; +0x8c, 0x1800a155c\njnz     short loc_1800A1566                                            ; +0x8f, 0x1800a155f\nlea     eax, [rbx-68h]                                                 ; +0x91, 0x1800a1561\njmp     short loc_1800A15B0                                            ; +0x94, 0x1800a1564\nmov     ecx, 4000h; Size                                               ; +0x96, 0x1800a1566\nmov     [rsp+48h+arg_8], r15                                           ; +0x9b, 0x1800a156b\ncall    cs:__imp_malloc                                                ; +0xa0, 0x1800a1570\nmov     rcx, [rsp+48h+var_20]                                          ; +0xa6, 0x1800a1576\nxor     r15d, r15d                                                     ; +0xab, 0x1800a157b\nmov     [rbx+70h], rcx                                                 ; +0xae, 0x1800a157e\nmov     ecx, dword ptr [rsp+48h+arg_20]                                ; +0xb2, 0x1800a1582\nmov     [rbx+78h], ecx                                                 ; +0xb6, 0x1800a1586\nmov     [rbx], rax                                                     ; +0xb9, 0x1800a1589\nmov     [rbx+80h], r15                                                 ; +0xbc, 0x1800a158c\nmov     [rbx+118h], ebp                                                ; +0xc3, 0x1800a1593\ntest    rax, rax                                                       ; +0xc9, 0x1800a1599\njnz     short loc_1800A15C3                                            ; +0xcc, 0x1800a159c\nmov     rcx, rbx; Block                                                ; +0xce, 0x1800a159e\ncall    cs:__imp_free                                                  ; +0xd1, 0x1800a15a1\nlea     eax, [r15-68h]                                                 ; +0xd7, 0x1800a15a7\nmov     r15, [rsp+48h+arg_8]                                           ; +0xdb, 0x1800a15ab\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xe0, 0x1800a15b0\nmov     rbp, [rsp+48h+arg_10]                                          ; +0xe5, 0x1800a15b5\nadd     rsp, 30h                                                       ; +0xea, 0x1800a15ba\npop     r14                                                            ; +0xee, 0x1800a15be\npop     rdi                                                            ; +0xf0, 0x1800a15c0\npop     rsi                                                            ; +0xf1, 0x1800a15c1\nretn                                                                   ; +0xf2, 0x1800a15c2\nmov     [rbx+68h], r15d                                                ; +0xf3, 0x1800a15c3\nlea     rcx, [rdi+0BCh]                                                ; +0xf7, 0x1800a15c7\ntest    r14, r14                                                       ; +0xfe, 0x1800a15ce\njz      short loc_1800A15D8                                            ; +0x101, 0x1800a15d1\nmov     eax, [rcx]                                                     ; +0x103, 0x1800a15d3\nmov     [r14], eax                                                     ; +0x105, 0x1800a15d5\ntest    rsi, rsi                                                       ; +0x108, 0x1800a15d8\njz      short loc_1800A1618                                            ; +0x10b, 0x1800a15db\nmov     dword ptr [rsi], 6                                             ; +0x10d, 0x1800a15dd\nmov     eax, [rdi+0B8h]                                                ; +0x113, 0x1800a15e3\nand     eax, 6                                                         ; +0x119, 0x1800a15e9\ncmp     eax, 2                                                         ; +0x11c, 0x1800a15ec\njz      short loc_1800A1612                                            ; +0x11f, 0x1800a15ef\ncmp     eax, 4                                                         ; +0x121, 0x1800a15f1\njz      short loc_1800A160A                                            ; +0x124, 0x1800a15f4\ncmp     eax, 6                                                         ; +0x126, 0x1800a15f6\njnz     short loc_1800A1618                                            ; +0x129, 0x1800a15f9\nmov     dword ptr [rsi], 1                                             ; +0x12b, 0x1800a15fb\nlea     rcx, [rdi+0BCh]                                                ; +0x131, 0x1800a1601\njmp     short loc_1800A1618                                            ; +0x138, 0x1800a1608\nmov     dword ptr [rsi], 2                                             ; +0x13a, 0x1800a160a\njmp     short loc_1800A1618                                            ; +0x140, 0x1800a1610\nmov     dword ptr [rsi], 9                                             ; +0x142, 0x1800a1612\nmovups  xmm0, xmmword ptr [rdi]                                        ; +0x148, 0x1800a1618\nmov     eax, [rdi+0C4h]                                                ; +0x14b, 0x1800a161b\nmovups  xmm1, xmmword ptr [rdi+10h]                                    ; +0x151, 0x1800a1621\nmov     edx, [rcx]                                                     ; +0x155, 0x1800a1625\nmov     [rbx+94h], eax                                                 ; +0x157, 0x1800a1627\nmov     rax, [rdi+60h]                                                 ; +0x15d, 0x1800a162d\nmov     [rbx+100h], rax                                                ; +0x161, 0x1800a1631\nmov     rax, [rdi+78h]                                                 ; +0x168, 0x1800a1638\nmov     [rbx+90h], r15d                                                ; +0x16c, 0x1800a163c\nmov     [rbx+88h], r15                                                 ; +0x173, 0x1800a1643\nmov     [rbx+108h], edx                                                ; +0x17a, 0x1800a164a\nmov     [rbx+110h], rax                                                ; +0x180, 0x1800a1650\nmov     [rbx+24h], r15d                                                ; +0x187, 0x1800a1657\nmovups  xmmword ptr [rbx+0A8h], xmm0                                   ; +0x18b, 0x1800a165b\nmovups  xmm0, xmmword ptr [rdi+20h]                                    ; +0x192, 0x1800a1662\nmovups  xmmword ptr [rbx+0B8h], xmm1                                   ; +0x196, 0x1800a1666\nmovups  xmm1, xmmword ptr [rdi+30h]                                    ; +0x19d, 0x1800a166d\nmovups  xmmword ptr [rbx+0C8h], xmm0                                   ; +0x1a1, 0x1800a1671\nmovups  xmm0, xmmword ptr [rdi+40h]                                    ; +0x1a8, 0x1800a1678\nmovups  xmmword ptr [rbx+0D8h], xmm1                                   ; +0x1ac, 0x1800a167c\nmovsd   xmm1, qword ptr [rdi+50h]                                      ; +0x1b3, 0x1800a1683\nmovups  xmmword ptr [rbx+0E8h], xmm0                                   ; +0x1b8, 0x1800a1688\nmovsd   qword ptr [rbx+0F8h], xmm1                                     ; +0x1bf, 0x1800a168f\ncmp     edx, 0Ch                                                       ; +0x1c7, 0x1800a1697\njnz     short loc_1800A16F2                                            ; +0x1ca, 0x1800a169a\ntest    ebp, ebp                                                       ; +0x1cc, 0x1800a169c\njnz     short loc_1800A16AA                                            ; +0x1ce, 0x1800a169e\nmov     dword ptr [rbx+118h], 1                                        ; +0x1d0, 0x1800a16a0\nmov     rax, [rdi+0C8h]                                                ; +0x1da, 0x1800a16aa\nmov     ecx, [rsp+48h+var_28]                                          ; +0x1e1, 0x1800a16b1\nmov     [rbx+98h], rax                                                 ; +0x1e5, 0x1800a16b5\nadd     rcx, 1Eh                                                       ; +0x1ec, 0x1800a16bc\nmov     rax, [rdi+0D0h]                                                ; +0x1f0, 0x1800a16c0\nadd     rcx, [rdi+108h]                                                ; +0x1f7, 0x1800a16c7\nmov     [rbx+0A0h], rax                                                ; +0x1fe, 0x1800a16ce\nxor     eax, eax                                                       ; +0x205, 0x1800a16d5\nmov     [rbx+60h], rcx                                                 ; +0x207, 0x1800a16d7\nmov     [rbx+10h], r15d                                                ; +0x20b, 0x1800a16db\nmov     [rdi+110h], rbx                                                ; +0x20f, 0x1800a16df\nmov     [rdi+118h], r15d                                               ; +0x216, 0x1800a16e6\njmp     loc_1800A15AB                                                  ; +0x21d, 0x1800a16ed\ncmp     edx, 8                                                         ; +0x222, 0x1800a16f2\njnz     short loc_1800A16AA                                            ; +0x225, 0x1800a16f5\ntest    ebp, ebp                                                       ; +0x227, 0x1800a16f7\njnz     short loc_1800A16AA                                            ; +0x229, 0x1800a16f9\nlea     rcx, [rbx+8]                                                   ; +0x22b, 0x1800a16fb\nmov     [rbx+38h], r15                                                 ; +0x22f, 0x1800a16ff\nlea     r9d, [rdx+50h]                                                 ; +0x233, 0x1800a1703\nmov     [rcx], r15                                                     ; +0x237, 0x1800a1707\nlea     edx, [rbp-0Fh]                                                 ; +0x23a, 0x1800a170a\nmov     [rbx+40h], r15                                                 ; +0x23d, 0x1800a170d\nlea     r8, a130; \"1.3.0\"                                              ; +0x241, 0x1800a1711\nmov     [rbx+48h], r15                                                 ; +0x248, 0x1800a1718\nmov     [rbx+10h], r15d                                                ; +0x24c, 0x1800a171c\ncall    cs:inflateInit2_                                               ; +0x250, 0x1800a1720\nmov     esi, eax                                                       ; +0x256, 0x1800a1726\ntest    eax, eax                                                       ; +0x258, 0x1800a1728\njnz     short loc_1800A1738                                            ; +0x25a, 0x1800a172a\nmov     dword ptr [rbx+68h], 8                                         ; +0x25c, 0x1800a172c\njmp     loc_1800A16AA                                                  ; +0x263, 0x1800a1733\nmov     rcx, rbx; Block                                                ; +0x268, 0x1800a1738\ncall    cs:__imp_free                                                  ; +0x26b, 0x1800a173b\nmov     eax, esi                                                       ; +0x271, 0x1800a1741\njmp     loc_1800A15AB                                                  ; +0x273, 0x1800a1743\nmov     rbp, [rsp+48h+arg_10]                                          ; +0x278, 0x1800a1748\nmov     eax, 0FFFFFF9Ah                                                ; +0x27d, 0x1800a174d\nadd     rsp, 30h                                                       ; +0x282, 0x1800a1752\npop     r14                                                            ; +0x286, 0x1800a1756\npop     rdi                                                            ; +0x288, 0x1800a1758\npop     rsi                                                            ; +0x289, 0x1800a1759\nretn                                                                   ; +0x28a, 0x1800a175a", "xrefs": ["cocos2d::unzOpenCurrentFile2 @ 0x1800a14bd", "cocos2d::unzOpenCurrentFile @ 0x1800a1775", "<???> @ 0x18013f438", "<???> @ 0x18013f474", "<???> @ 0x18013f484", "<???> @ 0x1801438a8", "<???> @ 0x1801b78d8"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}