{"type": "func", "start": 6443095920, "end": 6443096030, "name": "sub_18009D770", "pseudocode": "// \n// sub_18009D770 from 0x18009d770 to 0x18009d7de (110 bytes)\n// \n// 2 xrefs:\n// > cocos2d::CCArray::addObjectNew @ 0x180006894\n// > <???> @ 0x1801b7404\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_18009D770(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_uIndexInArray = result;\n  ++*a1;\n  return result;\n}", "assembly": "; \n; sub_18009D770 from 0x18009d770 to 0x18009d7de (110 bytes)\n; \n; 2 xrefs:\n; > cocos2d::CCArray::addObjectNew @ 0x180006894\n; > <???> @ 0x1801b7404\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, 0x18009d770\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18009d775\npush    rdi                                                            ; +0xa, 0x18009d77a\nsub     rsp, 20h                                                       ; +0xb, 0x18009d77b\nmov     rbx, rcx                                                       ; +0xf, 0x18009d77f\nmov     rsi, rdx                                                       ; +0x12, 0x18009d782\nmov     ecx, [rcx+4]                                                   ; +0x15, 0x18009d785\nmov     eax, [rbx]                                                     ; +0x18, 0x18009d788\ninc     eax                                                            ; +0x1a, 0x18009d78a\ncmp     ecx, eax                                                       ; +0x1c, 0x18009d78c\njnb     short loc_18009D7B5                                            ; +0x1e, 0x18009d78e\nlea     eax, [rcx+rcx]                                                 ; +0x20, 0x18009d790\nmov     rcx, [rbx+10h]; Block                                          ; +0x23, 0x18009d793\nmov     edx, eax                                                       ; +0x27, 0x18009d797\nshl     rdx, 3; Size                                                   ; +0x29, 0x18009d799\nmov     [rbx+4], eax                                                   ; +0x2d, 0x18009d79d\ncall    cs:realloc                                                     ; +0x30, 0x18009d7a0\nmov     [rbx+10h], rax                                                 ; +0x36, 0x18009d7a6\nmov     eax, [rbx]                                                     ; +0x3a, 0x18009d7aa\nmov     ecx, [rbx+4]                                                   ; +0x3c, 0x18009d7ac\ninc     eax                                                            ; +0x3f, 0x18009d7af\ncmp     ecx, eax                                                       ; +0x41, 0x18009d7b1\njb      short loc_18009D790                                            ; +0x43, 0x18009d7b3\nmov     rcx, rsi; this                                                 ; +0x45, 0x18009d7b5\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x48, 0x18009d7b8\nmov     ecx, [rbx]                                                     ; +0x4d, 0x18009d7bd\nmov     rax, [rbx+10h]                                                 ; +0x4f, 0x18009d7bf\nmov     [rax+rcx*8], rsi                                               ; +0x53, 0x18009d7c3\nmov     eax, [rbx]                                                     ; +0x57, 0x18009d7c7\nmov     [rsi+20h], eax                                                 ; +0x59, 0x18009d7c9\ninc     dword ptr [rbx]                                                ; +0x5c, 0x18009d7cc\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x5e, 0x18009d7ce\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x63, 0x18009d7d3\nadd     rsp, 20h                                                       ; +0x68, 0x18009d7d8\npop     rdi                                                            ; +0x6c, 0x18009d7dc\nretn                                                                   ; +0x6d, 0x18009d7dd", "xrefs": ["cocos2d::CCArray::addObjectNew @ 0x180006894", "<???> @ 0x1801b7404"], "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"}