//
// GJAccountManager::onGetAccountBackupURLCompleted from 0x10009fca0 to 0x10009fe67 (455 bytes)
//
// 1 xrefs:
// > GJAccountManager::handleIt @ 0x10009ddb4
//
// 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 12:20:13 +0000
//
void __fastcall GJAccountManager::onGetAccountBackupURLCompleted(__int64 a1, unsigned __int8 *a2)
{
const void *v2; // r15
unsigned __int64 v3; // rcx
char *v4; // r14
size_t v5; // rdx
__int64 v6; // rdi
__int64 v7; // rax
const char *CString; // r12
size_t v9; // rax
size_t v10; // r15
char v11; // r15
size_t v12; // r13
char v13; // r14
__int64 v14; // rdi
__int128 v15; // [rsp+0h] [rbp-60h] BYREF
void *__p; // [rsp+10h] [rbp-50h]
__int128 __s2; // [rsp+20h] [rbp-40h] BYREF
void *v18; // [rsp+30h] [rbp-30h]
GJAccountManager::removeDLFromActive(a1, "burl_account");
*(_WORD *)((char *)&__s2 + 1) = 12589;
BYTE3(__s2) = 0;
v2 = a2 + 1;
v3 = *a2 >> 1;
if ( (*a2 & 1) != 0 )
v2 = *((const void **)a2 + 2);
v4 = (char *)&__s2 + 1;
if ( (*a2 & 1) != 0 )
v3 = *((_QWORD *)a2 + 1);
v5 = 2;
if ( v3 < 2 )
v5 = v3;
if ( !((v3 != 2) | (memcmp(v2, (char *)&__s2 + 1, v5) != 0)) )
{
v6 = *(_QWORD *)(a1 + 416);
if ( v6 )
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v6 + 8LL))(v6, 0xFFFFFFFFLL, 0);
return;
}
v7 = sub_10088E820("%s/database/accounts/backupGJAccountNew.php", v15);
CString = (const char *)cocos2d::CCString::getCString(v7);
v9 = strlen(CString);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v10 = v9;
if ( v9 >= 0x17 )
{
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = (v9 | 7) + 1;
v4 = (char *)operator new(v12);
v18 = v4;
*(_QWORD *)&__s2 = v12 + 1;
*((_QWORD *)&__s2 + 1) = v10;
LABEL_18:
memmove(v4, CString, v10);
v4[v10] = 0;
v11 = __s2;
if ( (__s2 & 1) == 0 )
goto LABEL_14;
LABEL_19:
sub_10001AD30(&v15, v18, *((unsigned __int64 *)&__s2 + 1));
goto LABEL_20;
}
LOBYTE(__s2) = 2 * v9;
if ( v9 )
goto LABEL_18;
BYTE1(__s2) = 0;
v11 = __s2;
if ( (__s2 & 1) != 0 )
goto LABEL_19;
LABEL_14:
__p = v18;
v15 = __s2;
LABEL_20:
v13 = GJAccountManager::backupAccount(a1, &v15);
if ( (v15 & 1) != 0 )
operator delete(__p);
if ( !v13 )
{
v14 = *(_QWORD *)(a1 + 416);
if ( v14 )
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v14 + 8LL))(v14, 0xFFFFFFFFLL, 0);
}
if ( (v11 & 1) != 0 )
operator delete(v18);
}