{"type": "func", "start": 6442550176, "end": 6442550316, "name": "sub_1800183A0", "pseudocode": "// \n// sub_1800183A0 from 0x1800183a0 to 0x18001842c (140 bytes)\n// \n// 2 xrefs:\n// > sub_1800180E8 @ 0x1800180ef\n// > <???> @ 0x1801b88a8\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:21:25 +0000\n// \n\nvoid *__fastcall sub_1800183A0(__int64 a1, char a2)\n{\n  void *v2; // rsi\n  __int64 v5; // r8\n\n  v2 = (void *)(a1 - 168);\n  *(_QWORD *)(*(int *)(*(_QWORD *)(a1 - 168) + 4LL) + a1 - 168) = &std::ofstream::`vftable';\n  v5 = *(int *)(*(_QWORD *)(a1 - 168) + 4LL);\n  *(_DWORD *)(v5 + a1 - 172) = v5 - 168;\n  sub_180017410(a1 - 168 + 8);\n  std::ostream::~ostream<char,std::char_traits<char>>(a1 - 152);\n  std::ios::~ios<char,std::char_traits<char>>(a1);\n  if ( (a2 & 1) != 0 )\n    j_j_free_0(v2);\n  return v2;\n}", "assembly": "; \n; sub_1800183A0 from 0x1800183a0 to 0x18001842c (140 bytes)\n; \n; 2 xrefs:\n; > sub_1800180E8 @ 0x1800180ef\n; > <???> @ 0x1801b88a8\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:21:25 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800183a0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800183a5\npush    rdi                                                            ; +0xa, 0x1800183aa\nsub     rsp, 20h                                                       ; +0xb, 0x1800183ab\nlea     rsi, [rcx-0A8h]                                                ; +0xf, 0x1800183af\nmov     rbx, rcx                                                       ; +0x16, 0x1800183b6\nmov     rax, [rsi]                                                     ; +0x19, 0x1800183b9\nmov     edi, edx                                                       ; +0x1c, 0x1800183bc\nmovsxd  r8, dword ptr [rax+4]                                          ; +0x1e, 0x1800183be\nlea     rax, ??_7?$basic_ofstream@DU?$char_traits@D@std@@@std@@6B@; const std::ofstream::`vftable' ; +0x22, 0x1800183c2\nmov     [r8+rcx-0A8h], rax                                             ; +0x29, 0x1800183c9\nmov     rax, [rsi]                                                     ; +0x31, 0x1800183d1\nmovsxd  r8, dword ptr [rax+4]                                          ; +0x34, 0x1800183d4\nlea     r9d, [r8-0A8h]                                                 ; +0x38, 0x1800183d8\nmov     [r8+rcx-0ACh], r9d                                             ; +0x3f, 0x1800183df\nlea     rcx, [rsi+8]                                                   ; +0x47, 0x1800183e7\ncall    sub_180017410                                                  ; +0x4b, 0x1800183eb\nlea     rcx, [rbx-98h]                                                 ; +0x50, 0x1800183f0\ncall    cs:??1?$basic_ostream@DU?$char_traits@D@std@@@std@@UEAA@XZ; std::ostream::~ostream<char,std::char_traits<char>>(void) ; +0x57, 0x1800183f7\nmov     rcx, rbx                                                       ; +0x5d, 0x1800183fd\ncall    cs:??1?$basic_ios@DU?$char_traits@D@std@@@std@@UEAA@XZ; std::ios::~ios<char,std::char_traits<char>>(void) ; +0x60, 0x180018400\ntest    dil, 1                                                         ; +0x66, 0x180018406\njz      short loc_180018419                                            ; +0x6a, 0x18001840a\nmov     edx, 108h                                                      ; +0x6c, 0x18001840c\nmov     rcx, rsi; Block                                                ; +0x71, 0x180018411\ncall    j_j_free_0                                                     ; +0x74, 0x180018414\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x79, 0x180018419\nmov     rax, rsi                                                       ; +0x7e, 0x18001841e\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x81, 0x180018421\nadd     rsp, 20h                                                       ; +0x86, 0x180018426\npop     rdi                                                            ; +0x8a, 0x18001842a\nretn                                                                   ; +0x8b, 0x18001842b", "xrefs": ["sub_1800180E8 @ 0x1800180ef", "<???> @ 0x1801b88a8"], "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"}