//
// SoundPackDescPopup::onPickIcon from 0x14019a010 to 0x14019a110 (256 bytes)
//
// 2 xrefs:
// > SoundPackDescPopup::init @ 0x140199944
// > ??> @ 0x140919670
//
// 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:27:46 +0000
//
void __fastcall SoundPackDescPopup::onPickIcon(__int64 a1, __int64 a2)
{
__int64 v4; // rbp
__int64 v5; // rcx
const struct cocos2d::CCPoint *v6; // r14
void *v7; // rbx
cocos2d::CCObject *v8; // rbx
float *v9; // rax
char v10; // [rsp+60h] [rbp+8h] BYREF
void *v11; // [rsp+70h] [rbp+18h] BYREF
v4 = a1 + 1000;
if ( !a1 )
v4 = 0;
v5 = *(_QWORD *)(a1 + 1080);
if ( v5 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 1104LL))(v5, 0);
LABEL_5:
*(_QWORD *)(a1 + 1080) = 0;
return;
}
if ( !a2 )
goto LABEL_5;
v6 = (const struct cocos2d::CCPoint *)EmotePickerPopup::buttonAnchor((__int64)&v10, a2);
v7 = operator new(0x4C8u);
v11 = v7;
memset(v7, 0, 0x4C8u);
v8 = (cocos2d::CCObject *)EmotePickerPopup::EmotePickerPopup((__int64)v7);
if ( !v8 )
goto LABEL_11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, v6);
if ( !EmotePickerPopup::init((__int64)v8, 0, v9, 0, 0) )
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v8 + 8LL))(v8, 1);
LABEL_11:
v8 = nullptr;
goto LABEL_12;
}
cocos2d::CCObject::autorelease(v8);
LABEL_12:
*(_QWORD *)(a1 + 1080) = EmotePickerPopup::openAt(v8, v4, a2);
}