//
// sub_BDD40 from 0xbdd40 to 0xbddb6 (118 bytes)
//
// 1 xrefs:
// > sub_BC194 @ 0xbc35c
//
// 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:41:47 +0000
//
int __fastcall sub_BDD40(int a1, int a2, _DWORD *a3, int *a4)
{
int i; // r4
int v9; // r6
int v10; // r0
int v11; // r6
for ( i = 0; i < a2; ++i )
{
if ( (*(unsigned __int8 *)(a1 + i) | 0x20) == 0x20 )
{
v9 = 0;
*(_BYTE *)(a1 + i) = 0;
while ( v9 != 3 )
{
if ( !sub_BE2AA(a1, off_E5E54[v9]) )
{
v10 = i + 1;
*a3 = v9;
while ( v10 < a2 )
{
if ( (*(unsigned __int8 *)(a1 + v10) | 0x20) == 0x20 )
{
v11 = 0;
*(_BYTE *)(a1 + v10) = 0;
*a4 = atoi((const char *)(a1 + i + 1));
return v11;
}
++v10;
}
return 31;
}
++v9;
}
return 31;
}
}
return 31;
}