//
// GJGarageLayer::showUnlockPopup from 0x140380600 to 0x140380c1e (1566 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407702a8
// > ??> @ 0x1409228f8
//
// 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:31:05 +0000
//
// Hidden C++ exception states: #wind=13
struct cocos2d::CCAction *__fastcall GJGarageLayer::showUnlockPopup(__int64 a1, unsigned int a2, unsigned int a3)
{
cocos2d::CCArray *v4; // rbx
void **v5; // rax
void **v6; // rax
void **v7; // rax
void **v8; // rax
void **v9; // rax
void **v10; // rax
cocos2d::CCLayerColor *DialogLayer; // rsi
__int64 v12; // rcx
__int64 v13; // rax
__int64 *v14; // rdi
__int64 v15; // rbx
__int64 v16; // rax
__int64 v18; // rax
__int16 v19; // [rsp+30h] [rbp-39h] BYREF
char v20; // [rsp+32h] [rbp-37h]
__int128 *v21; // [rsp+40h] [rbp-29h] BYREF
char v22[8]; // [rsp+48h] [rbp-21h] BYREF
__int64 v23; // [rsp+50h] [rbp-19h]
__int64 v24; // [rsp+58h] [rbp-11h]
__int64 v25; // [rsp+60h] [rbp-9h]
__int128 v26; // [rsp+68h] [rbp-1h] BYREF
__int64 v27; // [rsp+78h] [rbp+Fh]
__int64 v28; // [rsp+80h] [rbp+17h]
_BYTE v29[8]; // [rsp+88h] [rbp+1Fh] BYREF
if ( a3 == 1 && a2 == 13 )
{
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x20u);
v27 = 17;
v28 = 31;
strcpy((char *)v26, "Hey, over here...");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v5 = DialogObject::create((__int64)v22, (__int64)&v26, 10, 0.80000001, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v5);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x40u);
v27 = 48;
v28 = 63;
strcpy((char *)v26, "I've been watching you, and you got some skills.");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v6 = DialogObject::create((__int64)v22, (__int64)&v26, 13, 1.0, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v6);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x30u);
v27 = 44;
v28 = 47;
strcpy((char *)v26, "Whatever you need, Scratch's got it.");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v7 = DialogObject::create((__int64)v22, (__int64)&v26, 10, 1.0, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v7);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x40u);
v27 = 48;
v28 = 63;
strcpy((char *)v26, "Here's a free sample. Come find me when you can.");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v8 = DialogObject::create((__int64)v22, (__int64)&v26, 8, 1.0, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v8);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x20u);
v27 = 23;
v28 = 31;
strcpy((char *)v26, "Did you hear something?");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v9 = DialogObject::create((__int64)v22, (__int64)&v26, 9, 1.0, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v9);
v21 = &v26;
v19 = -1;
v20 = -1;
v26 = 0;
v27 = 0;
v28 = 0;
*(_QWORD *)&v26 = sub_14003D460(0x20u);
v27 = 21;
v28 = 31;
strcpy((char *)v26, "...");
v23 = 0;
v24 = 7;
v25 = 15;
strcpy(v22, "Scratch");
v10 = DialogObject::create((__int64)v22, (__int64)&v26, 8, 1.0, 0, (__int64)&v19);
cocos2d::CCArray::addObject(v4, (struct cocos2d::CCObject *)v10);
DialogLayer = DialogLayer::createDialogLayer(0, (__int64)v4, 2u);
(*(void (__fastcall **)(__int64, cocos2d::CCLayerColor *, __int64))(*(_QWORD *)(a1 - 448) + 456LL))(
a1 - 448,
DialogLayer,
100);
v12 = a1 - 8;
if ( a1 == 448 )
v12 = 0;
*((_QWORD *)DialogLayer + 78) = v12;
v13 = cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(v13, &v21);
v14 = *((__int64 **)DialogLayer + 70);
v15 = *v14;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, *(float *)&v21 * 0.5, *((float *)&v21 + 1) * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v15 + 184))(v14, v16);
return DialogLayer::animateIn(DialogLayer, 2);
}
else
{
v18 = ItemInfoPopup::create(a2, a3);
return (struct cocos2d::CCAction *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 1064LL))(v18);
}
}