//
// GJAccountManager::registerAccount from 0x988cd0 to 0x988f98 (712 bytes)
//
// 2 xrefs:
// > AccountRegisterLayer::onSubmit @ 0x994738
// > ??> @ 0x47bd8
//
// This function is hookable on this platform (idp: arm, 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:57:55 +0000
//
__int64 __fastcall GJAccountManager::registerAccount(__int64 a1, char *a2, char *a3, char *a4)
{
_BOOL4 isDLActive; // w1
__int64 result; // x0
const char *v10; // x26
char *v11; // x24
char *v12; // x23
cocos2d::CCString *v13; // x0
__int64 CString; // x4
__int64 v15; // x5
cocos2d::CCString *v16; // x23
char *v17; // x23
size_t v18; // x0
__int64 v19[2]; // [xsp+50h] [xbp+50h] BYREF
void *v20; // [xsp+60h] [xbp+60h]
__int64 v21[2]; // [xsp+68h] [xbp+68h] BYREF
void *v22; // [xsp+78h] [xbp+78h]
__int64 v23[2]; // [xsp+80h] [xbp+80h] BYREF
void *v24; // [xsp+90h] [xbp+90h]
isDLActive = GJAccountManager::isDLActive((GJAccountManager *)a1, "reg_account");
result = 0;
if ( !isDLActive )
{
GJAccountManager::addDLToActive((GJAccountManager *)a1, "reg_account");
v10 = (char *)v19 + 1;
sub_987EE8(a2, v19);
if ( (v19[0] & 1) != 0 )
v10 = (const char *)v20;
sub_987EE8(a3, v21);
v11 = (char *)v21 + 1;
if ( (v21[0] & 1) != 0 )
v11 = (char *)v22;
sub_987EE8(a4, v23);
v12 = (char *)v23 + 1;
if ( (v23[0] & 1) != 0 )
v12 = (char *)v24;
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)off_50 + 7,
"mfv",
"3899",
103,
99,
"9");
CString = cocos2d::CCString::getCString(v13);
v15 = a1 + 473;
if ( (*(_BYTE *)(a1 + 472) & 1) != 0 )
v15 = *(_QWORD *)(a1 + 488);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"userName=%s&password=%s&email=%s&secret=%s&rsession=%s",
v10,
v11,
v12,
CString,
v15);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
if ( (v19[0] & 1) != 0 )
operator delete(v20);
v17 = (char *)cocos2d::CCString::getCString(v16);
v19[0] = 0;
v19[1] = 0;
v20 = nullptr;
std::string::__init(v19, "https://www.boomlings.com/database/accounts/registerGJAccount.php", 0x41u);
v21[0] = 0;
v21[1] = 0;
v22 = nullptr;
v18 = strlen(v17);
std::string::__init(v21, v17, v18);
v23[0] = 0;
v23[1] = 0;
v24 = nullptr;
std::string::__init(v23, "RegisterAccount", 0xFu);
GJAccountManager::ProcessHttpRequest((cocos2d::CCObject *)a1, (__int64)v19, (__int64)v21, (__int64)v23, 24);
if ( (v23[0] & 1) != 0 )
operator delete(v24);
if ( (v21[0] & 1) != 0 )
operator delete(v22);
if ( (v19[0] & 1) != 0 )
operator delete(v20);
return 1;
}
return result;
}