{"type": "func", "start": 6443095680, "end": 6443095790, "name": "sub_18009D680", "pseudocode": "// \n// sub_18009D680 from 0x18009d680 to 0x18009d6ee (110 bytes)\n// \n// 2 xrefs:\n// > cocos2d::CCSpriteBatchNode::appendChild @ 0x18008dfdd\n// > <???> @ 0x1801b73ec\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_18009D680(unsigned int *a1, cocos2d::CCObject *a2)\n{\n  unsigned int i; // ecx\n  unsigned int v5; // eax\n  void *v6; // rcx\n  __int64 result; // rax\n\n  for ( i = a1[1]; i < *a1 + 1; i = a1[1] )\n  {\n    v5 = 2 * i;\n    v6 = *((void **)a1 + 2);\n    a1[1] = v5;\n    *((_QWORD *)a1 + 2) = realloc(v6, 8LL * v5);\n  }\n  cocos2d::CCObject::retain(a2);\n  *(_QWORD *)(*((_QWORD *)a1 + 2) + 8LL * *a1) = a2;\n  result = *a1;\n  a2->m_unknown2 = result;\n  ++*a1;\n  return result;\n}", "assembly": "; \n; sub_18009D680 from 0x18009d680 to 0x18009d6ee (110 bytes)\n; \n; 2 xrefs:\n; > cocos2d::CCSpriteBatchNode::appendChild @ 0x18008dfdd\n; > <???> @ 0x1801b73ec\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, 0x18009d680\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18009d685\npush    rdi                                                            ; +0xa, 0x18009d68a\nsub     rsp, 20h                                                       ; +0xb, 0x18009d68b\nmov     rbx, rcx                                                       ; +0xf, 0x18009d68f\nmov     rsi, rdx                                                       ; +0x12, 0x18009d692\nmov     ecx, [rcx+4]                                                   ; +0x15, 0x18009d695\nmov     eax, [rbx]                                                     ; +0x18, 0x18009d698\ninc     eax                                                            ; +0x1a, 0x18009d69a\ncmp     ecx, eax                                                       ; +0x1c, 0x18009d69c\njnb     short loc_18009D6C5                                            ; +0x1e, 0x18009d69e\nlea     eax, [rcx+rcx]                                                 ; +0x20, 0x18009d6a0\nmov     rcx, [rbx+10h]; Block                                          ; +0x23, 0x18009d6a3\nmov     edx, eax                                                       ; +0x27, 0x18009d6a7\nshl     rdx, 3; Size                                                   ; +0x29, 0x18009d6a9\nmov     [rbx+4], eax                                                   ; +0x2d, 0x18009d6ad\ncall    cs:realloc                                                     ; +0x30, 0x18009d6b0\nmov     [rbx+10h], rax                                                 ; +0x36, 0x18009d6b6\nmov     eax, [rbx]                                                     ; +0x3a, 0x18009d6ba\nmov     ecx, [rbx+4]                                                   ; +0x3c, 0x18009d6bc\ninc     eax                                                            ; +0x3f, 0x18009d6bf\ncmp     ecx, eax                                                       ; +0x41, 0x18009d6c1\njb      short loc_18009D6A0                                            ; +0x43, 0x18009d6c3\nmov     rcx, rsi; this                                                 ; +0x45, 0x18009d6c5\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x48, 0x18009d6c8\nmov     ecx, [rbx]                                                     ; +0x4d, 0x18009d6cd\nmov     rax, [rbx+10h]                                                 ; +0x4f, 0x18009d6cf\nmov     [rax+rcx*8], rsi                                               ; +0x53, 0x18009d6d3\nmov     eax, [rbx]                                                     ; +0x57, 0x18009d6d7\nmov     [rsi+28h], eax                                                 ; +0x59, 0x18009d6d9\ninc     dword ptr [rbx]                                                ; +0x5c, 0x18009d6dc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5e, 0x18009d6de\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x63, 0x18009d6e3\nadd     rsp, 20h                                                       ; +0x68, 0x18009d6e8\npop     rdi                                                            ; +0x6c, 0x18009d6ec\nretn                                                                   ; +0x6d, 0x18009d6ed", "xrefs": ["cocos2d::CCSpriteBatchNode::appendChild @ 0x18008dfdd", "<???> @ 0x1801b73ec"], "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"}