//
// GameLevelManager::onClaimNotificationRewardCompleted from 0x140252030 to 0x14025226c (572 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x14021b388
// > ??> @ 0x14091c4e4
//
// 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 11:28:42 +0000
//
// Hidden C++ exception states: #wind=6
void __fastcall GameLevelManager::onClaimNotificationRewardCompleted(__int64 a1, __int64 a2, _QWORD *a3)
{
_BYTE *v6; // rdx
__int64 v7; // rdx
__int64 v8; // rcx
__int64 v9; // r8
__int64 v10; // r9
unsigned __int64 v11; // rax
size_t v12; // rax
size_t v13; // r8
_QWORD *v14; // rdx
const char *v15; // rcx
__int64 v16; // rcx
unsigned int v17; // edi
char *v18; // r8
__int64 v19; // rcx
__int64 v20; // r14
__int64 NotificationRewardKey; // rsi
__int64 v22; // rcx
__int64 v23; // rcx
__int64 v24; // rcx
char **v25; // [rsp+30h] [rbp-78h] BYREF
void *v26; // [rsp+38h] [rbp-70h]
void *v27; // [rsp+40h] [rbp-68h]
__int64 v28; // [rsp+48h] [rbp-60h]
_QWORD *v29; // [rsp+50h] [rbp-58h]
char *String[2]; // [rsp+58h] [rbp-50h] BYREF
__int64 v31; // [rsp+68h] [rbp-40h]
unsigned __int64 v32; // [rsp+70h] [rbp-38h]
v28 = a2;
v29 = a3;
v6 = a3;
if ( a3[3] > 0xFu )
v6 = (_BYTE *)*a3;
GameLevelManager::removeDLFromActive(a1, v6);
*(_OWORD *)String = 0;
v31 = 0;
v32 = 0;
v11 = a3[2];
if ( v11 < 0xC )
sub_14003F4D0(v8, v7, v9, v10);
v12 = v11 - 12;
v13 = -1;
if ( v12 != -1 )
v13 = v12;
v14 = a3;
if ( a3[3] > 0xFu )
v14 = (_QWORD *)*a3;
sub_14003D230(String, (char *)v14 + 12, v13);
v15 = (const char *)String;
if ( v32 > 0xF )
v15 = String[0];
v17 = atoi(v15);
if ( v32 > 0xF )
{
v18 = String[0];
if ( v32 + 1 >= 0x1000 )
{
v18 = *((char **)String[0] - 1);
if ( (unsigned __int64)(String[0] - v18 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v18);
}
LODWORD(v25) = 0;
v20 = GameLevelManager::rewardItemFromResponse(v16, a2, &v25);
if ( v20 && (_DWORD)v25 == v17 )
{
v25 = String;
if ( !qword_14090BFE0 )
{
v26 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
}
NotificationRewardKey = GameStatsManager::getNotificationRewardKey(v19, String, v17);
v26 = (void *)NotificationRewardKey;
v22 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v27 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v27);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v22 = qword_14090BFE0;
}
cocos2d::CCDictionary::setObject(*(_QWORD *)(v22 + 368), v20, NotificationRewardKey);
sub_14003D310(NotificationRewardKey);
v23 = *(_QWORD *)(a1 + 528);
if ( v23 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v23 + 16LL))(v23, v17);
}
else
{
v24 = *(_QWORD *)(a1 + 528);
if ( v24 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v24 + 24LL))(v24, v17);
}
sub_14003D310(a2);
sub_14003D310((__int64)a3);
}