//
// sub_1004C70EC from 0x1004c70ec to 0x1004c713c (80 bytes)
//
// 1 xrefs:
// > sub_10043EF2C @ 0x10043ef50
//
// 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
//
char *__fastcall sub_1004C70EC(__int64 a1, int a2)
{
__int64 v2; // x8
__int64 v3; // x9
int v4; // w11
int v5; // w8
char *result; // x0
v2 = 0;
v3 = 0xFFFFFFFE00000000LL;
do
{
v4 = *(unsigned __int8 *)(a1 + v2++);
v3 += (__int64)&_mh_execute_header;
}
while ( v4 );
if ( (_DWORD)v2 == 1 )
return nullptr;
v5 = 1 - v2;
for ( result = (char *)(a1 + (v3 >> 32)); *result != a2; --result )
{
if ( __CFADD__(v5++, 1) )
return nullptr;
}
return result;
}