//
// sub_635E88 from 0x635e88 to 0x635f40 (184 bytes)
//
// 1 xrefs:
// > sub_6105EC @ 0x610694
//
// 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
//
void **__fastcall sub_635E88(char *cp, unsigned __int16 a2)
{
void **result; // r0
_DWORD *v5; // r4
char *v6; // r9
int v7; // r0
void **v8; // r6
int v9; // [sp+4h] [bp+0h] BYREF
char *buf[5]; // [sp+8h] [bp+4h] BYREF
if ( inet_pton(2, cp, &v9) <= 0 )
{
if ( inet_pton(10, cp, buf) <= 0 )
return nullptr;
else
return sub_635DB4(10, buf, cp, a2);
}
else
{
result = (void **)off_ABAEAC(0x2Cu);
v5 = result;
if ( result )
{
v6 = off_ABAEB8(cp);
if ( v6 )
{
v7 = v9;
v5[1] = 0;
v5[9] = v5 + 5;
v5[5] = v7;
v5[3] = 4;
v5[10] = 0;
v5[2] = 2;
v5[4] = v5 + 9;
*v5 = v6;
v8 = sub_635C50((int)v5, a2);
off_ABAEB0(v6);
off_ABAEB0(v5);
return v8;
}
else
{
off_ABAEB0(v5);
return nullptr;
}
}
}
return result;
}