Function at 0x518d20
Capabilities:
Get thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x542a88
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x58ab78]
xor eax, esp
mov dword [esp + 0x34], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x58ab78]
xor eax, esp
push eax
lea eax, [esp + 0x4c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x5c]
or ebp, 0xffffffff
xorps xmm0, xmm0
mov dword [esp + 0x28], 0xffffffff
xor edi, edi
mov dword [esp + 0x24], 0xffffffff
mov dword [esp + 0x20], ebp
movdqu xmmword [esp + 0x38], xmm0
cmp eax, 0xffffffff
je 0x518d8a
mov dword [esp + 0x28], edi
mov edi, 1
mov dword [esp + 0x38], eax
mov eax, dword [0x58c3cc]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0xffffffff
je 0x518dd7
push eax
call ebx
test eax, eax
je 0x518dd7
mov eax, dword [0x58c3cc]
cmp eax, 0xffffffff
jne 0x518daf
xor ecx, ecx
jmp 0x518db9
push eax
call ebx
mov ecx, eax
mov eax, dword [0x58c3cc]
cmp byte [ecx + 0x38], 0
je 0x518dd7
mov dword [esp + 0x24], edi
cmp eax, 0xffffffff
jne 0x518dcc
xor eax, eax
jmp 0x518dcf
push eax
call ebx
mov eax, dword [eax + 0x34]
mov dword [esp + edi*4 + 0x38], eax
inc edi
xor esi, esi
mov dword [esp + 0x2c], esi
mov eax, dword [esp + 0x68]
and eax, dword [esp + 0x6c]
mov dword [esp + 0x54], esi
cmp eax, 0xffffffff
je 0x518e98
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x64]
call fcn.005191c0
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov esi, eax
mov dword [esp + 0x2c], esi
test esi, esi
je 0x518e98
mov eax, 0xcccccccd
mov ebx, 0x20
mul dword [esp + 0x1c]
lea eax, [esp + 0x60]
shr edx, 4
cmp edx, ebx
push eax
cmova ebx, edx
call fcn.00518a70
mov ecx, dword [0x59da20]
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
test ecx, ecx
jne 0x518e73
push str.SetWaitableTimerEx
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov ecx, 0x517f20
cmovne ecx, eax
mov dword [0x59da20], ecx
push ebx
push 0
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push esi
call ecx
test eax, eax
setne al
test al, al
je 0x518e98
mov ebp, edi
mov dword [esp + 0x20], edi
mov dword [esp + edi*4 + 0x38], esi
inc edi
cmp ebp, 0xffffffff
mov byte [esp + 0x17], 0
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
setne cl
xor ebx, ebx
mov byte [esp + 0x16], cl
or edx, 0xffffffff
test cl, cl
jne 0x518eda
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x64]
call fcn.005191c0
or edx, 0xffffffff
mov ecx, dword [eax]
mov ebx, dword [eax + 4]
mov al, cl
mov dword [esp + 0x18], ecx
mov cl, byte [esp + 0x16]
mov byte [esp + 0x17], al
test edi, edi
je 0x518f49
push 0
test cl, cl
mov eax, ebx
cmovne eax, edx
push eax
push 0
lea eax, [esp + 0x44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
cmp eax, edi
jae 0x518f53
cmp eax, dword [esp + 0x28]
je 0x518fa6
cmp eax, dword [esp + 0x24]
je 0x518f74
cmp eax, dword [esp + 0x20]
jne 0x518f53
mov dword [esp + 0x54], 0xffffffff
test esi, esi
je 0x518f28
cmp esi, 0xffffffff
je 0x518f28
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.0049f3ce
add esp, 0x44
ret
test ebx, ebx
jne 0x518f50
push ebx
jmp 0x518f51
push ebx
call ebp
cmp byte [esp + 0x70], 0
je 0x518f64
add dword [esp + 0x68], 2
adc dword [esp + 0x6c], 0xffffffff
cmp byte [esp + 0x17], 0
je 0x518f10
mov cl, byte [esp + 0x16]
jmp 0x518eaf
mov eax, dword [0x58c3cc]
cmp eax, 0xffffffff
jne 0x518f82
xor eax, eax
jmp 0x518f89
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax + 0x34]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x586074
lea eax, [esp + 0x1a]
mov byte [esp + 0x1a], 0
push eax
call fcn.004a06b8
mov dword [esp + 0x54], 0xffffffff
test esi, esi
je 0x518fbe
cmp esi, 0xffffffff
je 0x518fbe
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x518f2a