{"type": "func", "start": 6442542640, "end": 6442542928, "name": "sub_180016630", "pseudocode": "// \n// sub_180016630 from 0x180016630 to 0x180016750 (288 bytes)\n// \n// 4 xrefs:\n// > DS_Dictionary::copyFile @ 0x18001926c\n// > DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d826\n// > DS_Dictionary::saveRootSubDictToFile @ 0x18001df37\n// > <???> @ 0x1801b8608\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:24 +0000\n// \n\n// Hidden C++ exception states: #wind=3\n__int64 __fastcall sub_180016630(__int64 a1, __int64 a2, int a3, unsigned int a4, int a5)\n{\n  if ( a5 )\n  {\n    *(_QWORD *)a1 = &unk_1800ED0F8;\n    std::ios::ios(a1 + 176);\n  }\n  std::istream::istream(a1, a1 + 16, 0, 0);\n  *(_QWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1) = &std::ifstream::`vftable';\n  *(_DWORD *)(*(int *)(*(_QWORD *)a1 + 4LL) + a1 - 4) = *(_DWORD *)(*(_QWORD *)a1 + 4LL) - 176;\n  std::streambuf::streambuf(a1 + 16);\n  *(_QWORD *)(a1 + 16) = &std::filebuf::`vftable';\n  *(_BYTE *)(a1 + 140) = 0;\n  *(_BYTE *)(a1 + 129) = 0;\n  std::streambuf::_Init(a1 + 16);\n  *(_QWORD *)(a1 + 144) = 0;\n  *(_QWORD *)(a1 + 132) = qword_1801B2388;\n  *(_QWORD *)(a1 + 120) = 0;\n  if ( !sub_18001C0E0(a1 + 16, a2, a3 | 1u, a4) )\n    std::ios::setstate(a1 + *(int *)(*(_QWORD *)a1 + 4LL), 2, 0);\n  return a1;\n}", "assembly": "; \n; sub_180016630 from 0x180016630 to 0x180016750 (288 bytes)\n; \n; 4 xrefs:\n; > DS_Dictionary::copyFile @ 0x18001926c\n; > DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d826\n; > DS_Dictionary::saveRootSubDictToFile @ 0x18001df37\n; > <???> @ 0x1801b8608\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:24 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180016630\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x180016635\nmov     [rsp+arg_0], rcx                                               ; +0xa, 0x18001663a\npush    rsi                                                            ; +0xf, 0x18001663f\npush    rdi                                                            ; +0x10, 0x180016640\npush    r14                                                            ; +0x11, 0x180016641\nsub     rsp, 30h                                                       ; +0x13, 0x180016643\nmov     ebp, r9d                                                       ; +0x17, 0x180016647\nmov     esi, r8d                                                       ; +0x1a, 0x18001664a\nmov     r14, rdx                                                       ; +0x1d, 0x18001664d\nmov     rdi, rcx                                                       ; +0x20, 0x180016650\nmov     [rsp+48h+arg_10], 0                                            ; +0x23, 0x180016653\ncmp     [rsp+48h+arg_20], 0                                            ; +0x2b, 0x18001665b\njz      short loc_180016682                                            ; +0x30, 0x180016660\nlea     rax, unk_1800ED0F8                                             ; +0x32, 0x180016662\nmov     [rcx], rax                                                     ; +0x39, 0x180016669\nadd     rcx, 0B0h                                                      ; +0x3c, 0x18001666c\ncall    cs:??0?$basic_ios@DU?$char_traits@D@std@@@std@@IEAA@XZ; std::ios::ios(void) ; +0x43, 0x180016673\nnop                                                                    ; +0x49, 0x180016679\nmov     [rsp+48h+arg_10], 1                                            ; +0x4a, 0x18001667a\nxor     r9d, r9d                                                       ; +0x52, 0x180016682\nxor     r8d, r8d                                                       ; +0x55, 0x180016685\nlea     rdx, [rdi+10h]                                                 ; +0x58, 0x180016688\nmov     rcx, rdi                                                       ; +0x5c, 0x18001668c\ncall    cs:??0?$basic_istream@DU?$char_traits@D@std@@@std@@QEAA@PEAV?$basic_streambuf@DU?$char_traits@D@std@@@1@_N@Z; std::istream::istream(std::streambuf *,bool) ; +0x5f, 0x18001668f\nnop                                                                    ; +0x65, 0x180016695\nmov     rax, [rdi]                                                     ; +0x66, 0x180016696\nmovsxd  rcx, dword ptr [rax+4]                                         ; +0x69, 0x180016699\nlea     rax, ??_7?$basic_ifstream@DU?$char_traits@D@std@@@std@@6B@; const std::ifstream::`vftable' ; +0x6d, 0x18001669d\nmov     [rcx+rdi], rax                                                 ; +0x74, 0x1800166a4\nmov     rax, [rdi]                                                     ; +0x78, 0x1800166a8\nmovsxd  rcx, dword ptr [rax+4]                                         ; +0x7b, 0x1800166ab\nlea     edx, [rcx-0B0h]                                                ; +0x7f, 0x1800166af\nmov     [rcx+rdi-4], edx                                               ; +0x85, 0x1800166b5\nlea     rcx, [rdi+10h]                                                 ; +0x89, 0x1800166b9\ncall    cs:??0?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAA@XZ; std::streambuf::streambuf(void) ; +0x8d, 0x1800166bd\nlea     rax, ??_7?$basic_filebuf@DU?$char_traits@D@std@@@std@@6B@; const std::filebuf::`vftable' ; +0x93, 0x1800166c3\nmov     [rdi+10h], rax                                                 ; +0x9a, 0x1800166ca\nmov     byte ptr [rdi+8Ch], 0                                          ; +0x9e, 0x1800166ce\nmov     byte ptr [rdi+81h], 0                                          ; +0xa5, 0x1800166d5\nlea     rcx, [rdi+10h]                                                 ; +0xac, 0x1800166dc\ncall    cs:?_Init@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXXZ; std::streambuf::_Init(void) ; +0xb0, 0x1800166e0\nmov     qword ptr [rdi+90h], 0                                         ; +0xb6, 0x1800166e6\nmov     rax, cs:qword_1801B2388                                        ; +0xc1, 0x1800166f1\nmov     [rdi+84h], rax                                                 ; +0xc8, 0x1800166f8\nmov     qword ptr [rdi+78h], 0                                         ; +0xcf, 0x1800166ff\nor      esi, 1                                                         ; +0xd7, 0x180016707\nmov     r9d, ebp                                                       ; +0xda, 0x18001670a\nmov     r8d, esi                                                       ; +0xdd, 0x18001670d\nmov     rdx, r14                                                       ; +0xe0, 0x180016710\nlea     rcx, [rdi+10h]                                                 ; +0xe3, 0x180016713\ncall    sub_18001C0E0                                                  ; +0xe7, 0x180016717\ntest    rax, rax                                                       ; +0xec, 0x18001671c\njnz     short loc_18001673A                                            ; +0xef, 0x18001671f\nmov     rax, [rdi]                                                     ; +0xf1, 0x180016721\nmovsxd  rcx, dword ptr [rax+4]                                         ; +0xf4, 0x180016724\nadd     rcx, rdi                                                       ; +0xf8, 0x180016728\nxor     r8d, r8d                                                       ; +0xfb, 0x18001672b\nmov     edx, 2                                                         ; +0xfe, 0x18001672e\ncall    cs:?setstate@?$basic_ios@DU?$char_traits@D@std@@@std@@QEAAXH_N@Z; std::ios::setstate(int,bool) ; +0x103, 0x180016733\nnop                                                                    ; +0x109, 0x180016739\nmov     rax, rdi                                                       ; +0x10a, 0x18001673a\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x10d, 0x18001673d\nmov     rbp, [rsp+48h+arg_18]                                          ; +0x112, 0x180016742\nadd     rsp, 30h                                                       ; +0x117, 0x180016747\npop     r14                                                            ; +0x11b, 0x18001674b\npop     rdi                                                            ; +0x11d, 0x18001674d\npop     rsi                                                            ; +0x11e, 0x18001674e\nretn                                                                   ; +0x11f, 0x18001674f", "xrefs": ["DS_Dictionary::copyFile @ 0x18001926c", "DS_Dictionary::saveRootSubDictToCompressedFile @ 0x18001d826", "DS_Dictionary::saveRootSubDictToFile @ 0x18001df37", "<???> @ 0x1801b8608"], "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"}