//
// GJWriteMessagePopup::onClearBody from 0x14029a3b0 to 0x14029a53b (395 bytes)
//
// 2 xrefs:
// > GJWriteMessagePopup::init @ 0x140299fb5
// > ??> @ 0x1406d1d00
//
// 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=2
void GJWriteMessagePopup::onClearBody(GJWriteMessagePopup *a1, cocos2d::CCObject *a2)
{
FLAlertLayerProtocol *v2; // rdi
FLAlertLayer *v3; // rbx
__int64 v4; // rax
__int128 v5; // [rsp+50h] [rbp-48h] BYREF
__int64 v6; // [rsp+60h] [rbp-38h]
__int64 v7; // [rsp+68h] [rbp-30h]
_BYTE v8[32]; // [rsp+70h] [rbp-28h] BYREF
FLAlertLayer *v9; // [rsp+B0h] [rbp+18h]
v2 = &a1->FLAlertLayerProtocol;
if ( !a1 )
v2 = nullptr;
v5 = 0;
*(_QWORD *)&v5 = sub_14003AA10(0x30u);
v6 = 44;
v7 = 47;
strcpy((char *)v5, "Are you sure you want to reset this message?");
v9 = (FLAlertLayer *)operator new(0x278u);
v3 = FLAlertLayer::FLAlertLayer(v9);
if ( v3 )
{
v4 = sub_14003BDB0((__int64)v8, (__int64)&v5);
if ( FLAlertLayer::init((__int64)v3, (__int64)v2, "Reset Message", v4, "Cancel", "Reset", 380.0, 0, 0, 1.0) )
{
cocos2d::CCObject::autorelease(v3);
}
else
{
((void (__fastcall *)(FLAlertLayer *, __int64))v3->~FLAlertLayer)(v3, 1);
v3 = nullptr;
}
}
sub_14003A830((__int64)&v5);
ButtonSprite::updateBGImage(v3->m_button2, "GJ_button_05.png");
v3->setTag(v3, 1);
v3->show(v3);
}