//
// GJAccountManager::onGetAccountBackupURLCompleted from 0x10039feb8 to 0x10039fff8 (320 bytes)
//
// 1 xrefs:
// > GJAccountManager::handleIt @ 0x10039eef8
//
// 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
//
void __fastcall GJAccountManager::onGetAccountBackupURLCompleted(GJAccountManager *a1, char *a2)
{
_BOOL4 v4; // w0
_BOOL4 v5; // w21
GJAccountBackupDelegate *m_backupDelegate; // x0
cocos2d::CCString *v7; // x0
char *CString; // x0
char v9; // w0
char v10; // w20
GJAccountBackupDelegate *v11; // x0
void *__dst[2]; // [xsp+10h] [xbp-50h] BYREF
__int64 v13; // [xsp+20h] [xbp-40h]
void *__p[2]; // [xsp+28h] [xbp-38h] BYREF
__int64 v15; // [xsp+38h] [xbp-28h]
GJAccountManager::removeDLFromActive(a1, "burl_account");
sub_100009900(__p, "-1");
v4 = sub_1000045BC(a2, __p);
v5 = v4;
if ( SHIBYTE(v15) < 0 )
{
operator delete(__p[0]);
if ( v5 )
{
LABEL_3:
m_backupDelegate = a1->m_backupDelegate;
if ( m_backupDelegate )
((void (__fastcall *)(GJAccountBackupDelegate *, __int64, _QWORD))m_backupDelegate->backupAccountFailed)(
m_backupDelegate,
0xFFFFFFFFLL,
0);
return;
}
}
else if ( v4 )
{
goto LABEL_3;
}
if ( a2[23] < 0 )
a2 = *(char **)a2;
v7 = (cocos2d::CCString *)sub_100268F4C("%s/database/accounts/backupGJAccountNew.php", a2);
CString = (char *)cocos2d::CCString::getCString(v7);
sub_100009900(__p, CString);
if ( SHIBYTE(v15) < 0 )
{
sub_1000097D0(__dst, __p[0], (unsigned __int64)__p[1]);
}
else
{
*(_OWORD *)__dst = *(_OWORD *)__p;
v13 = v15;
}
v9 = GJAccountManager::backupAccount(a1, __dst);
v10 = v9;
if ( SHIBYTE(v13) < 0 )
{
operator delete(__dst[0]);
if ( (v10 & 1) != 0 )
goto LABEL_17;
LABEL_15:
v11 = a1->m_backupDelegate;
if ( v11 )
((void (__fastcall *)(GJAccountBackupDelegate *, __int64, _QWORD))v11->backupAccountFailed)(v11, 0xFFFFFFFFLL, 0);
goto LABEL_17;
}
if ( (v9 & 1) == 0 )
goto LABEL_15;
LABEL_17:
if ( SHIBYTE(v15) < 0 )
operator delete(__p[0]);
}