//
// sub_18001E630 from 0x18001e630 to 0x18001e6e0 (176 bytes)
//
// 2 xrefs:
// > ??> @ 0x1800ed0c8
// > ??> @ 0x1801b8cf8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:21:27 +0000
//
fpos_t *__fastcall sub_18001E630(__int64 a1, fpos_t *a2, _QWORD *a3)
{
bool v5; // zf
fpos_t v7; // rcx
fpos_t Position; // [rsp+30h] [rbp+8h] BYREF
v5 = *(_QWORD *)(a1 + 128) == 0;
Position = *a3 + a3[1];
if ( v5 || !sub_180018740(a1) || fsetpos(*(FILE **)(a1 + 128), &Position) )
{
*a2 = -1;
a2[1] = 0;
a2[2] = 0;
return a2;
}
else
{
*(_QWORD *)(a1 + 116) = a3[2];
sub_180018850(a1);
v7 = *(_QWORD *)(a1 + 116);
*a2 = Position;
a2[1] = 0;
a2[2] = v7;
return a2;
}
}