//
// GJKeybindManager::parseBindsBlob from 0x715260 to 0x7153e0 (384 bytes)
//
// 3 xrefs:
// > GJKeybindManager::parseImportFile @ 0x7155c2
// > GJKeybindManager::dataLoaded @ 0x716c78
// > GJKeybindManager::applyImportBlob @ 0x716ccc
//
// 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:57:47 +0000
//
void __fastcall GJKeybindManager::parseBindsBlob(
GJKeybindManager *a1,
unsigned __int8 *a2,
int a3,
_DWORD *a4,
_DWORD *a5)
{
unsigned int i; // r9
int v9; // r3
int v10; // r6
unsigned int v11; // r2
unsigned int v12; // r5
unsigned int v13; // r6
char *v14; // r0
GJKeybindManager *v15; // r9
int v16; // r1
unsigned int v17; // r3
unsigned int v18; // r0
unsigned int v19; // r6
char *v20; // r0
_BOOL4 isControllerChord; // r0
int v22; // r1
int v23; // [sp+Ch] [bp-28h]
int v24; // [sp+Ch] [bp-28h]
_BOOL4 isKnownAction; // [sp+10h] [bp-24h]
GJKeybindManager *v27; // [sp+1Ch] [bp-18h]
GJKeybindManager *v28; // [sp+1Ch] [bp-18h]
int v29[2]; // [sp+20h] [bp-14h] BYREF
char *v30; // [sp+28h] [bp-Ch]
if ( a3 )
{
std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::clear((_DWORD *)a1 + 13);
std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::clear((_DWORD *)a1 + 18);
}
if ( a4 )
*a4 = 0;
if ( a5 )
*a5 = 0;
for ( i = 0; ; i = v12 + 1 )
{
v9 = *a2;
v10 = v9 & 1;
v11 = (v9 & 1) != 0 ? *((_DWORD *)a2 + 1) : v9 >> 1;
if ( i >= v11 )
break;
v23 = *a2;
v12 = std::string::find(a2, 124, i);
if ( v12 == -1 )
{
if ( v10 )
v12 = *((_DWORD *)a2 + 1);
else
v12 = v23 >> 1;
}
v13 = std::string::find(a2, 58, i);
if ( v13 != -1 && v13 < v12 )
{
std::string::basic_string(v29, a2, i, v13 - i);
if ( (v29[0] & 1) != 0 )
v14 = v30;
else
v14 = (char *)v29 + 1;
v15 = (GJKeybindManager *)atoi(v14);
std::string::~string((int)v29);
if ( v15 )
isKnownAction = GJKeybindManager::isKnownAction(v15, v16);
else
isKnownAction = 0;
v17 = v13 + 1;
v24 = 0;
while ( v17 < v12 )
{
v27 = (GJKeybindManager *)v17;
v18 = std::string::find(a2, 44, v17);
if ( v18 == -1 )
{
v19 = v12;
}
else
{
if ( v18 >= v12 )
v18 = v12;
v19 = v18;
}
std::string::basic_string(v29, a2, (unsigned int)v27, v19 - (_DWORD)v27);
if ( (v29[0] & 1) != 0 )
v20 = v30;
else
v20 = (char *)v29 + 1;
v28 = (GJKeybindManager *)atoi(v20);
std::string::~string((int)v29);
isControllerChord = GJKeybindManager::isControllerChord(v28, (int)v28);
v22 = (int)v28;
if ( isControllerChord )
v22 = (unsigned __int16)v28;
if ( v22 && isKnownAction )
{
if ( a3 )
GJKeybindManager::bindChord(a1, v22, (int)v15);
v24 = 1;
}
v17 = v19 + 1;
}
if ( v24 && a4 )
{
++*a4;
}
else if ( !isKnownAction && v15 && a5 )
{
++*a5;
}
}
}
}