//
// sub_4DC2A0 from 0x4dc2a0 to 0x4dc2e0 (64 bytes)
//
// 32 xrefs:
// > AccountRegisterLayer::registerAccountFinished @ 0x84dd3c
// > AccountRegisterLayer::registerAccountFinished @ 0x84dd68
// > AccountRegisterLayer::init @ 0x84f190
// > AccountRegisterLayer::init @ 0x84f1b8
// > AccountRegisterLayer::init @ 0x84f1dc
// > AccountRegisterLayer::init @ 0x84f204
// > AccountRegisterLayer::init @ 0x84f24c
// > AccountRegisterLayer::init @ 0x84f270
// > AccountRegisterLayer::onSubmit @ 0x84ff18
// > AccountRegisterLayer::onSubmit @ 0x84ff54
// > AccountRegisterLayer::onSubmit @ 0x84ff70
// > AccountRegisterLayer::onSubmit @ 0x84ff8c
// > AccountRegisterLayer::onSubmit @ 0x84ffa8
// > AccountRegisterLayer::onSubmit @ 0x84ffcc
// > AccountRegisterLayer::onSubmit @ 0x850010
// > AccountRegisterLayer::onSubmit @ 0x85002c
// > AccountRegisterLayer::onSubmit @ 0x850048
// > AccountRegisterLayer::textInputClosed @ 0x8508cc
// > AccountRegisterLayer::textInputClosed @ 0x8508e8
// > AccountRegisterLayer::textInputClosed @ 0x850914
// > AccountRegisterLayer::textInputClosed @ 0x85094c
// > AccountRegisterLayer::textInputClosed @ 0x85099c
// > AccountRegisterLayer::textInputClosed @ 0x8509c0
// > AccountLoginLayer::init @ 0x85160c
// > AccountLoginLayer::create @ 0x85181c
// > AccountLoginLayer::textInputClosed @ 0x851ba0
// > AccountLoginLayer::onSubmit @ 0x852140
// > AccountLoginLayer::onSubmit @ 0x852164
// > AccountLoginLayer::onSubmit @ 0x852188
// > AccountLoginLayer::loginAccountFinished @ 0x8524ac
// > AccountLoginLayer::loginAccountFinished @ 0x8524d8
// > AccountLoginLayer::loginAccountFinished @ 0x852504
//
// 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_4DC2A0(void *p)
{
unsigned int *v1; // x3
int v2; // w2
if ( &pthread_create )
{
v1 = (unsigned int *)((char *)p + 16);
do
v2 = __ldaxr(v1);
while ( __stlxr(v2 - 1, v1) );
}
else
{
v2 = *((_DWORD *)p + 4);
*((_DWORD *)p + 4) = v2 - 1;
}
if ( v2 <= 0 )
operator delete(p);
}