{"type": "func", "start": 6443126544, "end": 6443127176, "name": "cocos2d::unzLocateFile", "pseudocode": "// \n// cocos2d::unzLocateFile from 0x1800a4f10 to 0x1800a5188 (632 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCFileUtils::getFileDataFromZip @ 0x180072173\n// > <???> @ 0x1801485c8\n// > <???> @ 0x1801485d8\n// > <???> @ 0x1801485f8\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c1b30\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:15 +0000\n// \n\n__int64 __fastcall cocos2d::unzLocateFile(cocos2d *this, char *Str2, const char *a3)\n{\n  int v3; // ebp\n  void *v6; // rdx\n  __int64 result; // rax\n  __int64 v8; // rbx\n  __int64 v9; // r14\n  __int64 v10; // r15\n  int v11; // eax\n  int v12; // eax\n  char *v13; // r10\n  char v14; // al\n  char v15; // r9\n  char v16; // r8\n  __int64 v17; // [rsp+50h] [rbp-1A8h]\n  __int128 v18; // [rsp+58h] [rbp-1A0h]\n  __int128 v19; // [rsp+68h] [rbp-190h]\n  __int128 v20; // [rsp+78h] [rbp-180h]\n  __int128 v21; // [rsp+88h] [rbp-170h]\n  __int128 v22; // [rsp+98h] [rbp-160h]\n  char Str1[272]; // [rsp+B0h] [rbp-148h] BYREF\n\n  v3 = (int)a3;\n  if ( !this || strlen(Str2) >= 0x100 )\n    return 4294967194LL;\n  if ( !*((_QWORD *)this + 18) )\n    return 4294967196LL;\n  v8 = *((_QWORD *)this + 33);\n  v18 = *((_OWORD *)this + 11);\n  v9 = *((_QWORD *)this + 16);\n  v19 = *((_OWORD *)this + 12);\n  v10 = *((_QWORD *)this + 17);\n  v20 = *((_OWORD *)this + 13);\n  v21 = *((_OWORD *)this + 14);\n  v22 = *((_OWORD *)this + 15);\n  v17 = *((_QWORD *)this + 32);\n  for ( result = cocos2d::unzGoToFirstFile(this, v6);\n        !(_DWORD)result;\n        result = cocos2d::unzGoToNextFile64(this, nullptr, nullptr, nullptr) )\n  {\n    result = sub_1800A3990((__int64)this, 0, nullptr, (__int64)Str1, 0x100u, 0, 0, 0, 0);\n    if ( (_DWORD)result )\n      break;\n    v11 = 2;\n    if ( v3 )\n      v11 = v3;\n    if ( v11 == 1 )\n    {\n      v12 = strcmp(Str1, Str2);\n    }\n    else\n    {\n      v13 = Str2;\n      while ( 1 )\n      {\n        v14 = v13[Str1 - Str2];\n        v15 = *v13++;\n        if ( v14 >= 97 && v14 <= 122 )\n          v14 -= 32;\n        v16 = v15 - 32;\n        if ( (unsigned __int8)(v15 - 97) > 0x19u )\n          v16 = v15;\n        if ( !v14 )\n          break;\n        if ( !v16 )\n          goto LABEL_21;\n        if ( v14 < v16 )\n        {\n          v12 = -1;\n          goto LABEL_24;\n        }\n        if ( v14 > v16 )\n        {\nLABEL_21:\n          v12 = 1;\n          goto LABEL_24;\n        }\n      }\n      v12 = -(v16 != 0);\n    }\nLABEL_24:\n    if ( !v12 )\n      return 0;\n  }\n  *((_QWORD *)this + 16) = v9;\n  *((_QWORD *)this + 17) = v10;\n  *((_OWORD *)this + 11) = v18;\n  *((_QWORD *)this + 33) = v8;\n  *((_OWORD *)this + 12) = v19;\n  *((_OWORD *)this + 13) = v20;\n  *((_OWORD *)this + 14) = v21;\n  *((_OWORD *)this + 15) = v22;\n  *((_QWORD *)this + 32) = v17;\n  return result;\n}", "assembly": "; \n; cocos2d::unzLocateFile from 0x1800a4f10 to 0x1800a5188 (632 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCFileUtils::getFileDataFromZip @ 0x180072173\n; > <???> @ 0x1801485c8\n; > <???> @ 0x1801485d8\n; > <???> @ 0x1801485f8\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c1b30\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:15 +0000\n; \npush    rbp                                                            ; +0x0, 0x1800a4f10\npush    rsi                                                            ; +0x2, 0x1800a4f12\npush    rdi                                                            ; +0x3, 0x1800a4f13\nsub     rsp, 1E0h                                                      ; +0x4, 0x1800a4f14\nmov     rax, cs:__security_cookie                                      ; +0xb, 0x1800a4f1b\nxor     rax, rsp                                                       ; +0x12, 0x1800a4f22\nmov     [rsp+1F8h+var_38], rax                                         ; +0x15, 0x1800a4f25\nmov     ebp, r8d                                                       ; +0x1d, 0x1800a4f2d\nmov     rsi, rdx                                                       ; +0x20, 0x1800a4f30\nmov     rdi, rcx                                                       ; +0x23, 0x1800a4f33\ntest    rcx, rcx                                                       ; +0x26, 0x1800a4f36\njz      loc_1800A5181                                                  ; +0x29, 0x1800a4f39\nmov     rcx, rdx; Str                                                  ; +0x2f, 0x1800a4f3f\ncall    strlen                                                         ; +0x32, 0x1800a4f42\ncmp     rax, 100h                                                      ; +0x37, 0x1800a4f47\njnb     loc_1800A5181                                                  ; +0x3d, 0x1800a4f4d\ncmp     qword ptr [rdi+90h], 0                                         ; +0x43, 0x1800a4f53\njnz     short loc_1800A4F67                                            ; +0x4b, 0x1800a4f5b\nmov     eax, 0FFFFFF9Ch                                                ; +0x4d, 0x1800a4f5d\njmp     loc_1800A5162                                                  ; +0x52, 0x1800a4f62\nmovups  xmm0, xmmword ptr [rdi+0B0h]                                   ; +0x57, 0x1800a4f67\nmov     [rsp+1F8h+arg_8], rbx                                          ; +0x5e, 0x1800a4f6e\nmov     rcx, rdi; this                                                 ; +0x66, 0x1800a4f76\nmov     rbx, [rdi+108h]                                                ; +0x69, 0x1800a4f79\nmovups  [rsp+1F8h+var_1A0], xmm0                                       ; +0x70, 0x1800a4f80\nmov     [rsp+1F8h+arg_10], r12                                         ; +0x75, 0x1800a4f85\nmovups  xmm0, xmmword ptr [rdi+0C0h]                                   ; +0x7d, 0x1800a4f8d\nmov     [rsp+1F8h+var_20], r14                                         ; +0x84, 0x1800a4f94\nmov     r14, [rdi+80h]                                                 ; +0x8c, 0x1800a4f9c\nmovups  [rsp+1F8h+var_190], xmm0                                       ; +0x93, 0x1800a4fa3\nmov     [rsp+1F8h+var_28], r15                                         ; +0x98, 0x1800a4fa8\nmovups  xmm0, xmmword ptr [rdi+0D0h]                                   ; +0xa0, 0x1800a4fb0\nmov     r15, [rdi+88h]                                                 ; +0xa7, 0x1800a4fb7\nmovups  [rsp+1F8h+var_180], xmm0                                       ; +0xae, 0x1800a4fbe\nmovups  xmm0, xmmword ptr [rdi+0E0h]                                   ; +0xb3, 0x1800a4fc3\nmovups  [rsp+1F8h+var_170], xmm0                                       ; +0xba, 0x1800a4fca\nmovups  xmm0, xmmword ptr [rdi+0F0h]                                   ; +0xc2, 0x1800a4fd2\nmovups  [rsp+1F8h+var_160], xmm0                                       ; +0xc9, 0x1800a4fd9\nmovsd   xmm0, qword ptr [rdi+100h]                                     ; +0xd1, 0x1800a4fe1\nmovsd   [rsp+1F8h+var_1A8], xmm0                                       ; +0xd9, 0x1800a4fe9\ncall    ?unzGoToFirstFile@cocos2d@@YAHPEAX@Z; cocos2d::unzGoToFirstFile(void *) ; +0xdf, 0x1800a4fef\ntest    eax, eax                                                       ; +0xe4, 0x1800a4ff4\njnz     loc_1800A50DD                                                  ; +0xe6, 0x1800a4ff6\nxor     r12d, r12d                                                     ; +0xec, 0x1800a4ffc\nnop                                                                    ; +0xef, 0x1800a4fff\nmov     [rsp+1F8h+var_1B8], r12d                                       ; +0xf0, 0x1800a5000\nlea     r9, [rsp+1F8h+Str1]                                            ; +0xf5, 0x1800a5005\nmov     [rsp+1F8h+var_1C0], r12                                        ; +0xfd, 0x1800a500d\nxor     r8d, r8d                                                       ; +0x102, 0x1800a5012\nmov     [rsp+1F8h+var_1C8], r12d                                       ; +0x105, 0x1800a5015\nxor     edx, edx                                                       ; +0x10a, 0x1800a501a\nmov     [rsp+1F8h+var_1D0], r12                                        ; +0x10c, 0x1800a501c\nmov     rcx, rdi                                                       ; +0x111, 0x1800a5021\nmov     [rsp+1F8h+var_1D8], 100h; unsigned int                         ; +0x114, 0x1800a5024\ncall    sub_1800A3990                                                  ; +0x11c, 0x1800a502c\ntest    eax, eax                                                       ; +0x121, 0x1800a5031\njnz     loc_1800A50DD                                                  ; +0x123, 0x1800a5033\ntest    ebp, ebp                                                       ; +0x129, 0x1800a5039\nmov     eax, 2                                                         ; +0x12b, 0x1800a503b\ncmovnz  eax, ebp                                                       ; +0x130, 0x1800a5040\ncmp     eax, 1                                                         ; +0x133, 0x1800a5043\njnz     short loc_1800A505A                                            ; +0x136, 0x1800a5046\nmov     rdx, rsi; Str2                                                 ; +0x138, 0x1800a5048\nlea     rcx, [rsp+1F8h+Str1]; Str1                                     ; +0x13b, 0x1800a504b\ncall    strcmp                                                         ; +0x143, 0x1800a5053\njmp     short loc_1800A50BD                                            ; +0x148, 0x1800a5058\nlea     r11, [rsp+1F8h+Str1]                                           ; +0x14a, 0x1800a505a\nmov     r10, rsi                                                       ; +0x152, 0x1800a5062\nsub     r11, rsi                                                       ; +0x155, 0x1800a5065\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x158, 0x1800a5068\nmovzx   eax, byte ptr [r11+r10]                                        ; +0x160, 0x1800a5070\nmovzx   r9d, byte ptr [r10]                                            ; +0x165, 0x1800a5075\nlea     r10, [r10+1]                                                   ; +0x169, 0x1800a5079\ncmp     al, 61h ; 'a'                                                  ; +0x16d, 0x1800a507d\njl      short loc_1800A5087                                            ; +0x16f, 0x1800a507f\ncmp     al, 7Ah ; 'z'                                                  ; +0x171, 0x1800a5081\njg      short loc_1800A5087                                            ; +0x173, 0x1800a5083\nsub     al, 20h ; ' '                                                  ; +0x175, 0x1800a5085\nlea     edx, [r9-61h]                                                  ; +0x177, 0x1800a5087\ncmp     dl, 19h                                                        ; +0x17b, 0x1800a508b\nlea     ecx, [r9-20h]                                                  ; +0x17e, 0x1800a508e\nmovzx   r8d, cl                                                        ; +0x182, 0x1800a5092\ncmova   r8d, r9d                                                       ; +0x186, 0x1800a5096\ntest    al, al                                                         ; +0x18a, 0x1800a509a\njz      short loc_1800A50B8                                            ; +0x18c, 0x1800a509c\ntest    r8b, r8b                                                       ; +0x18e, 0x1800a509e\njz      short loc_1800A50AA                                            ; +0x191, 0x1800a50a1\ncmp     al, r8b                                                        ; +0x193, 0x1800a50a3\njl      short loc_1800A50B1                                            ; +0x196, 0x1800a50a6\njle     short loc_1800A5070                                            ; +0x198, 0x1800a50a8\nmov     eax, 1                                                         ; +0x19a, 0x1800a50aa\njmp     short loc_1800A50BD                                            ; +0x19f, 0x1800a50af\nmov     eax, 0FFFFFFFFh                                                ; +0x1a1, 0x1800a50b1\njmp     short loc_1800A50BD                                            ; +0x1a6, 0x1800a50b6\nneg     r8b                                                            ; +0x1a8, 0x1800a50b8\nsbb     eax, eax                                                       ; +0x1ab, 0x1800a50bb\ntest    eax, eax                                                       ; +0x1ad, 0x1800a50bd\njz      loc_1800A517D                                                  ; +0x1af, 0x1800a50bf\nxor     r9d, r9d; char *                                               ; +0x1b5, 0x1800a50c5\nxor     r8d, r8d; struct cocos2d::unz_file_info64_s *                  ; +0x1b8, 0x1800a50c8\nxor     edx, edx; void *                                               ; +0x1bb, 0x1800a50cb\nmov     rcx, rdi; this                                                 ; +0x1bd, 0x1800a50cd\ncall    ?unzGoToNextFile64@cocos2d@@YAHPEAXPEAUunz_file_info64_s@1@PEADK@Z; cocos2d::unzGoToNextFile64(void *,cocos2d::unz_file_info64_s *,char *,ulong) ; +0x1c0, 0x1800a50d0\ntest    eax, eax                                                       ; +0x1c5, 0x1800a50d5\njz      loc_1800A5000                                                  ; +0x1c7, 0x1800a50d7\nmovups  xmm0, [rsp+1F8h+var_1A0]                                       ; +0x1cd, 0x1800a50dd\nmov     [rdi+80h], r14                                                 ; +0x1d2, 0x1800a50e2\nmovups  xmm1, [rsp+1F8h+var_190]                                       ; +0x1d9, 0x1800a50e9\nmov     [rdi+88h], r15                                                 ; +0x1de, 0x1800a50ee\nmovups  xmmword ptr [rdi+0B0h], xmm0                                   ; +0x1e5, 0x1800a50f5\nmov     [rdi+108h], rbx                                                ; +0x1ec, 0x1800a50fc\nmovups  xmm0, [rsp+1F8h+var_180]                                       ; +0x1f3, 0x1800a5103\nmovups  xmmword ptr [rdi+0C0h], xmm1                                   ; +0x1f8, 0x1800a5108\nmovups  xmm1, [rsp+1F8h+var_170]                                       ; +0x1ff, 0x1800a510f\nmovups  xmmword ptr [rdi+0D0h], xmm0                                   ; +0x207, 0x1800a5117\nmovups  xmm0, [rsp+1F8h+var_160]                                       ; +0x20e, 0x1800a511e\nmovups  xmmword ptr [rdi+0E0h], xmm1                                   ; +0x216, 0x1800a5126\nmovups  xmmword ptr [rdi+0F0h], xmm0                                   ; +0x21d, 0x1800a512d\nmovsd   xmm0, [rsp+1F8h+var_1A8]                                       ; +0x224, 0x1800a5134\nmovsd   qword ptr [rdi+100h], xmm0                                     ; +0x22a, 0x1800a513a\nmov     r14, [rsp+1F8h+var_20]                                         ; +0x232, 0x1800a5142\nmov     r12, [rsp+1F8h+arg_10]                                         ; +0x23a, 0x1800a514a\nmov     rbx, [rsp+1F8h+arg_8]                                          ; +0x242, 0x1800a5152\nmov     r15, [rsp+1F8h+var_28]                                         ; +0x24a, 0x1800a515a\nmov     rcx, [rsp+1F8h+var_38]                                         ; +0x252, 0x1800a5162\nxor     rcx, rsp; StackCookie                                          ; +0x25a, 0x1800a516a\ncall    __security_check_cookie                                        ; +0x25d, 0x1800a516d\nadd     rsp, 1E0h                                                      ; +0x262, 0x1800a5172\npop     rdi                                                            ; +0x269, 0x1800a5179\npop     rsi                                                            ; +0x26a, 0x1800a517a\npop     rbp                                                            ; +0x26b, 0x1800a517b\nretn                                                                   ; +0x26c, 0x1800a517c\nxor     eax, eax                                                       ; +0x26d, 0x1800a517d\njmp     short loc_1800A5142                                            ; +0x26f, 0x1800a517f\nmov     eax, 0FFFFFF9Ah                                                ; +0x271, 0x1800a5181\njmp     short loc_1800A5162                                            ; +0x276, 0x1800a5186", "xrefs": ["cocos2d::CCFileUtils::getFileDataFromZip @ 0x180072173", "<???> @ 0x1801485c8", "<???> @ 0x1801485d8", "<???> @ 0x1801485f8", "<???> @ 0x18014cf68", "<???> @ 0x1801c1b30"], "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"}