//
// GJAccountManager::removeDLFromActive from 0x987a9c to 0x987bb4 (280 bytes)
//
// 8 xrefs:
// > GJAccountManager::onRegisterAccountCompleted @ 0x987be4
// > GJAccountManager::onUpdateAccountSettingsCompleted @ 0x987dfc
// > GJAccountManager::onLoginAccountCompleted @ 0x98850c
// > GJAccountManager::onBackupAccountCompleted @ 0x9887fc
// > GJAccountManager::onSyncAccountCompleted @ 0x989c30
// > GJAccountManager::onGetAccountBackupURLCompleted @ 0x98b0e0
// > GJAccountManager::onGetAccountSyncURLCompleted @ 0x98b508
// > ??> @ 0xa4e18
//
// 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:54 +0000
//
__int64 __fastcall GJAccountManager::removeDLFromActive(GJAccountManager *this, const char *a2)
{
__int64 v2; // x23
size_t v3; // x0
size_t v4; // x19
const char *v5; // x1
unsigned __int64 v6; // x0
__int64 v7; // x22
char *v8; // x0
char *v9; // x3
__int64 v12; // [xsp+50h] [xbp+50h] BYREF
size_t v13; // [xsp+58h] [xbp+58h]
void *v14; // [xsp+60h] [xbp+60h]
v2 = *((_QWORD *)this + 40);
v12 = 0;
v13 = 0;
v14 = nullptr;
v3 = strlen(a2);
v4 = v3;
v5 = a2;
if ( v3 > 0xFFFFFFFFFFFFFFEFLL )
sub_62D5DC();
if ( v3 > 0x16 )
{
v6 = (v3 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v7 = v6 | 1;
v8 = (char *)operator new(v6);
v12 = v7;
v5 = a2;
v9 = v8;
v14 = v8;
v13 = v4;
LABEL_4:
v9 = (char *)memcpy(v9, v5, v4);
goto LABEL_5;
}
LOBYTE(v12) = 2 * v3;
v9 = (char *)&v12 + 1;
if ( v3 )
goto LABEL_4;
LABEL_5:
v9[v4] = 0;
cocos2d::CCDictionary::removeObjectForKey(v2, &v12);
if ( (v12 & 1) != 0 )
operator delete(v14);
return _stack_chk_guard;
}