{"type": "func", "start": 6443098480, "end": 6443098540, "name": "sub_18009E170", "pseudocode": "// \n// sub_18009E170 from 0x18009e170 to 0x18009e1ac (60 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180044d95\n// > cocos2d::CCMouseDispatcher::removeDelegate @ 0x180045a51\n// > cocos2d::CCMouseDispatcher::addDelegate @ 0x180060ca5\n// > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1800b3176\n// > cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b4405\n// > <???> @ 0x1801b7560\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\nvoid *__fastcall sub_18009E170(__int64 a1, __int64 a2)\n{\n  void *result; // rax\n  unsigned int v4; // eax\n\n  *(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * (unsigned int)(*(_DWORD *)a1)++) = a2;\n  result = (void *)*(unsigned int *)(a1 + 4);\n  if ( *(_DWORD *)a1 >= (unsigned int)result )\n  {\n    v4 = 2 * (_DWORD)result;\n    *(_DWORD *)(a1 + 4) = v4;\n    result = realloc(*(void **)(a1 + 16), 8LL * v4);\n    *(_QWORD *)(a1 + 16) = result;\n  }\n  return result;\n}", "assembly": "; \n; sub_18009E170 from 0x18009e170 to 0x18009e1ac (60 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180044d95\n; > cocos2d::CCMouseDispatcher::removeDelegate @ 0x180045a51\n; > cocos2d::CCMouseDispatcher::addDelegate @ 0x180060ca5\n; > cocos2d::CCTouchDispatcher::removeDelegate @ 0x1800b3176\n; > cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b4405\n; > <???> @ 0x1801b7560\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, 0x18009e170\nsub     rsp, 20h                                                       ; +0x2, 0x18009e172\nmov     r8d, [rcx]                                                     ; +0x6, 0x18009e176\nmov     rbx, rcx                                                       ; +0x9, 0x18009e179\nmov     rax, [rcx+10h]                                                 ; +0xc, 0x18009e17c\nmov     [rax+r8*8], rdx                                                ; +0x10, 0x18009e180\ninc     dword ptr [rcx]                                                ; +0x14, 0x18009e184\nmov     eax, [rcx+4]                                                   ; +0x16, 0x18009e186\ncmp     [rcx], eax                                                     ; +0x19, 0x18009e189\njb      short loc_18009E1A6                                            ; +0x1b, 0x18009e18b\nadd     eax, eax                                                       ; +0x1d, 0x18009e18d\nmov     edx, eax                                                       ; +0x1f, 0x18009e18f\nmov     [rcx+4], eax                                                   ; +0x21, 0x18009e191\nmov     rcx, [rcx+10h]; Block                                          ; +0x24, 0x18009e194\nshl     rdx, 3; Size                                                   ; +0x28, 0x18009e198\ncall    cs:realloc                                                     ; +0x2c, 0x18009e19c\nmov     [rbx+10h], rax                                                 ; +0x32, 0x18009e1a2\nadd     rsp, 20h                                                       ; +0x36, 0x18009e1a6\npop     rbx                                                            ; +0x3a, 0x18009e1aa\nretn                                                                   ; +0x3b, 0x18009e1ab", "xrefs": ["cocos2d::CCKeyboardDispatcher::addDelegate @ 0x180044d95", "cocos2d::CCMouseDispatcher::removeDelegate @ 0x180045a51", "cocos2d::CCMouseDispatcher::addDelegate @ 0x180060ca5", "cocos2d::CCTouchDispatcher::removeDelegate @ 0x1800b3176", "cocos2d::CCKeypadDispatcher::addDelegate @ 0x1800b4405", "<???> @ 0x1801b7560"], "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"}