//
// sub_635F50 from 0x635f50 to 0x635fd6 (134 bytes)
//
// 1 xrefs:
// > sub_62160C @ 0x622ca4
//
// 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
//
_DWORD *__fastcall sub_635F50(const char *a1, _DWORD *a2)
{
_DWORD *result; // r0
_DWORD *v5; // r4
_WORD *v6; // r5
size_t v7; // r0
result = off_ABAEBC(1u, 0x20u);
v5 = result;
if ( result )
{
v6 = off_ABAEBC(1u, 0x6Eu);
v5[6] = v6;
if ( v6 )
{
v7 = strlen(a1);
if ( v7 > 0x6B )
{
off_ABAEB0(v6);
off_ABAEB0(v5);
*a2 = 1;
return nullptr;
}
else
{
v5[1] = 1;
v5[2] = 1;
v5[4] = 110;
*v6 = 1;
memcpy(v6 + 1, a1, v7 + 1);
return v5;
}
}
else
{
off_ABAEB0(v5);
*a2 = 0;
return nullptr;
}
}
return result;
}