//
// sub_3D427C from 0x3d427c to 0x3d431a (158 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:46:42 +0000
//
int __fastcall sub_3D427C(int a1, int a2, int a3, int a4)
{
pthread_key_t *v5; // r7
std::__thread_struct *v6; // r8
std::__thread_struct *v7; // r5
int v8; // r0
int v9; // r1
int v10; // r2
int v12; // [sp+0h] [bp-10h] BYREF
int v13; // [sp+4h] [bp-Ch]
int v14; // [sp+8h] [bp-8h]
int v15; // [sp+Ch] [bp-4h]
v12 = a1;
v13 = a2;
v14 = a3;
v15 = a4;
v5 = (pthread_key_t *)std::__thread_local_data();
v6 = *(std::__thread_struct **)a1;
*(_DWORD *)a1 = 0;
v7 = (std::__thread_struct *)pthread_getspecific(*v5);
pthread_setspecific(*v5, v6);
if ( v7 )
{
std::__thread_struct::~__thread_struct(v7);
operator delete(v7);
}
v8 = *(_DWORD *)(a1 + 12);
v9 = *(_DWORD *)(a1 + 16);
v10 = *(_DWORD *)(a1 + 20);
*(_DWORD *)(a1 + 12) = 0;
*(_DWORD *)(a1 + 16) = 0;
*(_DWORD *)(a1 + 20) = 0;
v12 = v8;
v13 = v9;
v14 = v10;
sub_3D4220((_DWORD *)(a1 + 4), (int)&v12);
std::string::~string((int)&v12);
sub_3D408A((std::__thread_struct **)a1);
operator delete((void *)a1);
return 0;
}