//
// GJAccountManager::onRegisterAccountCompleted from 0x140306190 to 0x140306328 (408 bytes)
//
// 2 xrefs:
// > GJAccountManager::handleIt @ 0x140305598
// > ??> @ 0x14091e56c
//
// 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:30:09 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall GJAccountManager::onRegisterAccountCompleted(__int64 a1, const void **a2, __int64 a3)
{
void *v6; // rcx
const void *v7; // rcx
unsigned __int64 v8; // rsi
size_t v9; // r8
_QWORD *v10; // rbx
_QWORD *v11; // rsi
const char *v12; // rcx
__int64 v13; // rbx
unsigned int v14; // eax
void (__fastcall ***v15)(_QWORD); // rcx
void *Block[2]; // [rsp+40h] [rbp-48h] BYREF
__m128i si128; // [rsp+50h] [rbp-38h]
HIWORD(Block[1]) = 0;
si128 = _mm_load_si128((const __m128i *)&xmmword_1408365C0);
qmemcpy(Block, "reg_accoun", 10);
*(_DWORD *)((char *)&Block[1] + 2) = (unsigned __int8)aRegAccount[10];
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 320), Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v6);
}
*(_OWORD *)Block = 0;
si128.m128i_i64[0] = 1;
si128.m128i_i64[1] = 15;
LOWORD(Block[0]) = 49;
v7 = a2;
if ( (unsigned __int64)a2[3] > 0xF )
v7 = *a2;
v8 = (unsigned __int64)a2[2];
v9 = v8;
if ( v8 > 1 )
v9 = 1;
if ( !memcmp(v7, Block, v9) && v8 == 1 )
{
v15 = *(void (__fastcall ****)(_QWORD))(a1 + 408);
if ( v15 )
(**v15)(v15);
}
else
{
v10 = *(_QWORD **)(a1 + 408);
v11 = v10;
if ( v10 )
{
v12 = (const char *)a2;
if ( (unsigned __int64)a2[3] > 0xF )
v12 = (const char *)*a2;
v13 = *v10;
v14 = atoi(v12);
(*(void (__fastcall **)(_QWORD *, _QWORD))(v13 + 8))(v11, v14);
}
}
sub_14003D310((__int64)a2);
sub_14003D310(a3);
}