{"type": "func", "start": 6442457952, "end": 6442458249, "name": "sub_180001B60", "pseudocode": "// \n// sub_180001B60 from 0x180001b60 to 0x180001c89 (297 bytes)\n// \n// 4 xrefs:\n// > cocos2d::extension::AssetsManager::update @ 0x180001e76\n// > <???> @ 0x18002cee4\n// > <???> @ 0x18002cef4\n// > <???> @ 0x18004909c\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 sub_180001B60(cocos2d::extension::AssetsManager *this)\n{\n  char *v1; // rdx\n  char *v3; // rcx\n  size_t v4; // r8\n  _QWORD *v5; // rbx\n  _QWORD *v6; // rax\n  void *v7; // rcx\n  _QWORD *v9; // [rsp+30h] [rbp+8h]\n  _QWORD *v10; // [rsp+30h] [rbp+8h]\n\n  v1 = (char *)this + 40;\n  if ( *((_QWORD *)this + 8) > 0xFu )\n    v1 = *((char **)this + 5);\n  v3 = (char *)this + 136;\n  if ( *((_QWORD *)this + 20) > 0xFu )\n    v3 = *((char **)this + 17);\n  v4 = *((_QWORD *)this + 19);\n  if ( v4 != *((_QWORD *)this + 7) || memcmp(v3, v1, v4) )\n  {\n    if ( !cocos2d::extension::AssetsManager::downLoad(this) )\n      goto LABEL_12;\n    v9 = operator new(0x10u);\n    *(_DWORD *)v9 = 1;\n    v9[1] = this;\n    sub_180002B70(*((_QWORD *)this + 22), v9);\n  }\n  if ( cocos2d::extension::AssetsManager::uncompress(this) )\n  {\n    v10 = operator new(0x10u);\n    *(_DWORD *)v10 = 0;\n    v10[1] = this;\n    sub_180002B70(*((_QWORD *)this + 22), v10);\n  }\n  else\n  {\n    v5 = operator new(0x10u);\n    v5[1] = 0;\n    *(_DWORD *)v5 = 3;\n    v6 = operator new(0x10u);\n    *v6 = 3;\n    v6[1] = this;\n    v5[1] = v6;\n    sub_180002B70(*((_QWORD *)this + 22), v5);\n  }\nLABEL_12:\n  v7 = *((void **)this + 23);\n  if ( v7 )\n  {\n    j_j_free(v7);\n    *((_QWORD *)this + 23) = 0;\n  }\n  return 0;\n}", "assembly": "; \n; sub_180001B60 from 0x180001b60 to 0x180001c89 (297 bytes)\n; \n; 4 xrefs:\n; > cocos2d::extension::AssetsManager::update @ 0x180001e76\n; > <???> @ 0x18002cee4\n; > <???> @ 0x18002cef4\n; > <???> @ 0x18004909c\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], rsi                                              ; +0x0, 0x180001b60\npush    rdi                                                            ; +0x5, 0x180001b65\nsub     rsp, 20h                                                       ; +0x6, 0x180001b66\ncmp     qword ptr [rcx+40h], 0Fh                                       ; +0xa, 0x180001b6a\nlea     rdx, [rcx+28h]                                                 ; +0xf, 0x180001b6f\nmov     rdi, rcx                                                       ; +0x13, 0x180001b73\njbe     short loc_180001B7C                                            ; +0x16, 0x180001b76\nmov     rdx, [rcx+28h]; Buf2                                           ; +0x18, 0x180001b78\nadd     rcx, 88h                                                       ; +0x1c, 0x180001b7c\ncmp     qword ptr [rdi+0A0h], 0Fh                                      ; +0x23, 0x180001b83\njbe     short loc_180001B94                                            ; +0x2b, 0x180001b8b\nmov     rcx, [rdi+88h]; Buf1                                           ; +0x2d, 0x180001b8d\nmov     r8, [rdi+98h]; Size                                            ; +0x34, 0x180001b94\nxor     esi, esi                                                       ; +0x3b, 0x180001b9b\ncmp     r8, [rdi+38h]                                                  ; +0x3d, 0x180001b9d\njnz     short loc_180001BAC                                            ; +0x41, 0x180001ba1\ncall    memcmp                                                         ; +0x43, 0x180001ba3\ntest    eax, eax                                                       ; +0x48, 0x180001ba8\njz      short loc_180001BE4                                            ; +0x4a, 0x180001baa\nmov     rcx, rdi; this                                                 ; +0x4c, 0x180001bac\ncall    ?downLoad@AssetsManager@extension@cocos2d@@IEAA_NXZ; cocos2d::extension::AssetsManager::downLoad(void) ; +0x4f, 0x180001baf\ntest    al, al                                                         ; +0x54, 0x180001bb4\njz      loc_180001C5F                                                  ; +0x56, 0x180001bb6\nmov     ecx, 10h; Size                                                 ; +0x5c, 0x180001bbc\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x61, 0x180001bc1\nmov     rdx, rax                                                       ; +0x66, 0x180001bc6\nmov     [rsp+28h+arg_0], rax                                           ; +0x69, 0x180001bc9\nmov     dword ptr [rax], 1                                             ; +0x6e, 0x180001bce\nmov     [rax+8], rdi                                                   ; +0x74, 0x180001bd4\nmov     rcx, [rdi+0B0h]                                                ; +0x78, 0x180001bd8\ncall    sub_180002B70                                                  ; +0x7f, 0x180001bdf\nmov     rcx, rdi; this                                                 ; +0x84, 0x180001be4\ncall    ?uncompress@AssetsManager@extension@cocos2d@@IEAA_NXZ; cocos2d::extension::AssetsManager::uncompress(void) ; +0x87, 0x180001be7\nmov     ecx, 10h; Size                                                 ; +0x8c, 0x180001bec\ntest    al, al                                                         ; +0x91, 0x180001bf1\njnz     short loc_180001C40                                            ; +0x93, 0x180001bf3\nmov     [rsp+28h+arg_8], rbx                                           ; +0x95, 0x180001bf5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x9a, 0x180001bfa\nmov     ecx, 10h; Size                                                 ; +0x9f, 0x180001bff\nmov     [rsp+28h+arg_0], rax                                           ; +0xa4, 0x180001c04\nmov     rbx, rax                                                       ; +0xa9, 0x180001c09\nmov     [rax+8], rsi                                                   ; +0xac, 0x180001c0c\nmov     dword ptr [rax], 3                                             ; +0xb0, 0x180001c10\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xb6, 0x180001c16\nmov     rdx, rbx                                                       ; +0xbb, 0x180001c1b\nmov     qword ptr [rax], 3                                             ; +0xbe, 0x180001c1e\nmov     [rax+8], rdi                                                   ; +0xc5, 0x180001c25\nmov     [rbx+8], rax                                                   ; +0xc9, 0x180001c29\nmov     rcx, [rdi+0B0h]                                                ; +0xcd, 0x180001c2d\ncall    sub_180002B70                                                  ; +0xd4, 0x180001c34\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xd9, 0x180001c39\njmp     short loc_180001C5F                                            ; +0xde, 0x180001c3e\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xe0, 0x180001c40\nmov     rdx, rax                                                       ; +0xe5, 0x180001c45\nmov     [rsp+28h+arg_0], rax                                           ; +0xe8, 0x180001c48\nmov     [rax], esi                                                     ; +0xed, 0x180001c4d\nmov     [rax+8], rdi                                                   ; +0xef, 0x180001c4f\nmov     rcx, [rdi+0B0h]                                                ; +0xf3, 0x180001c53\ncall    sub_180002B70                                                  ; +0xfa, 0x180001c5a\nmov     rcx, [rdi+0B8h]; Block                                         ; +0xff, 0x180001c5f\ntest    rcx, rcx                                                       ; +0x106, 0x180001c66\njz      short loc_180001C7C                                            ; +0x109, 0x180001c69\nmov     edx, 10h                                                       ; +0x10b, 0x180001c6b\ncall    j_j_free                                                       ; +0x110, 0x180001c70\nmov     [rdi+0B8h], rsi                                                ; +0x115, 0x180001c75\nmov     rsi, [rsp+28h+arg_10]                                          ; +0x11c, 0x180001c7c\nxor     eax, eax                                                       ; +0x121, 0x180001c81\nadd     rsp, 20h                                                       ; +0x123, 0x180001c83\npop     rdi                                                            ; +0x127, 0x180001c87\nretn                                                                   ; +0x128, 0x180001c88", "xrefs": ["cocos2d::extension::AssetsManager::update @ 0x180001e76", "<???> @ 0x18002cee4", "<???> @ 0x18002cef4", "<???> @ 0x18004909c"], "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"}