{"type": "func", "start": 6442567280, "end": 6442567421, "name": "sub_18001C670", "pseudocode": "// \n// sub_18001C670 from 0x18001c670 to 0x18001c6fd (141 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1800ecbe8\n// > <???> @ 0x1801b8b9c\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_18001C670(__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_18001C670 from 0x18001c670 to 0x18001c6fd (141 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1800ecbe8\n; > <???> @ 0x1801b8b9c\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, 0x18001c670\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x18001c675\npush    rdi                                                            ; +0xa, 0x18001c67a\nsub     rsp, 20h                                                       ; +0xb, 0x18001c67b\nmov     ebx, edx                                                       ; +0xf, 0x18001c67f\nmov     rdi, rcx                                                       ; +0x11, 0x18001c681\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x14, 0x18001c684\nmov     rsi, rax                                                       ; +0x1a, 0x18001c68a\ntest    rax, rax                                                       ; +0x1d, 0x18001c68d\njz      short loc_18001C6E8                                            ; +0x20, 0x18001c690\nmov     rcx, rdi                                                       ; +0x22, 0x18001c692\ncall    cs:?eback@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::eback(void) ; +0x25, 0x18001c695\ncmp     rsi, rax                                                       ; +0x2b, 0x18001c69b\njbe     short loc_18001C6E8                                            ; +0x2e, 0x18001c69e\ncmp     ebx, 0FFFFFFFFh                                                ; +0x30, 0x18001c6a0\njz      short loc_18001C6B0                                            ; +0x33, 0x18001c6a3\ncmp     bl, [rsi-1]                                                    ; +0x35, 0x18001c6a5\njz      short loc_18001C6B0                                            ; +0x38, 0x18001c6a8\ntest    byte ptr [rdi+70h], 2                                          ; +0x3a, 0x18001c6aa\njnz     short loc_18001C6E8                                            ; +0x3e, 0x18001c6ae\nmov     edx, 0FFFFFFFFh                                                ; +0x40, 0x18001c6b0\nmov     rcx, rdi                                                       ; +0x45, 0x18001c6b5\ncall    cs:?gbump@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEAAXH@Z; std::streambuf::gbump(int) ; +0x48, 0x18001c6b8\ncmp     ebx, 0FFFFFFFFh                                                ; +0x4e, 0x18001c6be\njz      short loc_18001C6CE                                            ; +0x51, 0x18001c6c1\nmov     rcx, rdi                                                       ; +0x53, 0x18001c6c3\ncall    cs:?gptr@?$basic_streambuf@DU?$char_traits@D@std@@@std@@IEBAPEADXZ; std::streambuf::gptr(void) ; +0x56, 0x18001c6c6\nmov     [rax], bl                                                      ; +0x5c, 0x18001c6cc\nxor     eax, eax                                                       ; +0x5e, 0x18001c6ce\ncmp     ebx, 0FFFFFFFFh                                                ; +0x60, 0x18001c6d0\ncmovz   ebx, eax                                                       ; +0x63, 0x18001c6d3\nmov     eax, ebx                                                       ; +0x66, 0x18001c6d6\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x68, 0x18001c6d8\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x6d, 0x18001c6dd\nadd     rsp, 20h                                                       ; +0x72, 0x18001c6e2\npop     rdi                                                            ; +0x76, 0x18001c6e6\nretn                                                                   ; +0x77, 0x18001c6e7\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x78, 0x18001c6e8\nmov     eax, 0FFFFFFFFh                                                ; +0x7d, 0x18001c6ed\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x82, 0x18001c6f2\nadd     rsp, 20h                                                       ; +0x87, 0x18001c6f7\npop     rdi                                                            ; +0x8b, 0x18001c6fb\nretn                                                                   ; +0x8c, 0x18001c6fc", "xrefs": ["<???> @ 0x1800ecbe8", "<???> @ 0x1801b8b9c"], "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"}