//
// ProfilePage::onSendMessage from 0x1008a21c0 to 0x1008a2270 (176 bytes)
//
// 1 xrefs:
// > ProfilePage::setupAccountButtons @ 0x1008a1dc7
//
// 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 12:37:15 +0000
//
void __fastcall ProfilePage::onSendMessage(__int64 a1, __int64 a2)
{
__int64 v3; // rax
__int64 v4; // rdi
__int64 v5; // rax
__int128 *v6; // rax
__int128 v7; // [rsp+0h] [rbp-20h] BYREF
void *__p; // [rsp+10h] [rbp-10h]
v3 = GJAccountManager::sharedState(a1, a2);
if ( *(_DWORD *)(v3 + 352) <= *(_DWORD *)(v3 + 356) )
{
GJAccountManager::sharedState(a1, a2);
sub_1000A24A0();
}
else
{
v4 = *(unsigned int *)(a1 + 736);
v5 = *(_QWORD *)(a1 + 728);
if ( v5 )
{
if ( (*(_BYTE *)(v5 + 320) & 1) != 0 )
{
sub_10001AD30(&v7, *(const void **)(v5 + 336), *(_QWORD *)(v5 + 328));
v4 = (unsigned int)v4;
}
else
{
v6 = (__int128 *)(v5 + 320);
__p = *((void **)v6 + 2);
v7 = *v6;
}
}
else
{
LOWORD(v7) = 0;
}
ThreadOpenHelper::check(v4, &v7);
if ( (v7 & 1) != 0 )
operator delete(__p);
}
}