//
// GJRateLevelListLayer::onCustomButton from 0x100508640 to 0x1005087e7 (423 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b66188
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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 12:31:33 +0000
//
void __fastcall GJRateLevelListLayer::onCustomButton(_QWORD *a1, __int64 a2, double a3)
{
__int64 *v3; // r14
__int64 v4; // rax
__int64 v5; // rax
_QWORD v6[2]; // [rsp+8h] [rbp-48h] BYREF
void *__p; // [rsp+18h] [rbp-38h]
__int128 v8[3]; // [rsp+20h] [rbp-30h] BYREF
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == -13 )
{
__p = operator new(0x28u);
v6[0] = 41;
v6[1] = 32;
strcpy((char *)__p, "Do you want to unrate this list?");
v3 = (__int64 *)FLAlertLayer::create_1(
(int)a1 + 1032,
(int)"Unrate List",
(__int64)v6,
(int)"Cancel",
(int)"Unrate",
380.0);
if ( (v6[0] & 1) != 0 )
operator delete(__p);
ButtonSprite::updateBGImage(v3[77], (__int64)"GJ_button_06.png");
(*(void (__fastcall **)(__int64 *, __int64))(*v3 + 72))(v3, 4294967282LL);
LABEL_5:
(*(void (__fastcall **)(__int64 *))(*v3 + 1312))(v3);
return;
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == -15 )
{
*(float *)&a3 = (*(float (__fastcall **)(_QWORD *, __int64))(*a1 + 1464LL))(a1, 4294967286LL);
if ( (int)*(float *)&a3 > 0 )
{
v4 = GameLevelManager::sharedState(a3);
if ( (unsigned __int8)sub_100579B60(v4, *(unsigned int *)(a1[130] + 344LL), (unsigned int)(int)*(float *)&a3) )
{
*(_QWORD *)(GameLevelManager::sharedState(a3) + 1360) = a1 + 128;
v5 = a1[132];
if ( v5 )
*(_QWORD *)(v5 + 664) = 0;
strcpy((char *)v8, " Updating rank...");
v3 = (__int64 *)UploadActionPopup::create((__int64)(a1 + 127), v8);
a1[132] = v3;
if ( (v8[0] & 1) != 0 )
{
operator delete(*(void **)&v8[1]);
v3 = (__int64 *)a1[132];
}
goto LABEL_5;
}
}
}
}