//
// ThreadDescPopup::onPickIcon from 0x1400fd940 to 0x1400fda40 (256 bytes)
//
// 2 xrefs:
// > ThreadDescPopup::buildUI @ 0x1400fd04e
// > ??> @ 0x14091553c
//
// 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:26:41 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall ThreadDescPopup::onPickIcon(__int64 a1, __int64 a2)
{
__int64 v4; // rbp
__int64 v5; // rcx
const struct cocos2d::CCPoint *v6; // r14
void *v7; // rbx
cocos2d::CCObject *v8; // rbx
int v9; // eax
char v10; // [rsp+60h] [rbp+8h] BYREF
void *v11; // [rsp+70h] [rbp+18h] BYREF
v4 = a1 + 1008;
if ( !a1 )
v4 = 0;
v5 = *(_QWORD *)(a1 + 1136);
if ( v5 )
{
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 1104LL))(v5, 0);
LABEL_5:
*(_QWORD *)(a1 + 1136) = 0;
return;
}
if ( !a2 )
goto LABEL_5;
v6 = (const struct cocos2d::CCPoint *)EmotePickerPopup::buttonAnchor(&v10, a2);
v7 = operator new(0x4C8u);
v11 = v7;
memset(v7, 0, 0x4C8u);
v8 = (cocos2d::CCObject *)EmotePickerPopup::EmotePickerPopup(v7);
if ( !v8 )
goto LABEL_11;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v11, v6);
if ( !(unsigned __int8)EmotePickerPopup::init((_DWORD)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 + 1136) = EmotePickerPopup::openAt(v8, v4, a2);
}