//
// GJAccountManager::registerAccount from 0x581e44 to 0x581fc8 (388 bytes)
//
// 1 xrefs:
// > AccountRegisterLayer::onSubmit @ 0x588d98
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:52:54 +0000
//
int __fastcall GJAccountManager::registerAccount(int a1, unsigned __int8 *a2, unsigned __int8 *a3, unsigned __int8 *a4)
{
int v8; // r2
int v9; // r3
const char *v10; // r11
char *v11; // r4
char *v12; // r10
cocos2d::CCString *v13; // r0
int CString; // r0
int v15; // r3
cocos2d::CCString *v16; // r4
const char *v17; // r0
const char *v18; // r10
size_t v19; // r0
int v21[2]; // [sp+10h] [bp-2Ch] BYREF
const char *v22; // [sp+18h] [bp-24h]
int v23[2]; // [sp+1Ch] [bp-20h] BYREF
char *v24; // [sp+24h] [bp-18h]
int v25[2]; // [sp+28h] [bp-14h] BYREF
char *v26; // [sp+30h] [bp-Ch]
if ( GJAccountManager::isDLActive((GJAccountManager *)a1, "reg_account") )
return 0;
GJAccountManager::addDLToActive((GJAccountManager *)a1, "reg_account", v8, v9);
sub_581414(v21, a2);
if ( (v21[0] & 1) != 0 )
v10 = v22;
else
v10 = (char *)v21 + 1;
sub_581414(v23, a3);
if ( (v23[0] & 1) != 0 )
v11 = v24;
else
v11 = (char *)v23 + 1;
sub_581414(v25, a4);
if ( (v25[0] & 1) != 0 )
v12 = v26;
else
v12 = (char *)v25 + 1;
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%c%s%s%c%c%s",
(const char *)&dword_54 + 3,
"mfv",
"3899",
103,
99,
&a1i2r3e45s789g[11]);
CString = cocos2d::CCString::getCString(v13);
if ( (*(_BYTE *)(a1 + 348) & 1) != 0 )
v15 = *(_DWORD *)(a1 + 356);
else
v15 = a1 + 349;
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"userName=%s&password=%s&email=%s&secret=%s&rsession=%s",
v10,
v11,
v12,
CString,
v15);
std::string::~string((int)v25);
std::string::~string((int)v23);
std::string::~string((int)v21);
v17 = (const char *)cocos2d::CCString::getCString(v16);
v21[0] = 0;
v21[1] = 0;
v22 = nullptr;
v18 = v17;
std::string::__init(v21, "https://www.boomlings.com/database/accounts/registerGJAccount.php", 0x41u);
v23[0] = 0;
v23[1] = 0;
v24 = nullptr;
v19 = strlen(v18);
std::string::__init(v23, v18, v19);
v25[0] = 0;
v25[1] = 0;
v26 = nullptr;
std::string::__init(v25, "RegisterAccount", 0xFu);
GJAccountManager::ProcessHttpRequest((cocos2d::CCObject *)a1, (int)v21, (int)v23, (int)v25, 24);
std::string::~string((int)v25);
std::string::~string((int)v23);
std::string::~string((int)v21);
return 1;
}