Function at 0x58cd20
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59dc18
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x600088]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
push edi
mov dword [ebp - 4], 0
call fcn.0058c580
mov esi, eax
add esp, 4
or ebx, 0xffffffff
test esi, esi
je 0x58cead
cmp byte [ebp + 0x18], 0
je 0x58cd81
mov ecx, dword [esi]
test ecx, ecx
je 0x58cd81
mov edx, dword [esi + 8]
test edx, edx
je 0x58cd81
mov eax, dword [ecx]
push edx
call dword [eax + 4]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x58ce53
test ebx, ebx
jne 0x58ce53
mov eax, dword [0x600bd4]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0xffffffff
je 0x58cdb1
push eax
call esi
test eax, eax
jne 0x58cdc7
call fcn.0058c780
mov eax, dword [0x600bd4]
cmp eax, 0xffffffff
jne 0x58cdc4
xor eax, eax
jmp 0x58cdc7
push eax
call esi
mov ebx, dword [eax + 0x14]
add eax, 0x14
mov dword [ebp - 0x14], eax
mov esi, ebx
mov eax, dword [ebx + 4]
mov ecx, eax
cmp byte [ecx + 0xd], 0
jne 0x58ce01
nop dword [eax]
mov edx, dword [ecx + 0x10]
cmp edx, edi
jae 0x58cdec
mov ecx, dword [ecx + 8]
jmp 0x58cdfb
cmp byte [esi + 0xd], 0
je 0x58cdf7
cmp edi, edx
cmovb esi, ecx
mov ebx, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x58cde0
cmp byte [esi + 0xd], 0
jne 0x58ce09
mov eax, dword [esi]
cmp byte [eax + 0xd], 0
jne 0x58ce24
nop
cmp edi, dword [eax + 0x10]
jae 0x58ce1b
mov esi, eax
mov eax, dword [eax]
jmp 0x58ce1e
mov eax, dword [eax + 8]
cmp byte [eax + 0xd], 0
je 0x58ce10
mov dword [ebp - 0x10], ebx
cmp ebx, esi
je 0x58ce3d
nop dword [eax + eax]
lea ecx, [ebp - 0x10]
call fcn.005498b0
cmp dword [ebp - 0x10], esi
jne 0x58ce30
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x10]
push esi
push ebx
push eax
call fcn.0058c470
or ebx, 0xffffffff
jmp 0x58cee2
mov edx, dword [ebp + 0x10]
test edx, edx
je 0x58ce69
lea ecx, [edx + 4]
mov eax, 1
lock xadd dword [ecx], eax
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
mov edi, dword [esi + 4]
mov dword [esi + 4], edx
mov byte [ebp - 4], 1
test edi, edi
je 0x58cea5
lea eax, [edi + 4]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x58cea5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
lea eax, [edi + 8]
or edx, 0xffffffff
lock xadd dword [eax], edx
cmp edx, 1
jne 0x58cea5
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 8]
mov dword [esi + 8], ebx
or ebx, 0xffffffff
jmp 0x58cee2
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
test ecx, ecx
jne 0x58cebb
test eax, eax
je 0x58cee2
push eax
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
test ecx, ecx
je 0x58ced9
add ecx, 4
mov eax, 1
lock xadd dword [ecx], eax
push edi
call fcn.0058bf90
add esp, 0x10
mov esi, dword [ebp + 0x10]
mov dword [ebp - 4], 2
test esi, esi
je 0x58cf18
lea eax, [esi + 4]
mov ecx, ebx
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x58cf18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
lock xadd dword [eax], ebx
cmp ebx, 1
jne 0x58cf18
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret