Function at 0x1005fa90
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x450
mov eax, dword [0x1007e5f0]
xor eax, esp
mov dword [esp + 0x44c], eax
mov ecx, dword [0x1007eed0]
mov eax, dword [esp + 0x454]
push ebx
mov ebx, dword [esp + 0x45c]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
xor edi, edi
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
call esi
mov dword [esp + 0xc], eax
call fcn.10057e50
cmp ebx, edi
jne 0x1005fb5b
mov edx, dword [0x1007eed0]
push edx
call esi
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x70]
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x468]
push ebp
push edx
call fcn.10020570
mov ebp, eax
mov eax, dword [esp + 0x470]
push eax
call fcn.10020570
cmp word [esp + 0x478], 2
mov ecx, eax
mov dword [esp + 0x1c], ecx
jbe 0x1005fba9
mov ax, word [esp + 0x474]
test ax, ax
je 0x1005fba9
mov edx, 1
xor ecx, ecx
movzx esi, ax
jmp 0x1005fb40
movzx eax, dx
and eax, esi
cmp eax, 8
jg 0x1005fb87
je 0x1005fb82
sub eax, 1
je 0x1005fb7f
sub eax, 1
jne 0x1005fb9c
or ecx, 1
jmp 0x1005fb9c
mov eax, dword [ebx + 0xec]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x1005faf2
push 1
push edi
push ebx
push 0xffff8abf
call fcn.1005a550
mov esi, eax
jmp 0x1005fd3d
or ecx, 2
or ecx, 4
jmp 0x1005fb9c
cmp eax, 0x10
je 0x1005fb99
cmp eax, 0x20
jne 0x1005fb9c
or ecx, 0x200
jmp 0x1005fb9c
or ecx, 0x20
add edx, edx
test dx, dx
jne 0x1005fb40
mov edi, ecx
mov ecx, dword [esp + 0x1c]
test ebp, ebp
je 0x1005fd2b
cmp ebp, 0x104
ja 0x1005fd2b
test ecx, ecx
je 0x1005fd2b
cmp ecx, 0x10e
ja 0x1005fd2b
mov ecx, dword [esp + 0x46c]
lea esi, [ebp + ebp]
push esi
push ecx
call fcn.10020560
push eax
lea edx, [esp + 0x38]
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
push 0
lea eax, [esp + 0x34]
push eax
mov word [esp + esi + 0x38], 0
call fcn.1005d220
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x470]
add esi, esi
push esi
mov ebp, eax
push ecx
mov dword [esp + 0x1c], ebp
call fcn.10020560
push eax
lea edx, [esp + 0x244]
push edx
call sub.msvcrt.dll_memcpy
add esp, 0xc
test ebp, ebp
mov word [esp + esi + 0x23c], 0
mov eax, ebp
jne 0x1005fc43
lea eax, [esp + 0x30]
mov esi, dword [esp + 0x24]
push edi
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x244]
push edx
push eax
push esi
call dword [0x1007ef28]
test eax, eax
jge 0x1005fc73
lea ecx, [esp + 0x30]
push ecx
push esi
push ebx
push eax
call fcn.1005a1e0
jmp 0x1005fd3a
mov edx, dword [esp + 0x28]
push 0
push edx
push esi
call dword [0x1007ef18]
test eax, eax
jge 0x1005fc94
push 0
push esi
push ebx
push eax
call fcn.1005a1e0
jmp 0x1005fd3a
mov eax, dword [esp + 0x46c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.1004ae90
mov edi, dword [esp + 0x2c]
test edi, edi
mov dword [esp + 0x18], 1
je 0x1005fd27
test ebp, ebp
mov esi, ebp
jne 0x1005fcc0
lea esi, [esp + 0x30]
test ebx, ebx
jne 0x1005fcf7
mov edx, dword [0x1007eed0]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x1005fcec
push 1
push eax
lea eax, [esp + 0x28]
push eax
push 0xfffffbfb
call fcn.1005a550
jmp 0x1005fd1b
mov ecx, dword [eax + 0x8c]
mov eax, dword [ecx + 0x38]
jmp 0x1005fcf9
mov eax, ebx
mov edx, dword [esp + 0x470]
push esi
push eax
mov eax, dword [esp + 0x474]
push 0xffffffffffffffff
push 4
push 2
push edx
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.1005ef70
mov esi, eax
test esi, esi
jne 0x1005fd3c
mov edx, dword [esp + 0x20]
mov dword [edi], edx
xor esi, esi
jmp 0x1005fd3c
push 1
push 0
push ebx
push 0xfffffc15
call fcn.1005a550
mov esi, eax
pop ebp
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [esp + 0x14], 0
jne 0x1005fd61
mov ecx, dword [esp + 0x468]
mov edx, dword [esp + 0xc]
push ecx
push edx
call fcn.10007380
mov eax, dword [esp + 0x46c]
mov ecx, dword [esp + 0xc]
push eax
push ecx
call fcn.1004ae90
mov ecx, dword [esp + 0x458]
pop edi
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.1006ac47
add esp, 0x450
ret 0x18