//
// common_xtox_s
from 0x180138fcc to 0x180139035 (105 bytes)
//
// 3 xrefs:
// > _itow_s @ 0x18013904e
// > ??> @ 0x180203758
// > ??> @ 0x180203764
//
// 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 10:55:01 +0000
//
__int64 __fastcall common_xtox_s(
unsigned int a1,
__int16 *a2,
unsigned __int64 a3,
unsigned int a4,
unsigned __int8 a5)
{
int *v5; // rax
unsigned int v6; // ebx
if ( !a2 || !a3 )
goto LABEL_2;
*a2 = 0;
if ( a3 <= (unsigned __int64)a5 + 1 )
{
v5 = errno();
v6 = 34;
goto LABEL_3;
}
if ( a4 - 2 > 0x22 )
{
LABEL_2:
v5 = errno();
v6 = 22;
LABEL_3:
*v5 = v6;
invalid_parameter_noinfo();
return v6;
}
return common_xtox(a1, a2, a3, a4, a5);
}