//
// GJMessageCell::onViewMessage from 0x100242250 to 0x100242324 (212 bytes)
//
// 1 xrefs:
// > GJMessageCell::loadFromMessage @ 0x10023228c
//
// 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:27:18 +0000
//
__int64 __fastcall GJMessageCell::onViewMessage(__int64 a1, double a2)
{
__int64 result; // rax
__int64 v4; // rdi
__int64 v5; // rsi
__int64 v6; // rax
__int64 v7; // r14
__int64 v8; // rax
__int64 v9; // rax
int v10; // edx
__int64 v11; // rax
__int64 StoredUserMessage; // rax
__int64 v13; // rax
result = *(_QWORD *)(a1 + 576);
if ( result )
{
if ( !*(_BYTE *)(result + 424) )
{
*(_BYTE *)(result + 424) = 1;
v4 = *(_QWORD *)(a1 + 536);
v5 = 100;
v6 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v4 + 480LL))(v4, 100);
if ( v6 )
{
v4 = v6;
v5 = 0;
a2 = (*(double (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 344LL))(v6, 0);
}
v7 = GameLevelManager::sharedState(a2);
v8 = GJAccountManager::sharedState(v4, v5);
v9 = GameLevelManager::userInfoForAccountID(v7, (unsigned int)(*(_DWORD *)(v8 + 352) - *(_DWORD *)(v8 + 356)));
if ( v9 )
{
v10 = 1;
if ( *(int *)(v9 + 692) >= 2 )
v10 = *(_DWORD *)(v9 + 692);
*(_DWORD *)(v9 + 692) = v10 - 1;
}
}
v11 = GameLevelManager::sharedState(a2);
StoredUserMessage = GameLevelManager::getStoredUserMessage(v11, *(unsigned int *)(*(_QWORD *)(a1 + 576) + 316LL));
if ( !StoredUserMessage )
StoredUserMessage = *(_QWORD *)(a1 + 576);
v13 = sub_100293190(StoredUserMessage);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v13 + 1312LL))(v13);
}
return result;
}