{"type": "func", "start": 6443113440, "end": 6443113606, "name": "sub_1800A1BE0", "pseudocode": "// \n// sub_1800A1BE0 from 0x1800a1be0 to 0x1800a1c86 (166 bytes)\n// \n// 2 xrefs:\n// > cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x180092108\n// > <???> @ 0x1801c17a0\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:13 +0000\n// \n\nunsigned __int64 __fastcall sub_1800A1BE0(__int64 a1, unsigned int a2, char a3)\n{\n  __int64 v3; // rbx\n  __int64 v5; // rsi\n  cocos2d::CCObject *v6; // rcx\n  unsigned __int64 result; // rax\n  __int64 v8; // rdx\n\n  v3 = (int)a2;\n  v5 = 8LL * a2;\n  *(_DWORD *)(*(_QWORD *)(v5 + *(_QWORD *)(a1 + 16)) + 40LL) = -1;\n  if ( a3 )\n  {\n    v6 = *(cocos2d::CCObject **)(v5 + *(_QWORD *)(a1 + 16));\n    if ( v6 )\n      cocos2d::CCObject::release(v6);\n  }\n  result = (unsigned int)(--*(_DWORD *)a1 - v3);\n  if ( *(_DWORD *)a1 != (_DWORD)v3 )\n  {\n    result = (unsigned __int64)memmove(\n                                 (void *)(*(_QWORD *)(a1 + 16) + v5),\n                                 (const void *)(*(_QWORD *)(a1 + 16) + 8LL * (unsigned int)(v3 + 1)),\n                                 8LL * (unsigned int)result);\n    if ( (unsigned int)v3 < *(_DWORD *)a1 )\n    {\n      v8 = 8 * v3;\n      do\n      {\n        result = *(_QWORD *)(a1 + 16);\n        v8 += 8;\n        *(_DWORD *)(*(_QWORD *)(result + v8 - 8) + 40LL) = v3;\n        LODWORD(v3) = v3 + 1;\n      }\n      while ( (unsigned int)v3 < *(_DWORD *)a1 );\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800A1BE0 from 0x1800a1be0 to 0x1800a1c86 (166 bytes)\n; \n; 2 xrefs:\n; > cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x180092108\n; > <???> @ 0x1801c17a0\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:13 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800a1be0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a1be5\npush    rdi                                                            ; +0xa, 0x1800a1bea\nsub     rsp, 20h                                                       ; +0xb, 0x1800a1beb\nmovsxd  rbx, edx                                                       ; +0xf, 0x1800a1bef\nmov     rdi, rcx                                                       ; +0x12, 0x1800a1bf2\nmov     eax, ebx                                                       ; +0x15, 0x1800a1bf5\nlea     rsi, ds:0[rax*8]                                               ; +0x17, 0x1800a1bf7\nmov     rax, [rcx+10h]                                                 ; +0x1f, 0x1800a1bff\nmov     rdx, [rsi+rax]                                                 ; +0x23, 0x1800a1c03\nmov     dword ptr [rdx+28h], 0FFFFFFFFh                                ; +0x27, 0x1800a1c07\ntest    r8b, r8b                                                       ; +0x2e, 0x1800a1c0e\njz      short loc_1800A1C25                                            ; +0x31, 0x1800a1c11\nmov     rax, [rcx+10h]                                                 ; +0x33, 0x1800a1c13\nmov     rcx, [rsi+rax]; this                                           ; +0x37, 0x1800a1c17\ntest    rcx, rcx                                                       ; +0x3b, 0x1800a1c1b\njz      short loc_1800A1C25                                            ; +0x3e, 0x1800a1c1e\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x40, 0x1800a1c20\ndec     dword ptr [rdi]                                                ; +0x45, 0x1800a1c25\nmov     eax, [rdi]                                                     ; +0x47, 0x1800a1c27\nsub     eax, ebx                                                       ; +0x49, 0x1800a1c29\njz      short loc_1800A1C76                                            ; +0x4b, 0x1800a1c2b\nmov     r9, [rdi+10h]                                                  ; +0x4d, 0x1800a1c2d\nmov     r8d, eax                                                       ; +0x51, 0x1800a1c31\nlea     eax, [rbx+1]                                                   ; +0x54, 0x1800a1c34\nshl     r8, 3; Size                                                    ; +0x57, 0x1800a1c37\nlea     rdx, [r9+rax*8]; Src                                           ; +0x5b, 0x1800a1c3b\nlea     rcx, [r9+rsi]; void *                                          ; +0x5f, 0x1800a1c3f\ncall    memmove                                                        ; +0x63, 0x1800a1c43\ncmp     ebx, [rdi]                                                     ; +0x68, 0x1800a1c48\njnb     short loc_1800A1C76                                            ; +0x6a, 0x1800a1c4a\nlea     rdx, ds:0[rbx*8]                                               ; +0x6c, 0x1800a1c4c\nnop     dword ptr [rax+00h]                                            ; +0x74, 0x1800a1c54\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x78, 0x1800a1c58\nmov     rax, [rdi+10h]                                                 ; +0x80, 0x1800a1c60\nlea     rdx, [rdx+8]                                                   ; +0x84, 0x1800a1c64\nmov     rcx, [rax+rdx-8]                                               ; +0x88, 0x1800a1c68\nmov     [rcx+28h], ebx                                                 ; +0x8d, 0x1800a1c6d\ninc     ebx                                                            ; +0x90, 0x1800a1c70\ncmp     ebx, [rdi]                                                     ; +0x92, 0x1800a1c72\njb      short loc_1800A1C60                                            ; +0x94, 0x1800a1c74\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x96, 0x1800a1c76\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x9b, 0x1800a1c7b\nadd     rsp, 20h                                                       ; +0xa0, 0x1800a1c80\npop     rdi                                                            ; +0xa4, 0x1800a1c84\nretn                                                                   ; +0xa5, 0x1800a1c85", "xrefs": ["cocos2d::CCSpriteBatchNode::removeSpriteFromAtlas @ 0x180092108", "<???> @ 0x1801c17a0"], "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"}