//
// GameLevelManager::storeCommentsResult from 0x14023e010 to 0x14023e248 (568 bytes)
//
// 5 xrefs:
// > GameLevelManager::onGetUserMessagesCompleted @ 0x14023b31a
// > GameLevelManager::onGetLevelCommentsCompleted @ 0x14023cdd5
// > GameLevelManager::onGetAccountCommentsCompleted @ 0x14023d56c
// > GameLevelManager::onGetFriendRequestsCompleted @ 0x140254a49
// > ??> @ 0x14091c148
//
// 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:28:35 +0000
//
// Hidden C++ exception states: #wind=4
void __fastcall GameLevelManager::storeCommentsResult(__int64 a1, __int64 a2, _QWORD *a3, _BYTE *a4)
{
size_t v8; // rbx
size_t v9; // r8
void *v10; // rcx
size_t v11; // r8
_BYTE *v12; // rdx
__int64 v13; // rbx
__int64 v14; // rax
void *v15; // rcx
void *v16; // rcx
void *Block[2]; // [rsp+38h] [rbp-70h] BYREF
__m128i si128; // [rsp+48h] [rbp-60h]
void *v19[2]; // [rsp+58h] [rbp-50h] BYREF
__int128 v20; // [rsp+68h] [rbp-40h]
GameLevelManager::makeTimeStamp(a1, a4);
*(_OWORD *)Block = 0;
si128 = 0;
v8 = -1;
v9 = -1;
do
++v9;
while ( a4[v9] );
sub_14003D230(Block, a4, v9);
cocos2d::CCDictionary::setObject(*(_QWORD *)(a1 + 1152), a2, Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v10 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v10 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v10);
}
*(_OWORD *)v19 = 0;
v20 = 0;
v11 = -1;
do
++v11;
while ( a4[v11] );
sub_14003D230(v19, a4, v11);
v12 = a3;
if ( a3[3] > 0xFu )
v12 = (_BYTE *)*a3;
*(_OWORD *)Block = 0;
si128 = 0;
do
++v8;
while ( v12[v8] );
sub_14003D230(Block, v12, v8);
v13 = *(_QWORD *)(a1 + 1160);
v14 = cocos2d::CCString::create(Block);
cocos2d::CCDictionary::setObject(v13, v14, v19);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v15 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v15 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v15 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v15);
}
si128 = _mm_load_si128((const __m128i *)&Size);
LOBYTE(Block[0]) = 0;
if ( *((_QWORD *)&v20 + 1) > 0xFu )
{
v16 = v19[0];
if ( (unsigned __int64)(*((_QWORD *)&v20 + 1) + 1LL) >= 0x1000 )
{
v16 = *((void **)v19[0] - 1);
if ( (unsigned __int64)((char *)v19[0] - (char *)v16 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v16);
}
sub_14003D310((__int64)a3);
}