//
// GameManager::finishedLoadingIconAsync from 0x41d7e8 to 0x41d89a (178 bytes)
//
// 0 xrefs:
//
// 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:47:59 +0000
//
GameManager *__fastcall GameManager::finishedLoadingIconAsync(GameManager *this, cocos2d::CCObject *a2, int a3, int a4)
{
int **v4; // r7
unsigned int v5; // r4
int v6; // r0
int *v7; // r0
int v8; // r2
int v9; // r3
int **v10; // r0
int v11; // r0
int *v12; // r0
int v13; // r3
int v14; // r4
GameManager *v15; // [sp+0h] [bp-10h] BYREF
int v16; // [sp+4h] [bp-Ch] BYREF
int v17[2]; // [sp+8h] [bp-8h] BYREF
v15 = this;
v16 = (int)a2;
v17[0] = a3;
v17[1] = a4;
v4 = (int **)this;
if ( a2 )
{
v5 = 0;
v6 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
v16 = 0;
v17[0] = 0;
v15 = (GameManager *)v6;
GameManager::iconAndTypeForKey((int)v4, v6, &v16, v17);
GameManager::loadIcon(v4, v16, v17[0], -1);
*(_BYTE *)std::map::operator[](v4 + 237, (int *)&v15) = 0;
while ( 1 )
{
v7 = std::map>::operator[](v4 + 243, (int *)&v15);
v8 = *v7;
v9 = v7[1];
v10 = v4 + 243;
if ( v5 >= (v9 - v8) >> 2 )
break;
v11 = *(_DWORD *)(*std::map>::operator[](v10, (int *)&v15) + 4 * v5++);
SimplePlayer::iconFinishedLoading(v11, v16, v17[0]);
}
v12 = std::map>::operator[](v10, (int *)&v15);
v13 = *v12;
while ( 1 )
{
v14 = v12[1];
if ( v13 == v14 )
break;
v12[1] = v14 - 4;
}
return GameManager::unloadIcon((GameManager *)v4, v16, v17[0], -1);
}
return this;
}