{"type": "func", "start": 6443111296, "end": 6443111414, "name": "sub_1800A1380", "pseudocode": "// \n// sub_1800A1380 from 0x1800a1380 to 0x1800a13f6 (118 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCNode::addChild @ 0x180002c01\n// > cocos2d::CCNode::insertChild @ 0x18000374b\n// > <???> @ 0x1801c1698\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\n__int64 __fastcall sub_1800A1380(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  sub_1800A1D70(a1);\n  cocos2d::CCObject::retain(a2);\n  *(_QWORD *)(*((_QWORD *)a1 + 2) + 8LL * *a1) = a2;\n  result = *a1;\n  *((_DWORD *)a2 + 9) = result;\n  ++*a1;\n  return result;\n}", "assembly": "; \n; sub_1800A1380 from 0x1800a1380 to 0x1800a13f6 (118 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCNode::addChild @ 0x180002c01\n; > cocos2d::CCNode::insertChild @ 0x18000374b\n; > <???> @ 0x1801c1698\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, 0x1800a1380\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800a1385\npush    rdi                                                            ; +0xa, 0x1800a138a\nsub     rsp, 20h                                                       ; +0xb, 0x1800a138b\nmov     rbx, rcx                                                       ; +0xf, 0x1800a138f\nmov     rsi, rdx                                                       ; +0x12, 0x1800a1392\nmov     ecx, [rcx+4]                                                   ; +0x15, 0x1800a1395\nmov     eax, [rbx]                                                     ; +0x18, 0x1800a1398\ninc     eax                                                            ; +0x1a, 0x1800a139a\ncmp     ecx, eax                                                       ; +0x1c, 0x1800a139c\njnb     short loc_1800A13C5                                            ; +0x1e, 0x1800a139e\nlea     eax, [rcx+rcx]                                                 ; +0x20, 0x1800a13a0\nmov     rcx, [rbx+10h]; Block                                          ; +0x23, 0x1800a13a3\nmov     edx, eax                                                       ; +0x27, 0x1800a13a7\nshl     rdx, 3; Size                                                   ; +0x29, 0x1800a13a9\nmov     [rbx+4], eax                                                   ; +0x2d, 0x1800a13ad\ncall    cs:realloc                                                     ; +0x30, 0x1800a13b0\nmov     [rbx+10h], rax                                                 ; +0x36, 0x1800a13b6\nmov     eax, [rbx]                                                     ; +0x3a, 0x1800a13ba\nmov     ecx, [rbx+4]                                                   ; +0x3c, 0x1800a13bc\ninc     eax                                                            ; +0x3f, 0x1800a13bf\ncmp     ecx, eax                                                       ; +0x41, 0x1800a13c1\njb      short loc_1800A13A0                                            ; +0x43, 0x1800a13c3\nmov     rcx, rbx                                                       ; +0x45, 0x1800a13c5\ncall    sub_1800A1D70                                                  ; +0x48, 0x1800a13c8\nmov     rcx, rsi; this                                                 ; +0x4d, 0x1800a13cd\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x50, 0x1800a13d0\nmov     ecx, [rbx]                                                     ; +0x55, 0x1800a13d5\nmov     rax, [rbx+10h]                                                 ; +0x57, 0x1800a13d7\nmov     [rax+rcx*8], rsi                                               ; +0x5b, 0x1800a13db\nmov     eax, [rbx]                                                     ; +0x5f, 0x1800a13df\nmov     [rsi+24h], eax                                                 ; +0x61, 0x1800a13e1\ninc     dword ptr [rbx]                                                ; +0x64, 0x1800a13e4\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x66, 0x1800a13e6\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6b, 0x1800a13eb\nadd     rsp, 20h                                                       ; +0x70, 0x1800a13f0\npop     rdi                                                            ; +0x74, 0x1800a13f4\nretn                                                                   ; +0x75, 0x1800a13f5", "xrefs": ["cocos2d::CCNode::addChild @ 0x180002c01", "cocos2d::CCNode::insertChild @ 0x18000374b", "<???> @ 0x1801c1698"], "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"}