{"type": "func", "start": 6443097680, "end": 6443097819, "name": "sub_18009DE50", "pseudocode": "// \n// sub_18009DE50 from 0x18009de50 to 0x18009dedb (139 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCArray::removeObject @ 0x180007214\n// > <???> @ 0x18013efc4\n// > <???> @ 0x18013efd4\n// > <???> @ 0x1801b74d0\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\nunsigned __int64 __fastcall sub_18009DE50(__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_18009DE50 from 0x18009de50 to 0x18009dedb (139 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCArray::removeObject @ 0x180007214\n; > <???> @ 0x18013efc4\n; > <???> @ 0x18013efd4\n; > <???> @ 0x1801b74d0\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_8], rbx                                               ; +0x0, 0x18009de50\npush    rsi                                                            ; +0x5, 0x18009de55\nsub     rsp, 20h                                                       ; +0x6, 0x18009de56\nmov     r9d, [rcx]                                                     ; +0xa, 0x18009de5a\nmov     rsi, rcx                                                       ; +0xd, 0x18009de5d\nmov     rcx, [rcx+10h]                                                 ; +0x10, 0x18009de60\nxor     ebx, ebx                                                       ; +0x14, 0x18009de64\nmov     rax, rcx                                                       ; +0x16, 0x18009de66\ntest    r9d, r9d                                                       ; +0x19, 0x18009de69\njz      short loc_18009DED0                                            ; +0x1c, 0x18009de6c\nxchg    ax, ax                                                         ; +0x1e, 0x18009de6e\ncmp     [rax], rdx                                                     ; +0x20, 0x18009de70\njz      short loc_18009DE8B                                            ; +0x23, 0x18009de73\ninc     ebx                                                            ; +0x25, 0x18009de75\nadd     rax, 8                                                         ; +0x27, 0x18009de77\ncmp     ebx, r9d                                                       ; +0x2b, 0x18009de7b\njb      short loc_18009DE70                                            ; +0x2e, 0x18009de7e\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x30, 0x18009de80\nadd     rsp, 20h                                                       ; +0x35, 0x18009de85\npop     rsi                                                            ; +0x39, 0x18009de89\nretn                                                                   ; +0x3a, 0x18009de8a\ncmp     ebx, 0FFFFFFFFh                                                ; +0x3b, 0x18009de8b\njz      short loc_18009DED0                                            ; +0x3e, 0x18009de8e\nmov     [rsp+28h+arg_0], rdi                                           ; +0x40, 0x18009de90\ntest    r8b, r8b                                                       ; +0x45, 0x18009de95\njz      short loc_18009DEA8                                            ; +0x48, 0x18009de98\nmov     rcx, [rcx+rbx*8]; this                                         ; +0x4a, 0x18009de9a\ntest    rcx, rcx                                                       ; +0x4e, 0x18009de9e\njz      short loc_18009DEA8                                            ; +0x51, 0x18009dea1\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x53, 0x18009dea3\ndec     dword ptr [rsi]                                                ; +0x58, 0x18009dea8\nmov     eax, [rsi]                                                     ; +0x5a, 0x18009deaa\nsub     eax, ebx                                                       ; +0x5c, 0x18009deac\njz      short loc_18009DECB                                            ; +0x5e, 0x18009deae\nmov     r9, [rsi+10h]                                                  ; +0x60, 0x18009deb0\nmov     r8d, eax                                                       ; +0x64, 0x18009deb4\nlea     eax, [rbx+1]                                                   ; +0x67, 0x18009deb7\nshl     r8, 3; Size                                                    ; +0x6a, 0x18009deba\nlea     rdx, [r9+rax*8]; Src                                           ; +0x6e, 0x18009debe\nlea     rcx, [r9+rbx*8]; void *                                        ; +0x72, 0x18009dec2\ncall    memmove                                                        ; +0x76, 0x18009dec6\nmov     rdi, [rsp+28h+arg_0]                                           ; +0x7b, 0x18009decb\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x80, 0x18009ded0\nadd     rsp, 20h                                                       ; +0x85, 0x18009ded5\npop     rsi                                                            ; +0x89, 0x18009ded9\nretn                                                                   ; +0x8a, 0x18009deda", "xrefs": ["cocos2d::CCArray::removeObject @ 0x180007214", "<???> @ 0x18013efc4", "<???> @ 0x18013efd4", "<???> @ 0x1801b74d0"], "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"}