//
// sub_781692 from 0x781692 to 0x7816ba (40 bytes)
//
// 2 xrefs:
// > sub_781690 @ 0x781690
// > sub_7829C0 @ 0x7829e4
//
// 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_781692(int a1, int a2, int a3, int a4)
{
int v4; // r4
int v5; // r5
int v6; // r6
char v7; // r7
int v8; // r0
int v9; // r3
*(_DWORD *)(v4 + 256) = a3;
*(_BYTE *)(v4 + a4) = v7;
*(_BYTE *)(v4 + 260) = v7;
v8 = sub_78145C(v4, v6, *(_DWORD **)(v5 + 8));
v9 = *(_DWORD *)(v4 + 256);
if ( v9 == 255 )
sub_7836E6(v8);
return sub_7816BA(v8, v9 + 1);
}