Function at 0x1005f070
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x20
mov ebx, ecx
mov eax, dword [0x101b9014]
xor eax, ebp
mov dword [esp + 0x18], eax
mov esi, dword [0x101bee40]
test esi, esi
je 0x1005f1e9
mov edi, ebx
movzx ebx, byte [ebp + 0x18]
mov eax, dword [0x101bac5c]
cmp eax, 0xffffffff
je 0x1005f0c3
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 3
dec eax
test bl, bl
je 0x1005f1bb
cmp eax, 2
mov ebx, edi
jae 0x1005f0cd
jmp 0x1005f0f5
test bl, bl
mov ebx, edi
je 0x1005f1c2
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1005f0f5
mov ecx, dword [esi + 0xc]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x10]
jne 0x1005f0f5
mov edi, dword [eax + ecx*8]
test edi, edi
jne 0x1005f1eb
mov eax, dword [0x101bac5c]
cmp eax, 0xffffffff
je 0x1005f113
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 3
dec eax
cmp eax, 2
jb 0x1005f1e9
lea edi, [esi + 0x44]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x1005f367
lea ecx, [esi + 0x18]
call fcn.1005d490
mov dword [esp + 8], esi
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov edi, 0
test esi, esi
mov edx, dword [esp + 8]
je 0x1005f1eb
mov ecx, dword [edx]
push 0xe0
push 0x5d7381b3
mov dword [esp + 0xc], esi
push esi
call fcn.100972d0
mov esi, eax
push 0x1c
call fcn.10145ba4
add esp, 4
mov edi, eax
mov ecx, eax
mov eax, dword [esp + 8]
push dword [eax + 4]
push esi
call fcn.1005e680
mov dword [edi], 0x1019b4c8
mov eax, dword [esp + 4]
mov dword [edi + 0x14], eax
mov eax, esi
shr eax, 0xe
mov ecx, esi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x101c1e84]
bt ecx, eax
jae 0x1005f2da
push esi
mov dword [esp + 8], esi
call fcn.10069180
mov esi, dword [esp + 8]
add esp, 4
jmp 0x1005f2e6
cmp eax, 2
mov ebx, edi
jb 0x1005f1e9
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1005f1e9
mov ecx, dword [esi + 0xc]
mov edx, dword [eax + ecx*8 + 4]
mov edi, 0
cmp edx, dword [esi + 0x10]
jne 0x1005f1eb
mov edi, dword [eax + ecx*8]
jmp 0x1005f1eb
xor edi, edi
mov eax, edi
shr eax, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x101c1e84]
bt ecx, eax
jae 0x1005f20c
push edi
call fcn.10069180
add esp, 4
jmp 0x1005f218
mov eax, edi
shr eax, 0x15
mov byte [eax + 0x101c9e84], 1
mov dword [ebx], edi
test edi, edi
je 0x1005f2bc
mov eax, dword [edi + 4]
mov edx, dword [eax + 0x38]
cmp edx, dword [edi + 0xc]
jae 0x1005f2b3
mov dword [esp + 8], ebx
mov ebx, edx
shl ebx, 7
mov esi, dword [edi + 8]
mov ecx, dword [0x101bac60]
mov dword [esp + 4], edx
call dword [section..00cfg]
lea eax, [esp + 0x10]
push eax
call ecx
mov edx, dword [esp + 8]
add esp, 4
movsd xmm0, qword [esp + 0x10]
movsd qword [esi + ebx], xmm0
mov eax, dword [ebp + 8]
mov dword [esi + ebx + 8], eax
mov dword [esi + ebx + 0xc], 0
mov eax, dword [ebp + 0xc]
mov dword [esi + ebx + 0x10], eax
mov dword [esi + ebx + 0x14], 0
movzx eax, byte [ebp + 0x10]
mov byte [esi + ebx + 0x70], al
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 4]
mov ecx, dword [ecx]
mov dword [esi + ebx + 0x78], ecx
mov dword [esi + ebx + 0x7c], eax
mov dword [esi + ebx + 0x18], 0
mov dword [esi + ebx + 0x1c], 0
mov ebx, dword [esp + 8]
mov eax, dword [edi + 4]
lea ecx, [edx + 1]
mov dword [eax + 0x38], ecx
mov dword [ebx + 4], edx
mov dword [ebx + 8], 0
mov ecx, dword [esp + 0x18]
xor ecx, ebp
call fcn.101465a3
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
mov eax, esi
shr eax, 0x15
mov byte [eax + 0x101c9e84], 1
mov dword [edi + 0x18], esi
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 4], 0
and eax, 0xfffffffc
mov esi, dword [esp + 8]
je 0x1005f319
mov ecx, dword [esi + 0xc]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x10]
jne 0x1005f319
mov eax, dword [eax + ecx*8]
mov dword [esp + 4], eax
push dword [0x101bac5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x1005f373
mov ecx, dword [esi + 0xc]
mov dword [eax + ecx*8], edi
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
mov dword [eax + ecx*8 + 4], edx
mov edx, dword [esp + 4]
test edx, edx
je 0x1005f35e
mov eax, dword [edx]
mov ecx, dword [eax]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], edx
call dword [section..00cfg]
mov ecx, dword [esp + 4]
push 1
call dword [esp + 0x10]
lock inc dword [esi + 0x14]
jmp 0x1005f1eb
mov ecx, edi
call fcn.10083990
jmp 0x1005f125
test edi, edi
je 0x1005f33a
call fcn.1007a6e0
jmp 0x1005f32a