{"type": "func", "start": 6443113184, "end": 6443113323, "name": "sub_1800A1AE0", "pseudocode": "// \n// sub_1800A1AE0 from 0x1800a1ae0 to 0x1800a1b6b (139 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCArray::removeObject @ 0x180007364\n// > <???> @ 0x180148250\n// > <???> @ 0x180148260\n// > <???> @ 0x1801c1770\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_1800A1AE0(__int64 a1, __int64 a2, char a3)\n{\n  unsigned int v3; // r9d\n  _QWORD *v5; // rcx\n  __int64 v6; // rbx\n  unsigned __int64 result; // rax\n  cocos2d::CCObject *v8; // rcx\n\n  v3 = *(_DWORD *)a1;\n  v5 = *(_QWORD **)(a1 + 16);\n  v6 = 0;\n  result = (unsigned __int64)v5;\n  if ( v3 )\n  {\n    while ( *(_QWORD *)result != a2 )\n    {\n      v6 = (unsigned int)(v6 + 1);\n      result += 8LL;\n      if ( (unsigned int)v6 >= v3 )\n        return result;\n    }\n    if ( (_DWORD)v6 != -1 )\n    {\n      if ( a3 )\n      {\n        v8 = (cocos2d::CCObject *)v5[v6];\n        if ( v8 )\n          cocos2d::CCObject::release(v8);\n      }\n      result = (unsigned int)(--*(_DWORD *)a1 - v6);\n      if ( *(_DWORD *)a1 != (_DWORD)v6 )\n        return (unsigned __int64)memmove(\n                                   (void *)(*(_QWORD *)(a1 + 16) + 8 * v6),\n                                   (const void *)(*(_QWORD *)(a1 + 16) + 8LL * (unsigned int)(v6 + 1)),\n                                   8LL * (unsigned int)result);\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800A1AE0 from 0x1800a1ae0 to 0x1800a1b6b (139 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCArray::removeObject @ 0x180007364\n; > <???> @ 0x180148250\n; > <???> @ 0x180148260\n; > <???> @ 0x1801c1770\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_8], rbx                                               ; +0x0, 0x1800a1ae0\npush    rsi                                                            ; +0x5, 0x1800a1ae5\nsub     rsp, 20h                                                       ; +0x6, 0x1800a1ae6\nmov     r9d, [rcx]                                                     ; +0xa, 0x1800a1aea\nmov     rsi, rcx                                                       ; +0xd, 0x1800a1aed\nmov     rcx, [rcx+10h]                                                 ; +0x10, 0x1800a1af0\nxor     ebx, ebx                                                       ; +0x14, 0x1800a1af4\nmov     rax, rcx                                                       ; +0x16, 0x1800a1af6\ntest    r9d, r9d                                                       ; +0x19, 0x1800a1af9\njz      short loc_1800A1B60                                            ; +0x1c, 0x1800a1afc\nxchg    ax, ax                                                         ; +0x1e, 0x1800a1afe\ncmp     [rax], rdx                                                     ; +0x20, 0x1800a1b00\njz      short loc_1800A1B1B                                            ; +0x23, 0x1800a1b03\ninc     ebx                                                            ; +0x25, 0x1800a1b05\nadd     rax, 8                                                         ; +0x27, 0x1800a1b07\ncmp     ebx, r9d                                                       ; +0x2b, 0x1800a1b0b\njb      short loc_1800A1B00                                            ; +0x2e, 0x1800a1b0e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x30, 0x1800a1b10\nadd     rsp, 20h                                                       ; +0x35, 0x1800a1b15\npop     rsi                                                            ; +0x39, 0x1800a1b19\nretn                                                                   ; +0x3a, 0x1800a1b1a\ncmp     ebx, 0FFFFFFFFh                                                ; +0x3b, 0x1800a1b1b\njz      short loc_1800A1B60                                            ; +0x3e, 0x1800a1b1e\nmov     [rsp+28h+arg_0], rdi                                           ; +0x40, 0x1800a1b20\ntest    r8b, r8b                                                       ; +0x45, 0x1800a1b25\njz      short loc_1800A1B38                                            ; +0x48, 0x1800a1b28\nmov     rcx, [rcx+rbx*8]; this                                         ; +0x4a, 0x1800a1b2a\ntest    rcx, rcx                                                       ; +0x4e, 0x1800a1b2e\njz      short loc_1800A1B38                                            ; +0x51, 0x1800a1b31\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x53, 0x1800a1b33\ndec     dword ptr [rsi]                                                ; +0x58, 0x1800a1b38\nmov     eax, [rsi]                                                     ; +0x5a, 0x1800a1b3a\nsub     eax, ebx                                                       ; +0x5c, 0x1800a1b3c\njz      short loc_1800A1B5B                                            ; +0x5e, 0x1800a1b3e\nmov     r9, [rsi+10h]                                                  ; +0x60, 0x1800a1b40\nmov     r8d, eax                                                       ; +0x64, 0x1800a1b44\nlea     eax, [rbx+1]                                                   ; +0x67, 0x1800a1b47\nshl     r8, 3; Size                                                    ; +0x6a, 0x1800a1b4a\nlea     rdx, [r9+rax*8]; Src                                           ; +0x6e, 0x1800a1b4e\nlea     rcx, [r9+rbx*8]; void *                                        ; +0x72, 0x1800a1b52\ncall    memmove                                                        ; +0x76, 0x1800a1b56\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x7b, 0x1800a1b5b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x80, 0x1800a1b60\nadd     rsp, 20h                                                       ; +0x85, 0x1800a1b65\npop     rsi                                                            ; +0x89, 0x1800a1b69\nretn                                                                   ; +0x8a, 0x1800a1b6a", "xrefs": ["cocos2d::CCArray::removeObject @ 0x180007364", "<???> @ 0x180148250", "<???> @ 0x180148260", "<???> @ 0x1801c1770"], "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"}