//
// sub_844A20 from 0x844a20 to 0x844a64 (68 bytes)
//
// 81 xrefs:
// > sub_844C0C @ 0x844e98
// > sub_844C0C @ 0x844eb4
// > GJAccountManager::ProcessHttpRequest @ 0x845218
// > GJAccountManager::ProcessHttpRequest @ 0x845240
// > GJAccountManager::handleItDelayed @ 0x845430
// > GJAccountManager::handleItDelayed @ 0x84544c
// > GJAccountManager::addDLToActive @ 0x845554
// > GJAccountManager::getDLObject @ 0x84567c
// > GJAccountManager::removeDLFromActive @ 0x845788
// > GJAccountManager::registerAccount @ 0x845a1c
// > GJAccountManager::registerAccount @ 0x845a48
// > GJAccountManager::registerAccount @ 0x845a70
// > GJAccountManager::loginAccount @ 0x845f58
// > GJAccountManager::loginAccount @ 0x845f84
// > GJAccountManager::loginAccount @ 0x845fac
// > GJAccountManager::loginAccount @ 0x845fd4
// > GJAccountManager::loginAccount @ 0x845ffc
// > GJAccountManager::getAccountBackupURL @ 0x84668c
// > GJAccountManager::getAccountBackupURL @ 0x8466a8
// > GJAccountManager::getAccountBackupURL @ 0x8466d4
// > GJAccountManager::getAccountBackupURL @ 0x846708
// > GJAccountManager::backupAccount @ 0x846bdc
// > GJAccountManager::backupAccount @ 0x846c08
// > GJAccountManager::backupAccount @ 0x846c24
// > GJAccountManager::backupAccount @ 0x846c40
// > GJAccountManager::backupAccount @ 0x846c68
// > GJAccountManager::backupAccount @ 0x846c90
// > GJAccountManager::backupAccount @ 0x846cb8
// > GJAccountManager::onGetAccountBackupURLCompleted @ 0x846f78
// > GJAccountManager::onGetAccountBackupURLCompleted @ 0x846f94
// > GJAccountManager::getAccountSyncURL @ 0x847610
// > GJAccountManager::getAccountSyncURL @ 0x84762c
// > GJAccountManager::getAccountSyncURL @ 0x847658
// > GJAccountManager::getAccountSyncURL @ 0x84768c
// > GJAccountManager::syncAccount @ 0x847968
// > GJAccountManager::syncAccount @ 0x847984
// > GJAccountManager::syncAccount @ 0x8479b0
// > GJAccountManager::syncAccount @ 0x8479e4
// > GJAccountManager::onGetAccountSyncURLCompleted @ 0x847c94
// > GJAccountManager::onGetAccountSyncURLCompleted @ 0x847cb0
// > GJAccountManager::linkToAccount @ 0x847e3c
// > GJAccountManager::getShaPassword @ 0x848214
// > GJAccountManager::dataLoaded @ 0x84853c
// > GJAccountManager::dataLoaded @ 0x848560
// > GJAccountManager::dataLoaded @ 0x848588
// > GJAccountManager::onSyncAccountCompleted @ 0x848ce4
// > GJAccountManager::onSyncAccountCompleted @ 0x848e3c
// > GJAccountManager::onSyncAccountCompleted @ 0x848e48
// > GJAccountManager::onSyncAccountCompleted @ 0x848e54
// > GJAccountManager::onSyncAccountCompleted @ 0x848e70
// > GJAccountManager::onSyncAccountCompleted @ 0x848e7c
// > GJAccountManager::onSyncAccountCompleted @ 0x848e88
// > GJAccountManager::onSyncAccountCompleted @ 0x848e94
// > GJAccountManager::onSyncAccountCompleted @ 0x848ea0
// > GJAccountManager::onSyncAccountCompleted @ 0x848eac
// > GJAccountManager::onSyncAccountCompleted @ 0x848eb8
// > GJAccountManager::onSyncAccountCompleted @ 0x848ec4
// > GJAccountManager::onSyncAccountCompleted @ 0x848ed0
// > GJAccountManager::onSyncAccountCompleted @ 0x848ef8
// > GJAccountManager::onSyncAccountCompleted @ 0x848f20
// > GJAccountManager::onSyncAccountCompleted @ 0x848f3c
// > GJAccountManager::onSyncAccountCompleted @ 0x848f7c
// > GJAccountManager::onSyncAccountCompleted @ 0x848f98
// > GJAccountManager::onSyncAccountCompleted @ 0x848fb4
// > GJAccountManager::onSyncAccountCompleted @ 0x848fd8
// > GJAccountManager::onSyncAccountCompleted @ 0x848ffc
// > GJAccountManager::onSyncAccountCompleted @ 0x84904c
// > GJAccountManager::onSyncAccountCompleted @ 0x849068
// > GJAccountManager::onSyncAccountCompleted @ 0x849094
// > GJAccountManager::onSyncAccountCompleted @ 0x8490b0
// > GJAccountManager::handleIt @ 0x849758
// > GJAccountManager::handleIt @ 0x849774
// > GJAccountManager::onProcessHttpRequestCompleted @ 0x849998
// > GJAccountManager::onProcessHttpRequestCompleted @ 0x8499c4
// > GJAccountManager::onProcessHttpRequestCompleted @ 0x8499e0
// > GJAccountManager::handleItND @ 0x849b64
// > GJAccountManager::handleItND @ 0x849b80
// > GJAccountManager::updateAccountSettings @ 0x849f48
// > GJAccountManager::updateAccountSettings @ 0x849f64
// > GJAccountManager::updateAccountSettings @ 0x849f8c
// > GJAccountManager::updateAccountSettings @ 0x849fb4
//
// 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 sub_844A20(void *p)
{
unsigned int *v1; // x3
int v2; // w2
int v3; // w2
if ( !&pthread_create )
{
v3 = *((_DWORD *)p + 4);
*((_DWORD *)p + 4) = v3 - 1;
if ( v3 > 0 )
return;
LABEL_7:
operator delete(p);
return;
}
v1 = (unsigned int *)((char *)p + 16);
do
v2 = __ldaxr(v1);
while ( __stlxr(v2 - 1, v1) );
if ( v2 <= 0 )
goto LABEL_7;
}