//
// unknown_libname_37 from 0x18012c508 to 0x18012c5a9 (161 bytes)
//
// 2 xrefs:
// > __crt_stdio_output::output_processor,__crt_stdio_output::standard_base>>::process @ 0x18012c7fd
// > ??> @ 0x180202bdc
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Microsoft VisualC 64bit universal runtime
char __fastcall unknown_libname_37(__int64 a1, int *a2)
{
int *v2; // rbx
int v5; // ebp
char v6; // si
__int64 v7; // rcx
int *v8; // rax
char *EndPtr; // [rsp+40h] [rbp+8h] BYREF
v2 = *(int **)(a1 + 16);
if ( !v2 )
{
v2 = errno();
*(_QWORD *)(a1 + 16) = v2;
}
v5 = *v2;
*v2 = 0;
v6 = 1;
v7 = *(_QWORD *)(a1 + 24);
EndPtr = nullptr;
*a2 = strtol((const char *)(v7 - 1), &EndPtr, 10);
v8 = *(int **)(a1 + 16);
if ( !v8 )
{
v8 = errno();
*(_QWORD *)(a1 + 16) = v8;
}
if ( *v8 == 34 || (unsigned __int64)EndPtr < *(_QWORD *)(a1 + 24) )
v6 = 0;
else
*(_QWORD *)(a1 + 24) = EndPtr;
if ( !*v2 && v5 )
*v2 = v5;
return v6;
}