//
// GameLevelManager::onGetLevelRateInfoCompleted from 0x14015fb90 to 0x14015fcb5 (293 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x140143f15
// > ??> @ 0x1406cab24
//
// 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
//
// Hidden C++ exception states: #wind=2
void __fastcall GameLevelManager::onGetLevelRateInfoCompleted(GameLevelManager *a1, const void **a2, const char *a3)
{
const char *v6; // rdx
GameLevelManager *v7; // rcx
const char *v8; // rdx
unsigned int SplitIntFromKey; // r14d
const void *v10; // rcx
unsigned __int64 v11; // rbp
size_t v12; // r8
LevelRateInfoDelegate **p_m_levelRateInfoDelegate; // rdi
__int64 v14; // rax
LevelRateInfoDelegate *m_levelRateInfoDelegate; // rcx
__int128 Buf2; // [rsp+38h] [rbp-50h] BYREF
__int64 v17; // [rsp+48h] [rbp-40h]
__int64 v18; // [rsp+50h] [rbp-38h]
v6 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v6 = *(const char **)a3;
GameLevelManager::removeDLFromActive(a1, v6);
v8 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v8 = *(const char **)a3;
SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v7, v8, 1);
Buf2 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&Buf2, "-1");
v10 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v10 = *a2;
v11 = (unsigned __int64)a2[2];
v12 = v11;
if ( v11 > 2 )
v12 = 2;
if ( !memcmp(v10, &Buf2, v12) && v11 == 2 )
{
m_levelRateInfoDelegate = a1->m_levelRateInfoDelegate;
if ( m_levelRateInfoDelegate )
m_levelRateInfoDelegate->rateInfoFailed(m_levelRateInfoDelegate, SplitIntFromKey, 0);
}
else
{
p_m_levelRateInfoDelegate = &a1->m_levelRateInfoDelegate;
if ( *p_m_levelRateInfoDelegate )
{
v14 = sub_14003BDB0((__int64)&Buf2, (__int64)a2);
(*p_m_levelRateInfoDelegate)->rateInfoFinished(*p_m_levelRateInfoDelegate, SplitIntFromKey, (std::string *)v14);
}
}
sub_14003A830((__int64)a2);
sub_14003A830((__int64)a3);
}