// // __emutls_get_address from 0x110a2a8 to 0x110a3f8 (336 bytes) // // 18 xrefs: // > sub_D1CD80 @ 0xd1cd98 // > sub_D1CD80 @ 0xd1cdc0 // > std::__ndk1::vector>::assign @ 0xd1e1d4 // > std::__ndk1::vector>::assign @ 0xd1e23c // > std::__ndk1::vector>::assign @ 0xd1e2e0 // > std::__ndk1::vector>::assign @ 0xd1e3b0 // > std::__ndk1::vector>::assign @ 0xd1e414 // > __cxa_thread_atexit @ 0xf89d2c // > __cxa_thread_atexit @ 0xf89d54 // > __cxa_thread_atexit @ 0xf89d7c // > sub_F89DD4 @ 0xf89dec // > sub_F89DD4 @ 0xf89e08 // > sub_F89DD4 @ 0xf89e24 // > sub_F89DD4 @ 0xf89e38 // > sub_F89E54 @ 0xf89e6c // > sub_F89E54 @ 0xf89e88 // > sub_F89E54 @ 0xf89eb4 // > @ 0xd9948 // // 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 13:18:31 +0000 // _QWORD *__fastcall _emutls_get_address(size_t *a1) { _QWORD *result; // x0 unsigned __int64 v3; // x19 unsigned __int64 *v4; // x0 unsigned __int64 *v5; // x20 unsigned __int64 *v6; // x0 pthread_key_t v7; // w0 unsigned __int64 v8; // x23 __int64 v9; // x21 unsigned __int64 *v10; // x0 __int64 v11; // x19 if ( !&pthread_create ) { if ( !a1[2] ) a1[2] = (size_t)sub_110A210(a1); return (_QWORD *)a1[2]; } v3 = atomic_load(a1 + 2); if ( !v3 ) { pthread_once(dword_1568E7C, (void (*)(void))sub_110A190); pthread_mutex_lock((pthread_mutex_t *)&dword_1568E7C[1]); v3 = a1[2]; if ( !v3 ) { v3 = qword_1568EA8 + 1; qword_1568EA8 = v3; atomic_store(v3, a1 + 2); } pthread_mutex_unlock((pthread_mutex_t *)&dword_1568E7C[1]); } v4 = (unsigned __int64 *)pthread_getspecific(dword_1568E78[0]); v5 = v4; if ( v4 ) { v8 = *v4; if ( v3 <= *v4 ) goto LABEL_19; v9 = 2 * v8; if ( v3 > 2 * v8 ) v9 = v3 + 32; v10 = (unsigned __int64 *)realloc(v4, 8 * (v9 + 1)); v5 = v10; if ( !v10 ) LABEL_11: abort(); *v10 = v9; memset(&v10[v8 + 1], 0, 8 * (v9 - v8)); v7 = dword_1568E78[0]; } else { v6 = (unsigned __int64 *)calloc(v3 + 33, 8u); v5 = v6; if ( !v6 ) goto LABEL_11; *v6 = v3 + 32; v7 = dword_1568E78[0]; } pthread_setspecific(v7, v5); LABEL_19: v11 = v3; result = (_QWORD *)v5[v11]; if ( !result ) { result = sub_110A210(a1); v5[v11] = (unsigned __int64)result; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source