{"type": "func", "start": 6442588624, "end": 6442588748, "name": "sub_1800219D0", "pseudocode": "// \n// sub_1800219D0 from 0x1800219d0 to 0x180021a4c (124 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800e7040\n// > <???> @ 0x1801aee48\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n__int64 __fastcall sub_1800219D0(__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_1800219D0 from 0x1800219d0 to 0x180021a4c (124 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800e7040\n; > <???> @ 0x1801aee48\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800219d0\npush    rdi                                                            ; +0x5, 0x1800219d5\nsub     rsp, 20h                                                       ; +0x6, 0x1800219d6\nmov     rdi, rcx                                                       ; +0xa, 0x1800219da\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0xd, 0x1800219dd\ntest    rax, rax                                                       ; +0x13, 0x1800219e3\njz      short loc_180021A19                                            ; +0x16, 0x1800219e6\nmov     rcx, rdi                                                       ; +0x18, 0x1800219e8\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0x1b, 0x1800219eb\nmov     rcx, rdi                                                       ; +0x21, 0x1800219f1\nmov     rbx, rax                                                       ; +0x24, 0x1800219f4\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x27, 0x1800219f7\ncmp     rax, rbx                                                       ; +0x2d, 0x1800219fd\njnb     short loc_180021A19                                            ; +0x30, 0x180021a00\nmov     rcx, rdi                                                       ; +0x32, 0x180021a02\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x35, 0x180021a05\nmovzx   eax, byte ptr [rax]                                            ; +0x3b, 0x180021a0b\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x3e, 0x180021a0e\nadd     rsp, 20h                                                       ; +0x43, 0x180021a13\npop     rdi                                                            ; +0x47, 0x180021a17\nretn                                                                   ; +0x48, 0x180021a18\nmov     rax, [rdi]                                                     ; +0x49, 0x180021a19\nmov     rcx, rdi                                                       ; +0x4c, 0x180021a1c\ncall    qword ptr [rax+38h]                                            ; +0x4f, 0x180021a1f\nmov     ebx, eax                                                       ; +0x52, 0x180021a22\ncmp     eax, 0FFFFFFFFh                                                ; +0x54, 0x180021a24\njnz     short loc_180021A34                                            ; +0x57, 0x180021a27\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x59, 0x180021a29\nadd     rsp, 20h                                                       ; +0x5e, 0x180021a2e\npop     rdi                                                            ; +0x62, 0x180021a32\nretn                                                                   ; +0x63, 0x180021a33\nmov     rax, [rdi]                                                     ; +0x64, 0x180021a34\nmov     edx, ebx                                                       ; +0x67, 0x180021a37\nmov     rcx, rdi                                                       ; +0x69, 0x180021a39\ncall    qword ptr [rax+20h]                                            ; +0x6c, 0x180021a3c\nmov     eax, ebx                                                       ; +0x6f, 0x180021a3f\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x71, 0x180021a41\nadd     rsp, 20h                                                       ; +0x76, 0x180021a46\npop     rdi                                                            ; +0x7a, 0x180021a4a\nretn                                                                   ; +0x7b, 0x180021a4b", "xrefs": ["<???> @ 0x1800e7040", "<???> @ 0x1801aee48"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}