//
// sub_50CA4 from 0x50ca4 to 0x50ce2 (62 bytes)
//
// 1 xrefs:
// > sub_522EC @ 0x52312
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:40:43 +0000
//
int __fastcall sub_50CA4(int a1, int a2, int *a3)
{
int v5; // r5
int result; // r0
int v7; // r1
v5 = accept(a1, nullptr, nullptr);
if ( v5 == -1 )
{
v7 = *(_DWORD *)_errno();
result = 43;
if ( v7 == 11 )
return 45;
}
else
{
result = sub_50A6C(v5, a2);
if ( !result )
{
*a3 = v5;
return 0;
}
}
return result;
}