{"type": "func", "start": 6443096224, "end": 6443096337, "name": "sub_18009D8A0", "pseudocode": "// \n// sub_18009D8A0 from 0x18009d8a0 to 0x18009d911 (113 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCArray::fastRemoveObject @ 0x180006eb4\n// > <???> @ 0x18013efa0\n// > <???> @ 0x18013efb0\n// > <???> @ 0x1801b7428\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_18009D8A0(unsigned int *a1, __int64 a2)\n{\n  unsigned int v2; // r9d\n  _QWORD *v4; // rcx\n  __int64 result; // rax\n  _QWORD *v6; // r8\n  __int64 v7; // rdi\n  cocos2d::CCObject *v8; // rcx\n  __int64 v9; // rcx\n\n  v2 = *a1;\n  v4 = *((_QWORD **)a1 + 2);\n  result = 0;\n  v6 = v4;\n  if ( v2 )\n  {\n    while ( *v6 != a2 )\n    {\n      result = (unsigned int)(result + 1);\n      ++v6;\n      if ( (unsigned int)result >= v2 )\n        return result;\n    }\n    if ( (_DWORD)result != -1 )\n    {\n      v7 = 8 * result;\n      v8 = (cocos2d::CCObject *)v4[result];\n      if ( v8 )\n        cocos2d::CCObject::release(v8);\n      --*a1;\n      v9 = *((_QWORD *)a1 + 2);\n      result = *(_QWORD *)(v9 + 8LL * *a1);\n      *(_QWORD *)(v9 + v7) = result;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_18009D8A0 from 0x18009d8a0 to 0x18009d911 (113 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCArray::fastRemoveObject @ 0x180006eb4\n; > <???> @ 0x18013efa0\n; > <???> @ 0x18013efb0\n; > <???> @ 0x1801b7428\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\npush    rbx                                                            ; +0x0, 0x18009d8a0\nsub     rsp, 20h                                                       ; +0x2, 0x18009d8a2\nmov     r9d, [rcx]                                                     ; +0x6, 0x18009d8a6\nmov     rbx, rcx                                                       ; +0x9, 0x18009d8a9\nmov     rcx, [rcx+10h]                                                 ; +0xc, 0x18009d8ac\nxor     eax, eax                                                       ; +0x10, 0x18009d8b0\nmov     r8, rcx                                                        ; +0x12, 0x18009d8b2\ntest    r9d, r9d                                                       ; +0x15, 0x18009d8b5\njz      short loc_18009D90B                                            ; +0x18, 0x18009d8b8\nnop     word ptr [rax+rax+00h]                                         ; +0x1a, 0x18009d8ba\ncmp     [r8], rdx                                                      ; +0x20, 0x18009d8c0\njz      short loc_18009D8D6                                            ; +0x23, 0x18009d8c3\ninc     eax                                                            ; +0x25, 0x18009d8c5\nadd     r8, 8                                                          ; +0x27, 0x18009d8c7\ncmp     eax, r9d                                                       ; +0x2b, 0x18009d8cb\njb      short loc_18009D8C0                                            ; +0x2e, 0x18009d8ce\nadd     rsp, 20h                                                       ; +0x30, 0x18009d8d0\npop     rbx                                                            ; +0x34, 0x18009d8d4\nretn                                                                   ; +0x35, 0x18009d8d5\ncmp     eax, 0FFFFFFFFh                                                ; +0x36, 0x18009d8d6\njz      short loc_18009D90B                                            ; +0x39, 0x18009d8d9\nmov     [rsp+28h+arg_0], rdi                                           ; +0x3b, 0x18009d8db\nlea     rdi, ds:0[rax*8]                                               ; +0x40, 0x18009d8e0\nmov     rcx, [rdi+rcx]; this                                           ; +0x48, 0x18009d8e8\ntest    rcx, rcx                                                       ; +0x4c, 0x18009d8ec\njz      short loc_18009D8F6                                            ; +0x4f, 0x18009d8ef\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x51, 0x18009d8f1\ndec     dword ptr [rbx]                                                ; +0x56, 0x18009d8f6\nmov     eax, [rbx]                                                     ; +0x58, 0x18009d8f8\nmov     rcx, [rbx+10h]                                                 ; +0x5a, 0x18009d8fa\nmov     rax, [rcx+rax*8]                                               ; +0x5e, 0x18009d8fe\nmov     [rcx+rdi], rax                                                 ; +0x62, 0x18009d902\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x66, 0x18009d906\nadd     rsp, 20h                                                       ; +0x6b, 0x18009d90b\npop     rbx                                                            ; +0x6f, 0x18009d90f\nretn                                                                   ; +0x70, 0x18009d910", "xrefs": ["cocos2d::CCArray::fastRemoveObject @ 0x180006eb4", "<???> @ 0x18013efa0", "<???> @ 0x18013efb0", "<???> @ 0x1801b7428"], "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"}