{"type": "func", "start": 6442566992, "end": 6442567274, "name": "sub_18001C550", "pseudocode": "// \n// sub_18001C550 from 0x18001c550 to 0x18001c66a (282 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800ed090\n// > <???> @ 0x1801b8b90\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:26 +0000\n// \n\n__int64 __fastcall sub_18001C550(_QWORD *a1, unsigned int a2)\n{\n  unsigned __int64 v4; // rbx\n  FILE *v6; // rdx\n  _BYTE *v7; // rbx\n\n  if ( std::streambuf::gptr(a1) )\n  {\n    v4 = std::streambuf::eback(a1);\n    if ( v4 < std::streambuf::gptr(a1) && (a2 == -1 || *(unsigned __int8 *)(std::streambuf::gptr(a1) - 1) == a2) )\n    {\n      std::streambuf::_Gndec(a1);\n      if ( a2 == -1 )\n        return 0;\n      return a2;\n    }\n  }\n  v6 = (FILE *)a1[16];\n  if ( !v6 || a2 == -1 )\n    return 0xFFFFFFFFLL;\n  if ( !a1[13] && ungetc((unsigned __int8)a2, v6) != -1 )\n    return a2;\n  v7 = a1 + 14;\n  if ( (_QWORD *)std::streambuf::gptr(a1) == a1 + 14 )\n    return 0xFFFFFFFFLL;\n  *v7 = a2;\n  if ( (_BYTE *)std::streambuf::eback(a1) != v7 )\n  {\n    a1[17] = std::streambuf::eback(a1);\n    a1[18] = std::streambuf::egptr(a1);\n  }\n  std::streambuf::setg(a1, a1 + 14, a1 + 14, (char *)a1 + 113);\n  return a2;\n}", "assembly": "; \n; sub_18001C550 from 0x18001c550 to 0x18001c66a (282 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800ed090\n; > <???> @ 0x1801b8b90\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:26 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x18001c550\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18001c555\npush    rdi                                                            ; +0xa, 0x18001c55a\nsub     rsp, 20h                                                       ; +0xb, 0x18001c55b\nmov     esi, edx                                                       ; +0xf, 0x18001c55f\nmov     rdi, rcx                                                       ; +0x11, 0x18001c561\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x14, 0x18001c564\ntest    rax, rax                                                       ; +0x1a, 0x18001c56a\njz      short loc_18001C5C2                                            ; +0x1d, 0x18001c56d\nmov     rcx, rdi                                                       ; +0x1f, 0x18001c56f\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x22, 0x18001c572\nmov     rcx, rdi                                                       ; +0x28, 0x18001c578\nmov     rbx, rax                                                       ; +0x2b, 0x18001c57b\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x2e, 0x18001c57e\ncmp     rbx, rax                                                       ; +0x34, 0x18001c584\njnb     short loc_18001C5C2                                            ; +0x37, 0x18001c587\ncmp     esi, 0FFFFFFFFh                                                ; +0x39, 0x18001c589\njz      short loc_18001C59F                                            ; +0x3c, 0x18001c58c\nmov     rcx, rdi                                                       ; +0x3e, 0x18001c58e\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x41, 0x18001c591\nmovzx   ecx, byte ptr [rax-1]                                          ; +0x47, 0x18001c597\ncmp     ecx, esi                                                       ; +0x4b, 0x18001c59b\njnz     short loc_18001C5C2                                            ; +0x4d, 0x18001c59d\nmov     rcx, rdi                                                       ; +0x4f, 0x18001c59f\ncall    cs:?_Gndec@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAPEADXZ; std::streambuf::_Gndec(void) ; +0x52, 0x18001c5a2\nxor     eax, eax                                                       ; +0x58, 0x18001c5a8\ncmp     esi, 0FFFFFFFFh                                                ; +0x5a, 0x18001c5aa\ncmovz   esi, eax                                                       ; +0x5d, 0x18001c5ad\nmov     eax, esi                                                       ; +0x60, 0x18001c5b0\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x62, 0x18001c5b2\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x67, 0x18001c5b7\nadd     rsp, 20h                                                       ; +0x6c, 0x18001c5bc\npop     rdi                                                            ; +0x70, 0x18001c5c0\nretn                                                                   ; +0x71, 0x18001c5c1\nmov     rdx, [rdi+80h]; Stream                                         ; +0x72, 0x18001c5c2\ntest    rdx, rdx                                                       ; +0x79, 0x18001c5c9\njz      loc_18001C655                                                  ; +0x7c, 0x18001c5cc\ncmp     esi, 0FFFFFFFFh                                                ; +0x82, 0x18001c5d2\njz      short loc_18001C655                                            ; +0x85, 0x18001c5d5\ncmp     qword ptr [rdi+68h], 0                                         ; +0x87, 0x18001c5d7\njnz     short loc_18001C5ED                                            ; +0x8c, 0x18001c5dc\nmovzx   ecx, sil; Character                                            ; +0x8e, 0x18001c5de\ncall    cs:ungetc                                                      ; +0x92, 0x18001c5e2\ncmp     eax, 0FFFFFFFFh                                                ; +0x98, 0x18001c5e8\njnz     short loc_18001C5B0                                            ; +0x9b, 0x18001c5eb\nmov     rcx, rdi                                                       ; +0x9d, 0x18001c5ed\nlea     rbx, [rdi+70h]                                                 ; +0xa0, 0x18001c5f0\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0xa4, 0x18001c5f4\ncmp     rax, rbx                                                       ; +0xaa, 0x18001c5fa\njz      short loc_18001C655                                            ; +0xad, 0x18001c5fd\nmov     rcx, rdi                                                       ; +0xaf, 0x18001c5ff\nmov     [rbx], sil                                                     ; +0xb2, 0x18001c602\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0xb5, 0x18001c605\ncmp     rax, rbx                                                       ; +0xbb, 0x18001c60b\njz      short loc_18001C630                                            ; +0xbe, 0x18001c60e\nmov     rcx, rdi                                                       ; +0xc0, 0x18001c610\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0xc3, 0x18001c613\nmov     rcx, rdi                                                       ; +0xc9, 0x18001c619\nmov     [rdi+88h], rax                                                 ; +0xcc, 0x18001c61c\ncall    cs:?egptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::egptr(void) ; +0xd3, 0x18001c623\nmov     [rdi+90h], rax                                                 ; +0xd9, 0x18001c629\nlea     r9, [rdi+71h]                                                  ; +0xe0, 0x18001c630\nmov     r8, rbx                                                        ; +0xe4, 0x18001c634\nmov     rdx, rbx                                                       ; +0xe7, 0x18001c637\nmov     rcx, rdi                                                       ; +0xea, 0x18001c63a\ncall    cs:?setg@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXPEAD00@Z; std::streambuf::setg(char *,char *,char *) ; +0xed, 0x18001c63d\nmov     eax, esi                                                       ; +0xf3, 0x18001c643\nmov     rbx, [rsp+28h+arg_0]                                           ; +0xf5, 0x18001c645\nmov     rsi, [rsp+28h+arg_8]                                           ; +0xfa, 0x18001c64a\nadd     rsp, 20h                                                       ; +0xff, 0x18001c64f\npop     rdi                                                            ; +0x103, 0x18001c653\nretn                                                                   ; +0x104, 0x18001c654\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x105, 0x18001c655\nmov     eax, 0FFFFFFFFh                                                ; +0x10a, 0x18001c65a\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x10f, 0x18001c65f\nadd     rsp, 20h                                                       ; +0x114, 0x18001c664\npop     rdi                                                            ; +0x118, 0x18001c668\nretn                                                                   ; +0x119, 0x18001c669", "xrefs": ["<???> @ 0x1800ed090", "<???> @ 0x1801b8b90"], "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"}