//
// sub_1005ED254 from 0x1005ed254 to 0x1005ed2a4 (80 bytes)
//
// 1 xrefs:
// > sub_100565094 @ 0x1005650b8
//
// This function is hookable on this platform (idp: arm, 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 11:09:46 +0000
//
char *__fastcall sub_1005ED254(__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;
}