//
// sub_10059B260 from 0x10059b260 to 0x10059b2b5 (85 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall sub_10059B260(__int64 a1, __int64 a2)
{
__int64 *v2; // r14
_QWORD *v3; // rax
__int64 v4; // rcx
pthread_mutex_lock((pthread_mutex_t *)(a1 + 64));
v2 = *(__int64 **)(a1 + 56);
v3 = operator new(0x18u);
v3[2] = a2;
v3[1] = v2;
v4 = *v2;
*v3 = *v2;
*(_QWORD *)(v4 + 8) = v3;
*v2 = (__int64)v3;
++v2[2];
return pthread_mutex_unlock((pthread_mutex_t *)(a1 + 64));
}