{"type": "func", "start": 6443144736, "end": 6443144921, "name": "sub_1800A9620", "pseudocode": "// \n// sub_1800A9620 from 0x1800a9620 to 0x1800a96d9 (185 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTextureCache::addImageAsync @ 0x1800a83bd\n// > sub_1800A9340 @ 0x1800a94f9\n// > <???> @ 0x1801b7eb4\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_1800A9620(__int64 a1, __int64 *a2)\n{\n  __int64 v4; // rcx\n  __int64 v5; // rdx\n  unsigned __int64 v6; // rdi\n  __int64 v7; // rsi\n  __int64 result; // rax\n\n  v4 = *(_QWORD *)(a1 + 32);\n  if ( ((*(_BYTE *)(a1 + 24) + (_BYTE)v4) & 1) == 0 && *(_QWORD *)(a1 + 16) <= (unsigned __int64)(v4 + 2) >> 1 )\n    sub_18006D2C0((_QWORD *)a1, 1u);\n  v5 = *(_QWORD *)(a1 + 16);\n  *(_QWORD *)(a1 + 24) &= 2 * v5 - 1;\n  v6 = *(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 24);\n  v7 = 8 * ((v6 >> 1) & (v5 - 1));\n  if ( !*(_QWORD *)(v7 + *(_QWORD *)(a1 + 8)) )\n    *(_QWORD *)(v7 + *(_QWORD *)(a1 + 8)) = operator new(0x10u);\n  result = *a2;\n  *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + v7) + 8 * (v6 & 1)) = *a2;\n  ++*(_QWORD *)(a1 + 32);\n  return result;\n}", "assembly": "; \n; sub_1800A9620 from 0x1800a9620 to 0x1800a96d9 (185 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTextureCache::addImageAsync @ 0x1800a83bd\n; > sub_1800A9340 @ 0x1800a94f9\n; > <???> @ 0x1801b7eb4\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_0], rbx                                               ; +0x0, 0x1800a9620\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a9625\nmov     [rsp+arg_10], rdi                                              ; +0xa, 0x1800a962a\npush    r14                                                            ; +0xf, 0x1800a962f\nsub     rsp, 20h                                                       ; +0x11, 0x1800a9631\nmov     rbx, rcx                                                       ; +0x15, 0x1800a9635\nmov     r14, rdx                                                       ; +0x18, 0x1800a9638\nmov     rcx, [rcx+20h]                                                 ; +0x1b, 0x1800a963b\nmovzx   eax, cl                                                        ; +0x1f, 0x1800a963f\nadd     al, [rbx+18h]                                                  ; +0x22, 0x1800a9642\ntest    al, 1                                                          ; +0x25, 0x1800a9645\njnz     short loc_1800A9663                                            ; +0x27, 0x1800a9647\nlea     rax, [rcx+2]                                                   ; +0x29, 0x1800a9649\nshr     rax, 1                                                         ; +0x2d, 0x1800a964d\ncmp     [rbx+10h], rax                                                 ; +0x30, 0x1800a9650\nja      short loc_1800A9663                                            ; +0x34, 0x1800a9654\nmov     edx, 1                                                         ; +0x36, 0x1800a9656\nmov     rcx, rbx                                                       ; +0x3b, 0x1800a965b\ncall    sub_18006D2C0                                                  ; +0x3e, 0x1800a965e\nmov     rdx, [rbx+10h]                                                 ; +0x43, 0x1800a9663\nlea     rax, ds:0FFFFFFFFFFFFFFFFh[rdx*2]                              ; +0x47, 0x1800a9667\nand     [rbx+18h], rax                                                 ; +0x4f, 0x1800a966f\nlea     rcx, [rdx-1]                                                   ; +0x53, 0x1800a9673\nmov     rdi, [rbx+18h]                                                 ; +0x57, 0x1800a9677\nadd     rdi, [rbx+20h]                                                 ; +0x5b, 0x1800a967b\nmov     rax, rdi                                                       ; +0x5f, 0x1800a967f\nshr     rax, 1                                                         ; +0x62, 0x1800a9682\nand     rcx, rax                                                       ; +0x65, 0x1800a9685\nmov     rax, [rbx+8]                                                   ; +0x68, 0x1800a9688\nlea     rsi, ds:0[rcx*8]                                               ; +0x6c, 0x1800a968c\ncmp     qword ptr [rsi+rax], 0                                         ; +0x74, 0x1800a9694\njnz     short loc_1800A96AD                                            ; +0x79, 0x1800a9699\nmov     ecx, 10h; Size                                                 ; +0x7b, 0x1800a969b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x80, 0x1800a96a0\nmov     rcx, [rbx+8]                                                   ; +0x85, 0x1800a96a5\nmov     [rsi+rcx], rax                                                 ; +0x89, 0x1800a96a9\nmov     rcx, [rbx+8]                                                   ; +0x8d, 0x1800a96ad\nand     edi, 1                                                         ; +0x91, 0x1800a96b1\nmov     rax, [r14]                                                     ; +0x94, 0x1800a96b4\nmov     rcx, [rcx+rsi]                                                 ; +0x97, 0x1800a96b7\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x9b, 0x1800a96bb\nmov     [rcx+rdi*8], rax                                               ; +0xa0, 0x1800a96c0\ninc     qword ptr [rbx+20h]                                            ; +0xa4, 0x1800a96c4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xa8, 0x1800a96c8\nmov     rdi, [rsp+28h+arg_10]                                          ; +0xad, 0x1800a96cd\nadd     rsp, 20h                                                       ; +0xb2, 0x1800a96d2\npop     r14                                                            ; +0xb6, 0x1800a96d6\nretn                                                                   ; +0xb8, 0x1800a96d8", "xrefs": ["cocos2d::CCTextureCache::addImageAsync @ 0x1800a83bd", "sub_1800A9340 @ 0x1800a94f9", "<???> @ 0x1801b7eb4"], "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"}