{"type": "func", "start": 6443098640, "end": 6443098782, "name": "sub_18009E210", "pseudocode": "// \n// sub_18009E210 from 0x18009e210 to 0x18009e29e (142 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf1c\n// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac576\n// > <???> @ 0x1801b7578\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_18009E210(int *a1, __int64 a2, unsigned int a3)\n{\n  int v3; // eax\n  int v5; // ecx\n  unsigned int v6; // ebp\n  __int64 v7; // r14\n  unsigned int v9; // eax\n  void *v10; // rcx\n  __int64 result; // rax\n\n  v3 = *a1;\n  v5 = a1[1];\n  v6 = v3 - a3;\n  v7 = a3;\n  if ( v3 + 1 == v5 )\n  {\n    v9 = 2 * v5;\n    v10 = *((void **)a1 + 2);\n    a1[1] = v9;\n    *((_QWORD *)a1 + 2) = realloc(v10, 8LL * v9);\n  }\n  if ( v6 )\n    memmove(\n      (void *)(*((_QWORD *)a1 + 2) + 8LL * (unsigned int)(v7 + 1)),\n      (const void *)(*((_QWORD *)a1 + 2) + 8 * v7),\n      8LL * v6);\n  result = *((_QWORD *)a1 + 2);\n  ++*a1;\n  *(_QWORD *)(result + 8 * v7) = a2;\n  return result;\n}", "assembly": "; \n; sub_18009E210 from 0x18009e210 to 0x18009e29e (142 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf1c\n; > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac576\n; > <???> @ 0x1801b7578\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, 0x18009e210\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x18009e215\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x18009e21a\npush    rdi                                                            ; +0xf, 0x18009e21f\npush    r14                                                            ; +0x10, 0x18009e220\npush    r15                                                            ; +0x12, 0x18009e222\nsub     rsp, 20h                                                       ; +0x14, 0x18009e224\nmov     eax, [rcx]                                                     ; +0x18, 0x18009e228\nmov     rsi, rcx                                                       ; +0x1a, 0x18009e22a\nmov     ecx, [rcx+4]                                                   ; +0x1d, 0x18009e22d\nmov     ebp, eax                                                       ; +0x20, 0x18009e230\nsub     ebp, r8d                                                       ; +0x22, 0x18009e232\nmov     r14d, r8d                                                      ; +0x25, 0x18009e235\ninc     eax                                                            ; +0x28, 0x18009e238\nmov     r15, rdx                                                       ; +0x2a, 0x18009e23a\ncmp     eax, ecx                                                       ; +0x2d, 0x18009e23d\njnz     short loc_18009E25B                                            ; +0x2f, 0x18009e23f\nlea     eax, [rcx+rcx]                                                 ; +0x31, 0x18009e241\nmov     rcx, [rsi+10h]; Block                                          ; +0x34, 0x18009e244\nmov     edx, eax                                                       ; +0x38, 0x18009e248\nshl     rdx, 3; Size                                                   ; +0x3a, 0x18009e24a\nmov     [rsi+4], eax                                                   ; +0x3e, 0x18009e24e\ncall    cs:realloc                                                     ; +0x41, 0x18009e251\nmov     [rsi+10h], rax                                                 ; +0x47, 0x18009e257\ntest    ebp, ebp                                                       ; +0x4b, 0x18009e25b\njz      short loc_18009E27B                                            ; +0x4d, 0x18009e25d\nmov     r9, [rsi+10h]                                                  ; +0x4f, 0x18009e25f\nlea     eax, [r14+1]                                                   ; +0x53, 0x18009e263\nmov     r8d, ebp                                                       ; +0x57, 0x18009e267\nshl     r8, 3; Size                                                    ; +0x5a, 0x18009e26a\nlea     rdx, [r9+r14*8]; Src                                           ; +0x5e, 0x18009e26e\nlea     rcx, [r9+rax*8]; void *                                        ; +0x62, 0x18009e272\ncall    memmove                                                        ; +0x66, 0x18009e276\nmov     rax, [rsi+10h]                                                 ; +0x6b, 0x18009e27b\ninc     dword ptr [rsi]                                                ; +0x6f, 0x18009e27f\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x71, 0x18009e281\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x76, 0x18009e286\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x7b, 0x18009e28b\nmov     [rax+r14*8], r15                                               ; +0x80, 0x18009e290\nadd     rsp, 20h                                                       ; +0x84, 0x18009e294\npop     r15                                                            ; +0x88, 0x18009e298\npop     r14                                                            ; +0x8a, 0x18009e29a\npop     rdi                                                            ; +0x8c, 0x18009e29c\nretn                                                                   ; +0x8d, 0x18009e29d", "xrefs": ["cocos2d::CCTMXLayer::appendTileForGID @ 0x1800abf1c", "cocos2d::CCTMXLayer::insertTileForGID @ 0x1800ac576", "<???> @ 0x1801b7578"], "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"}