{"type": "func", "start": 6443114144, "end": 6443114286, "name": "sub_1800A1EA0", "pseudocode": "// \n// sub_1800A1EA0 from 0x1800a1ea0 to 0x1800a1f2e (142 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af70c\n// > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd76\n// > <???> @ 0x1801c1818\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_1800A1EA0(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_1800A1EA0 from 0x1800a1ea0 to 0x1800a1f2e (142 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af70c\n; > cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd76\n; > <???> @ 0x1801c1818\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, 0x1800a1ea0\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800a1ea5\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800a1eaa\npush    rdi                                                            ; +0xf, 0x1800a1eaf\npush    r14                                                            ; +0x10, 0x1800a1eb0\npush    r15                                                            ; +0x12, 0x1800a1eb2\nsub     rsp, 20h                                                       ; +0x14, 0x1800a1eb4\nmov     eax, [rcx]                                                     ; +0x18, 0x1800a1eb8\nmov     rsi, rcx                                                       ; +0x1a, 0x1800a1eba\nmov     ecx, [rcx+4]                                                   ; +0x1d, 0x1800a1ebd\nmov     ebp, eax                                                       ; +0x20, 0x1800a1ec0\nsub     ebp, r8d                                                       ; +0x22, 0x1800a1ec2\nmov     r14d, r8d                                                      ; +0x25, 0x1800a1ec5\ninc     eax                                                            ; +0x28, 0x1800a1ec8\nmov     r15, rdx                                                       ; +0x2a, 0x1800a1eca\ncmp     eax, ecx                                                       ; +0x2d, 0x1800a1ecd\njnz     short loc_1800A1EEB                                            ; +0x2f, 0x1800a1ecf\nlea     eax, [rcx+rcx]                                                 ; +0x31, 0x1800a1ed1\nmov     rcx, [rsi+10h]; Block                                          ; +0x34, 0x1800a1ed4\nmov     edx, eax                                                       ; +0x38, 0x1800a1ed8\nshl     rdx, 3; Size                                                   ; +0x3a, 0x1800a1eda\nmov     [rsi+4], eax                                                   ; +0x3e, 0x1800a1ede\ncall    cs:realloc                                                     ; +0x41, 0x1800a1ee1\nmov     [rsi+10h], rax                                                 ; +0x47, 0x1800a1ee7\ntest    ebp, ebp                                                       ; +0x4b, 0x1800a1eeb\njz      short loc_1800A1F0B                                            ; +0x4d, 0x1800a1eed\nmov     r9, [rsi+10h]                                                  ; +0x4f, 0x1800a1eef\nlea     eax, [r14+1]                                                   ; +0x53, 0x1800a1ef3\nmov     r8d, ebp                                                       ; +0x57, 0x1800a1ef7\nshl     r8, 3; Size                                                    ; +0x5a, 0x1800a1efa\nlea     rdx, [r9+r14*8]; Src                                           ; +0x5e, 0x1800a1efe\nlea     rcx, [r9+rax*8]; void *                                        ; +0x62, 0x1800a1f02\ncall    memmove                                                        ; +0x66, 0x1800a1f06\nmov     rax, [rsi+10h]                                                 ; +0x6b, 0x1800a1f0b\ninc     dword ptr [rsi]                                                ; +0x6f, 0x1800a1f0f\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x71, 0x1800a1f11\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x76, 0x1800a1f16\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x7b, 0x1800a1f1b\nmov     [rax+r14*8], r15                                               ; +0x80, 0x1800a1f20\nadd     rsp, 20h                                                       ; +0x84, 0x1800a1f24\npop     r15                                                            ; +0x88, 0x1800a1f28\npop     r14                                                            ; +0x8a, 0x1800a1f2a\npop     rdi                                                            ; +0x8c, 0x1800a1f2c\nretn                                                                   ; +0x8d, 0x1800a1f2d", "xrefs": ["cocos2d::CCTMXLayer::appendTileForGID @ 0x1800af70c", "cocos2d::CCTMXLayer::insertTileForGID @ 0x1800afd76", "<???> @ 0x1801c1818"], "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"}