//
// sub_774C84 from 0x774c84 to 0x774cc0 (60 bytes)
//
// 4 xrefs:
// > sub_7512BC @ 0x7515da
// > sub_751BE0 @ 0x751efe
// > sub_768DC8 @ 0x769120
// > sub_7696C4 @ 0x769a1c
//
// 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
//
int __fastcall sub_774C84(int *a1, int a2, unsigned int a3)
{
int v3; // r3
unsigned int v4; // r0
int v5; // r4
int v6; // r3
int v7; // t1
v3 = *a1;
v4 = *(_DWORD *)(*a1 - 12);
if ( a3 >= v4 )
return -1;
v5 = *(unsigned __int8 *)(v3 + a3);
v6 = v3 + a3;
if ( v5 != a2 )
return a3;
while ( ++a3 < v4 )
{
v7 = *(unsigned __int8 *)++v6;
if ( v7 != v5 )
return a3;
}
return -1;
}