Function at 0x10005960
Capabilities:
Allocate thread local storage

Disassembly:
push edi
push esi
cmp dword [0x1007f2c0], 1
jne 0x1000596e
pop esi
pop edi
ret
push 0x1007f020
call fcn.10003e30
add esp, 4
mov eax, dword [0x1007f2d4]
test eax, eax
je 0x100059a3
nop word cs:[eax + eax]
mov esi, eax
cmp dword [eax], 0x1007f2c0
je 0x100059e3
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x10005990
jmp 0x100059a5
xor esi, esi
push 0x10
push 1
call sub.msvcrt.dll_calloc
add esp, 8
mov edi, eax
mov dword [eax], 0x1007f2c0
lea eax, [esi + 0xc]
test esi, esi
mov ecx, 0x1007f2d4
cmovne ecx, eax
mov dword [edi + 8], 1
mov dword [ecx], edi
mov eax, edi
add eax, 4
push 0
push eax
call fcn.100031d0
add esp, 8
mov esi, edi
jmp 0x100059e6
inc dword [esi + 8]
push 0x1007f020
call fcn.10003e70
add esp, 4
lea edi, [esi + 4]
push edi
call fcn.10002f70
add esp, 4
mov eax, dword [0x1007f2c0]
cmp eax, 1
je 0x10005a4d
test eax, eax
jne 0x10005a29
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x1007f01c], eax
cmp eax, 0xffffffff
je 0x10005a5f
mov dword [0x1007f2c0], 1
jmp 0x10005a4d
push 2
call dword [0x1007f058]
add esp, 4
push dword [0x1007f2c0]
push 0x1007f2c0
push str._once__p_is__ld_n
push eax
call sub.msvcrt.dll_fprintf
add esp, 0x10
push edi
call fcn.100030d0
add esp, 4
mov ecx, esi
pop esi
pop edi
jmp fcn.10004820
call sub.msvcrt.dll_abort
nop word cs:[eax + eax]
push ebp
push ebx
push edi
push esi
sub esp, 0x50
call fcn.10005d80
mov ebp, 0xb
test eax, eax
je 0x10005d2e
mov ebx, eax
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x6c]
mov edi, dword [esp + 0x64]
mov esi, ebx
test edi, edi
je 0x10005aa5
mov edx, dword [esi + 0xb4]
mov dword [edi], edx
mov dword [esi + 0x68], 0
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
mov dword [esi + 0x24], 1
mov dword [esi + 0x14], 0xffffffff
movaps xmm0, xmmword [0x100741f0]
movups xmmword [esp], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [esi + 0x18], eax
test eax, eax
jne 0x10005b9f
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
movaps xmm0, xmmword [0x100741f0]
movups xmmword [esp], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [esi + 0x18], eax
test eax, eax
jne 0x10005b9f
mov dword [esp], 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
movaps xmm0, xmmword [0x100741f0]
movups xmmword [esp], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [esi + 0x18], eax
test eax, eax
jne 0x10005b9f
mov dword [esp], 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
movaps xmm0, xmmword [0x100741f0]
movups xmmword [esp], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [esi + 0x18], eax
test eax, eax
jne 0x10005b9f
mov dword [esp], 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
movaps xmm0, xmmword [0x100741f0]
movups xmmword [esp], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
mov dword [esi + 0x18], eax
test eax, eax
jne 0x10005b9f
mov dword [esp], 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
mov dword [esi + 0x1c], 0xffffffff
lea edi, [ebx + 0x38]
mov dword [esp], edi
call fcn.10003e20
cmp eax, 1
je 0x10005d38
mov dword [esi + 0x38], 0xffffffff
mov dword [esi], 0xbab1f00d
mov dword [esi + 0x6c], 0
mov dword [esi + 0x64], 0
cmp dword [esi + 0x18], 0
je 0x10005ce6
mov eax, dword [esp + 0x68]
test eax, eax
je 0x10005bf9
mov ecx, dword [eax]
mov dword [esi + 0x24], ecx
mov ebp, dword [eax + 8]
test cl, 8
jne 0x10005bfd
add eax, 0xc
jmp 0x10005c05
xor ebp, ebp
jmp 0x10005c0a
call fcn.100043d0
add eax, 0x6c
mov eax, dword [eax]
mov dword [esi + 0x6c], eax
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebp
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 4
mov dword [esp + 8], 0x100057f0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
je 0x10005ca1
mov ebp, eax
cmp eax, 0xffffffff
je 0x10005ca1
mov ecx, dword [esi + 0x6c]
mov eax, 0xfffffff1
cmp ecx, 0xfffffff2
jl 0x10005c6e
mov eax, 0xfffffffe
cmp ecx, 0xffffffff
jl 0x10005c6e
mov eax, 0xf
cmp ecx, 0xe
jg 0x10005c6e
cmp ecx, 2
mov eax, 2
cmovl eax, ecx
mov dword [esp + 4], eax
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
sub esp, 8
mov eax, dword [esi + 0x18]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
sub esp, 4
test byte [esi + 0x24], 4
jne 0x10005cfd
mov dword [esi + 0x14], ebp
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x10005d19
add ebx, 0x1c
mov eax, dword [esi + 0x18]
test eax, eax
je 0x10005cb7
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [esp], ebx
call fcn.10003260
mov dword [esp], edi
call fcn.10003e20
cmp eax, 1
mov ebp, 0xb
je 0x10005d38
mov dword [esi + 0x38], 0xffffffff
mov dword [esi + 0x18], 0
mov dword [esi + 0x14], 0
mov eax, dword [esp + 0x64]
test eax, eax
je 0x10005cf4
mov dword [eax], 0
mov ecx, esi
call fcn.10004f50
jmp 0x10005d2e
mov dword [esi + 0x14], 0
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_ResumeThread]
sub esp, 4
mov dword [esp], ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
xor ebp, ebp
mov eax, ebp
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
xorps xmm0, xmm0
movsd qword [esp + 0x45], xmm0
xorps xmm0, xmm0
movups xmmword [esp + 0x38], xmm0
movups xmmword [esp + 0x28], xmm0
movups xmmword [esp + 0x18], xmm0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esp + 0xc], eax
lea esi, [esp + 0x18]
mov dword [esp], esi
call fcn.10006770
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
sub esp, 4
call sub.msvcrt.dll_abort
nop word [eax + eax]