{"type": "func", "start": 6442724896, "end": 6442725029, "name": "sub_180042E20", "pseudocode": "// \n// sub_180042E20 from 0x180042e20 to 0x180042ea5 (133 bytes)\n// \n// 2 xrefs:\n// > sub_180046C10 @ 0x180046d3b\n// > <???> @ 0x1801f80c4\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 10:53:12 +0000\n// \n\n__int64 __fastcall sub_180042E20(__int64 a1, unsigned int a2)\n{\n  size_t v4; // rsi\n  void *v5; // rax\n  void *v6; // rax\n\n  if ( *(_DWORD *)(a1 + 16) >= a2 )\n    return 1;\n  v4 = 4LL * (unsigned int)(1 << a2);\n  v5 = j__realloc_base(*(void **)a1, v4);\n  *(_QWORD *)a1 = v5;\n  if ( v5 )\n  {\n    v6 = j__realloc_base(*(void **)(a1 + 8), v4);\n    *(_QWORD *)(a1 + 8) = v6;\n    if ( v6 )\n    {\n      memset(v6, 0, v4);\n      *(_DWORD *)(a1 + 16) = a2;\n      return 1;\n    }\n  }\n  return 0;\n}", "assembly": "; \n; sub_180042E20 from 0x180042e20 to 0x180042ea5 (133 bytes)\n; \n; 2 xrefs:\n; > sub_180046C10 @ 0x180046d3b\n; > <???> @ 0x1801f80c4\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 10:53:12 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180042e20\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x180042e25\npush    rdi                                                            ; +0xa, 0x180042e2a\nsub     rsp, 20h                                                       ; +0xb, 0x180042e2b\nmov     edi, edx                                                       ; +0xf, 0x180042e2f\nmov     rbx, rcx                                                       ; +0x11, 0x180042e31\ncmp     [rcx+10h], edx                                                 ; +0x14, 0x180042e34\njnb     short loc_180042E7E                                            ; +0x17, 0x180042e37\nmov     ecx, edx                                                       ; +0x19, 0x180042e39\nmov     esi, 1                                                         ; +0x1b, 0x180042e3b\nshl     esi, cl                                                        ; +0x20, 0x180042e40\nmov     rcx, [rbx]; Block                                              ; +0x22, 0x180042e42\nshl     rsi, 2                                                         ; +0x25, 0x180042e45\nmov     rdx, rsi; Size                                                 ; +0x29, 0x180042e49\ncall    j__realloc_base                                                ; +0x2c, 0x180042e4c\nmov     [rbx], rax                                                     ; +0x31, 0x180042e51\ntest    rax, rax                                                       ; +0x34, 0x180042e54\njz      short loc_180042E93                                            ; +0x37, 0x180042e57\nmov     rcx, [rbx+8]; Block                                            ; +0x39, 0x180042e59\nmov     rdx, rsi; Size                                                 ; +0x3d, 0x180042e5d\ncall    j__realloc_base                                                ; +0x40, 0x180042e60\nmov     [rbx+8], rax                                                   ; +0x45, 0x180042e65\ntest    rax, rax                                                       ; +0x49, 0x180042e69\njz      short loc_180042E93                                            ; +0x4c, 0x180042e6c\nmov     r8, rsi; Size                                                  ; +0x4e, 0x180042e6e\nxor     edx, edx; Val                                                  ; +0x51, 0x180042e71\nmov     rcx, rax; void *                                               ; +0x53, 0x180042e73\ncall    memset                                                         ; +0x56, 0x180042e76\nmov     [rbx+10h], edi                                                 ; +0x5b, 0x180042e7b\nmov     eax, 1                                                         ; +0x5e, 0x180042e7e\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x63, 0x180042e83\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x68, 0x180042e88\nadd     rsp, 20h                                                       ; +0x6d, 0x180042e8d\npop     rdi                                                            ; +0x71, 0x180042e91\nretn                                                                   ; +0x72, 0x180042e92\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x73, 0x180042e93\nxor     eax, eax                                                       ; +0x78, 0x180042e98\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x7a, 0x180042e9a\nadd     rsp, 20h                                                       ; +0x7f, 0x180042e9f\npop     rdi                                                            ; +0x83, 0x180042ea3\nretn                                                                   ; +0x84, 0x180042ea4", "xrefs": ["sub_180046C10 @ 0x180046d3b", "<???> @ 0x1801f80c4"], "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"}