// // sub_10059ADA0 from 0x10059ada0 to 0x10059af4b (427 bytes) // // 1 xrefs: // > sub_10059B800 @ 0x10059b93a // // This function is hookable on this platform (idp: pc, 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:32:30 +0000 // void *__fastcall sub_10059ADA0(unsigned __int8 *a1) { unsigned int v2; // eax size_t v3; // rdx unsigned int v4; // ecx char *v5; // rdi _QWORD *v6; // r14 __int64 v7; // r12 pthread_mutex_t *v8; // r15 __int64 *v9; // r12 _QWORD *v10; // rax __int64 v11; // rcx char v12; // r15 _QWORD *v13; // rax _QWORD *v14; // r14 unsigned __int8 *v15; // rax __int64 v16; // r12 pthread_mutex_t *v17; // r15 __int64 *v18; // r12 _QWORD *v19; // rax __int64 v20; // rcx void *v21; // rdi v2 = a1[104]; if ( (v2 & 1) != 0 ) { v3 = *((_QWORD *)a1 + 14); v4 = a1[32]; if ( (v4 & 1) == 0 ) goto LABEL_3; LABEL_6: if ( v3 != *((_QWORD *)a1 + 5) ) goto LABEL_13; goto LABEL_7; } v3 = v2 >> 1; v4 = a1[32]; if ( (v4 & 1) != 0 ) goto LABEL_6; LABEL_3: if ( v3 != v4 >> 1 ) goto LABEL_13; LABEL_7: if ( (v2 & 1) != 0 ) { v5 = *((char **)a1 + 15); if ( (v4 & 1) == 0 ) goto LABEL_9; } else { v5 = (char *)(a1 + 105); if ( (v4 & 1) == 0 ) { LABEL_9: if ( !memcmp(v5, a1 + 33, v3) ) goto LABEL_15; goto LABEL_13; } } if ( !memcmp(v5, *((const void **)a1 + 6), v3) ) { LABEL_15: v12 = sub_10059B2C0(a1); v13 = operator new(0x10u); v14 = v13; if ( v12 ) { *(_DWORD *)v13 = 0; v15 = a1; } else { v13[1] = 0; *(_DWORD *)v13 = 3; v15 = (unsigned __int8 *)operator new(0x10u); *(_OWORD *)v15 = 0; *(_DWORD *)v15 = 3; *((_QWORD *)v15 + 1) = a1; } v14[1] = v15; v16 = *((_QWORD *)a1 + 17); v17 = (pthread_mutex_t *)(v16 + 64); pthread_mutex_lock((pthread_mutex_t *)(v16 + 64)); v18 = *(__int64 **)(v16 + 56); v19 = operator new(0x18u); v19[2] = v14; v19[1] = v18; v20 = *v18; *v19 = *v18; *(_QWORD *)(v20 + 8) = v19; *v18 = (__int64)v19; ++v18[2]; pthread_mutex_unlock(v17); goto LABEL_19; } LABEL_13: if ( (unsigned __int8)sub_10059AF50(a1) ) { v6 = operator new(0x10u); *(_DWORD *)v6 = 1; v6[1] = a1; v7 = *((_QWORD *)a1 + 17); v8 = (pthread_mutex_t *)(v7 + 64); pthread_mutex_lock((pthread_mutex_t *)(v7 + 64)); v9 = *(__int64 **)(v7 + 56); v10 = operator new(0x18u); v10[2] = v6; v10[1] = v9; v11 = *v9; *v10 = *v9; *(_QWORD *)(v11 + 8) = v10; *v9 = (__int64)v10; ++v9[2]; pthread_mutex_unlock(v8); goto LABEL_15; } LABEL_19: v21 = *((void **)a1 + 18); if ( v21 ) { operator delete(v21); *((_QWORD *)a1 + 18) = 0; } return nullptr; }
GD Web Decomp Icon

GD Web Decomp

Raw Source