{"type": "func", "start": 6442567696, "end": 6442567837, "name": "sub_18001C810", "pseudocode": "// \n// sub_18001C810 from 0x18001c810 to 0x18001c89d (141 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800e6b98\n// > <???> @ 0x1801aeb18\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_18001C810(__int64 a1, unsigned int a2)\n{\n  unsigned __int64 v4; // rsi\n\n  v4 = std::streambuf::gptr(a1);\n  if ( !v4\n    || v4 <= std::streambuf::eback(a1)\n    || a2 != -1 && (_BYTE)a2 != *(_BYTE *)(v4 - 1) && (*(_BYTE *)(a1 + 112) & 2) != 0 )\n  {\n    return 0xFFFFFFFFLL;\n  }\n  std::streambuf::gbump(a1, 0xFFFFFFFFLL);\n  if ( a2 == -1 )\n    return 0;\n  else\n    *(_BYTE *)std::streambuf::gptr(a1) = a2;\n  return a2;\n}", "assembly": "; \n; sub_18001C810 from 0x18001c810 to 0x18001c89d (141 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800e6b98\n; > <???> @ 0x1801aeb18\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, 0x18001c810\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18001c815\npush    rdi                                                            ; +0xa, 0x18001c81a\nsub     rsp, 20h                                                       ; +0xb, 0x18001c81b\nmov     ebx, edx                                                       ; +0xf, 0x18001c81f\nmov     rdi, rcx                                                       ; +0x11, 0x18001c821\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x14, 0x18001c824\nmov     rsi, rax                                                       ; +0x1a, 0x18001c82a\ntest    rax, rax                                                       ; +0x1d, 0x18001c82d\njz      short loc_18001C888                                            ; +0x20, 0x18001c830\nmov     rcx, rdi                                                       ; +0x22, 0x18001c832\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x25, 0x18001c835\ncmp     rsi, rax                                                       ; +0x2b, 0x18001c83b\njbe     short loc_18001C888                                            ; +0x2e, 0x18001c83e\ncmp     ebx, 0FFFFFFFFh                                                ; +0x30, 0x18001c840\njz      short loc_18001C850                                            ; +0x33, 0x18001c843\ncmp     bl, [rsi-1]                                                    ; +0x35, 0x18001c845\njz      short loc_18001C850                                            ; +0x38, 0x18001c848\ntest    byte ptr [rdi+70h], 2                                          ; +0x3a, 0x18001c84a\njnz     short loc_18001C888                                            ; +0x3e, 0x18001c84e\nmov     edx, 0FFFFFFFFh                                                ; +0x40, 0x18001c850\nmov     rcx, rdi                                                       ; +0x45, 0x18001c855\ncall    cs:?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z; std::streambuf::gbump(int) ; +0x48, 0x18001c858\ncmp     ebx, 0FFFFFFFFh                                                ; +0x4e, 0x18001c85e\njz      short loc_18001C86E                                            ; +0x51, 0x18001c861\nmov     rcx, rdi                                                       ; +0x53, 0x18001c863\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x56, 0x18001c866\nmov     [rax], bl                                                      ; +0x5c, 0x18001c86c\nxor     eax, eax                                                       ; +0x5e, 0x18001c86e\ncmp     ebx, 0FFFFFFFFh                                                ; +0x60, 0x18001c870\ncmovz   ebx, eax                                                       ; +0x63, 0x18001c873\nmov     eax, ebx                                                       ; +0x66, 0x18001c876\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x68, 0x18001c878\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6d, 0x18001c87d\nadd     rsp, 20h                                                       ; +0x72, 0x18001c882\npop     rdi                                                            ; +0x76, 0x18001c886\nretn                                                                   ; +0x77, 0x18001c887\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x18001c888\nmov     eax, 0FFFFFFFFh                                                ; +0x7d, 0x18001c88d\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x82, 0x18001c892\nadd     rsp, 20h                                                       ; +0x87, 0x18001c897\npop     rdi                                                            ; +0x8b, 0x18001c89b\nretn                                                                   ; +0x8c, 0x18001c89c", "xrefs": ["<???> @ 0x1800e6b98", "<???> @ 0x1801aeb18"], "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"}