//
// GJGarageLayer::dialogClosed from 0x140278700 to 0x1402788d0 (464 bytes)
//
// 2 xrefs:
// > ??> @ 0x14056a300
// > ??> @ 0x1406d1004
//
// 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=3
void GJGarageLayer::dialogClosed(GJGarageLayer *a1, DialogLayer *a2)
{
bool v2; // r9
float v3; // xmm0_4
GameManager *v5; // rcx
__int64 v6; // rax
__int64 v7; // rcx
cocos2d::CCDirector *v8; // rax
cocos2d::CCPoint v9; // rax
CurrencyRewardLayer *v10; // rsi
float v11; // xmm0_4
GJItemIcon *BrowserItem; // rdi
cocos2d::CCPoint v13; // rax
cocos2d::CCPoint v14; // [rsp+60h] [rbp-38h] BYREF
float v15; // [rsp+A0h] [rbp+8h]
void *v16; // [rsp+B0h] [rbp+18h]
void *v17; // [rsp+B0h] [rbp+18h]
v5 = (GameManager *)qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v16 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v5 = (GameManager *)qword_1406C2ED8;
}
GameManager::reportAchievementWithID(v5, "geometry.ach.rate", 100, v2);
v6 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v17 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v17);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v6 = qword_1406C2ED8;
}
*(_BYTE *)(v6 + 676) = 1;
*(_BYTE *)(v6 + 1004) = 1;
(**(void (__fastcall ***)(int *))&a1[-1].m_iconID)(&a1[-1].m_iconID);
v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8);
cocos2d::CCPoint::CCPoint(v3, v15 * 0.5);
v10 = CurrencyRewardLayer::create(0, 0, 0, 0, Icon, 0, Icon, 0, v9, (CurrencyRewardType)0, 0.0, 1.0);
v11 = (*(float (__fastcall **)(float *, CurrencyRewardLayer *, __int64))(*(_QWORD *)&a1[-1].m_sInverse.b + 440LL))(
&a1[-1].m_sInverse.b,
v10,
100);
cocos2d::CCPoint::CCPoint(v11, v15 * 0.5);
BrowserItem = GJItemIcon::createBrowserItem((UnlockType)1, 13);
cocos2d::CCPoint::CCPoint(&v14);
CurrencyRewardLayer::createObjectsFull(v10, Icon, 1, BrowserItem, v13, 0.5);
}