//
// GJAccountManager::onRegisterAccountCompleted from 0x140200970 to 0x140200afc (396 bytes)
//
// 2 xrefs:
// > GJAccountManager::handleIt @ 0x1402003cb
// > ??> @ 0x1406ccae0
//
// 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=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; // rsi
__int64 *v11; // rbx
const char *v12; // rcx
__int64 v13; // rbx
unsigned int v14; // eax
void (__fastcall ***v15)(_QWORD); // rcx
void *Block[2]; // [rsp+30h] [rbp-48h] BYREF
__int64 v17; // [rsp+40h] [rbp-38h]
unsigned __int64 v18; // [rsp+48h] [rbp-30h]
HIWORD(Block[1]) = 0;
v17 = 11;
v18 = 15;
qmemcpy(Block, "reg_accoun", 10);
*(_DWORD *)((char *)&Block[1] + 2) = (unsigned __int8)aRegAccount[10];
cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(a1 + 320), Block);
if ( v18 > 0xF )
{
v6 = Block[0];
if ( v18 + 1 >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v6);
}
*(_OWORD *)Block = 0;
v17 = 1;
v18 = 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 = *(__int64 **)(a1 + 408);
if ( v11 )
{
v12 = (const char *)a2;
if ( (unsigned __int64)a2[3] > 0xF )
v12 = (const char *)*a2;
v13 = *v11;
v14 = atoi(v12);
(*(void (__fastcall **)(_QWORD, _QWORD))(v13 + 8))(*v10, v14);
}
}
sub_14003A830((__int64)a2);
sub_14003A830(a3);
}