//
// ProfilePage::onComment from 0x1403c3d20 to 0x1403c3ed8 (440 bytes)
//
// 2 xrefs:
// > ProfilePage::loadPageFromUserInfo @ 0x1403c2e43
// > ??> @ 0x1406d77a8
//
// 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 ProfilePage::onComment(ProfilePage *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v2; // rcx
int TimeLeft; // eax
cocos2d::CCString *v4; // rax
const char *CString; // rax
size_t v6; // r8
__int64 v7; // rax
FLAlertLayer *v8; // rbx
FLAlertLayer_vtbl *v9; // rdx
FLAlertLayer *v10; // rcx
FLAlertLayer_vtbl **v11; // rax
__int128 v12; // [rsp+50h] [rbp+17h] BYREF
__int64 v13; // [rsp+60h] [rbp+27h]
__int64 v14; // [rsp+68h] [rbp+2Fh]
__int128 v15; // [rsp+70h] [rbp+37h] BYREF
__int64 v16; // [rsp+80h] [rbp+47h]
__int64 v17; // [rsp+88h] [rbp+4Fh]
void *v18; // [rsp+B0h] [rbp+77h]
v2 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v18 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v18);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v2 = (GameLevelManager *)qword_1406C2EC0;
}
TimeLeft = GameLevelManager::getTimeLeft(v2, "acc_comment", 15.0);
if ( (unsigned int)(TimeLeft - 1) > 0xE )
{
v15 = 0;
v16 = 0;
v17 = 15;
LOBYTE(v15) = 0;
v13 = 11;
v14 = 15;
*(_QWORD *)&v12 = 0x6470552074736F50LL;
*((_QWORD *)&v12 + 1) = 6648929;
v11 = (FLAlertLayer_vtbl **)ShareCommentLayer::create((unsigned int)&v12, 140, 1, 0, (__int64)&v15);
v9 = *v11;
v10 = (FLAlertLayer *)v11;
}
else
{
v4 = cocos2d::CCString::createWithFormat("Please wait %i seconds before posting a new update!", TimeLeft);
CString = cocos2d::CCString::getCString(v4);
v12 = 0;
v13 = 0;
v14 = 0;
v6 = -1;
do
++v6;
while ( CString[v6] );
sub_14003A930(&v12, CString, v6);
v7 = sub_14003BDB0((__int64)&v15, (__int64)&v12);
v8 = FLAlertLayer::create(0, (int)"Too fast", v7, (__int64)"OK", 0, 1133903872, 0, 0, 1065353216);
sub_14003A830((__int64)&v12);
v9 = v8->cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v10 = v8;
}
v9->show(v10);
}