{"type": "func", "start": 6442589952, "end": 6442590076, "name": "sub_180021F00", "pseudocode": "// \n// sub_180021F00 from 0x180021f00 to 0x180021f7c (124 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800ed0a0\n// > <???> @ 0x1801b8f20\n// > <???> @ 0x1801b8f2c\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:28 +0000\n// \n\n__int64 __fastcall sub_180021F00(__int64 a1)\n{\n  unsigned __int64 v2; // rbx\n  __int64 result; // rax\n  unsigned int v4; // ebx\n\n  if ( std::streambuf::gptr(a1) )\n  {\n    v2 = std::streambuf::egptr(a1);\n    if ( std::streambuf::gptr(a1) < v2 )\n      return *(unsigned __int8 *)std::streambuf::gptr(a1);\n  }\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 56LL))(a1);\n  v4 = result;\n  if ( (_DWORD)result != -1 )\n  {\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 32LL))(a1, (unsigned int)result);\n    return v4;\n  }\n  return result;\n}", "assembly": "; \n; sub_180021F00 from 0x180021f00 to 0x180021f7c (124 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800ed0a0\n; > <???> @ 0x1801b8f20\n; > <???> @ 0x1801b8f2c\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:28 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x180021f00\npush    rdi                                                            ; +0x5, 0x180021f05\nsub     rsp, 20h                                                       ; +0x6, 0x180021f06\nmov     rdi, rcx                                                       ; +0xa, 0x180021f0a\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0xd, 0x180021f0d\ntest    rax, rax                                                       ; +0x13, 0x180021f13\njz      short loc_180021F49                                            ; +0x16, 0x180021f16\nmov     rcx, rdi                                                       ; +0x18, 0x180021f18\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0x1b, 0x180021f1b\nmov     rcx, rdi                                                       ; +0x21, 0x180021f21\nmov     rbx, rax                                                       ; +0x24, 0x180021f24\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x27, 0x180021f27\ncmp     rax, rbx                                                       ; +0x2d, 0x180021f2d\njnb     short loc_180021F49                                            ; +0x30, 0x180021f30\nmov     rcx, rdi                                                       ; +0x32, 0x180021f32\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x35, 0x180021f35\nmovzx   eax, byte ptr [rax]                                            ; +0x3b, 0x180021f3b\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x3e, 0x180021f3e\nadd     rsp, 20h                                                       ; +0x43, 0x180021f43\npop     rdi                                                            ; +0x47, 0x180021f47\nretn                                                                   ; +0x48, 0x180021f48\nmov     rax, [rdi]                                                     ; +0x49, 0x180021f49\nmov     rcx, rdi                                                       ; +0x4c, 0x180021f4c\ncall    qword ptr [rax+38h]                                            ; +0x4f, 0x180021f4f\nmov     ebx, eax                                                       ; +0x52, 0x180021f52\ncmp     eax, 0FFFFFFFFh                                                ; +0x54, 0x180021f54\njnz     short loc_180021F64                                            ; +0x57, 0x180021f57\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x59, 0x180021f59\nadd     rsp, 20h                                                       ; +0x5e, 0x180021f5e\npop     rdi                                                            ; +0x62, 0x180021f62\nretn                                                                   ; +0x63, 0x180021f63\nmov     rax, [rdi]                                                     ; +0x64, 0x180021f64\nmov     edx, ebx                                                       ; +0x67, 0x180021f67\nmov     rcx, rdi                                                       ; +0x69, 0x180021f69\ncall    qword ptr [rax+20h]                                            ; +0x6c, 0x180021f6c\nmov     eax, ebx                                                       ; +0x6f, 0x180021f6f\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x71, 0x180021f71\nadd     rsp, 20h                                                       ; +0x76, 0x180021f76\npop     rdi                                                            ; +0x7a, 0x180021f7a\nretn                                                                   ; +0x7b, 0x180021f7b", "xrefs": ["<???> @ 0x1800ed0a0", "<???> @ 0x1801b8f20", "<???> @ 0x1801b8f2c"], "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"}