Function at 0x100060e0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x10064870]
xor eax, ebp
mov dword [ebp - 4], eax
push edi
push dword [0x10064010]
xor edi, edi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1002b9d7
cmp dword [eax + 0x1078], edi
je 0x1002b9d7
push esi
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1002b927
mov esi, dword [eax + 0x1078]
test esi, esi
je 0x1002b921
test byte [esi + 0x2c], 2
jne 0x1002b927
cmp dword [esi + 0x24], edi
lea eax, [esi + 0xc]
jne 0x1002b939
lea ecx, [esi + 4]
cmp dword [0x10066330], edi
je 0x10009043
mov eax, 1
lock xadd dword [ecx], eax
inc dword [esi + 8]
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x1002b9c7
mov eax, dword [ebx]
mov edi, dword [eax + 0x14]
mov ecx, edi
call dword [0x10067390]
mov ecx, ebx
call edi
test al, 4
je 0x1001e99a
cmp esi, dword [ebx + 0x10]
jne 0x1002b951
lea eax, [ebp - 0x10]
test eax, eax
je 0x1001e990
mov eax, dword [ebx + 0x3c]
xor edi, edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], eax
test eax, 0x8000000
je 0x100061f6
mov eax, dword [ebx + 0x38]
test eax, eax
je 0x1000904c
mov edx, dword [eax - 8]
xor ecx, ecx
test edx, edx
jle 0x1002b970
lea ebx, [eax + 4]
mov dword [ebp - 8], ebx
mov ebx, dword [ebp - 8]
mov eax, dword [0x10066338]
cmp dword [ebx], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x38]
jne 0x1002b963
test ecx, ecx
js 0x1002b970
mov edi, dword [eax + ecx*8]
mov dword [ebp - 0x10], edi
xor eax, eax
test dword [ebx + 0x3c], 0x8000000
je 0x1000860e
test eax, eax
js 0x1002b9b9
jmp 0x1001e981
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.10002e40
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 0x10]
mov ecx, 0x10064710
push eax
push ebx
call fcn.10016da7
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
js 0x1002b9ae
mov eax, dword [0x10066338]
lea ecx, [ebx + 0x38]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx]
test eax, eax
jne 0x1000903b
xor edx, edx
xor edi, edi
mov dword [ebp - 0xc], edi
test edx, edx
jg 0x10009053
mov edi, dword [ebp - 0x10]
test eax, eax
jne 0x10009081
mov dword [ebp - 0xc], eax
inc eax
push ecx
push eax
call fcn.10016da7
test eax, eax
je 0x1002b996
mov eax, dword [ebx + 0x38]
mov ecx, dword [ebp - 0xc]
lea eax, [eax + ecx*8]
test eax, eax
je 0x10008681
mov edx, dword [ebp - 0x14]
mov dword [eax], edi
mov dword [eax + 4], edx
test ecx, ecx
js 0x1002b996
xor eax, eax
or dword [ebx + 0x3c], 0x8000000
jmp 0x10006205
mov edx, dword [eax - 8]
jmp 0x10008641
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x10006166
xor edx, edx
jmp 0x100061c2
lea ebx, [eax + 4]
mov dword [ebp - 8], ebx
lea ecx, [ecx]
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
cmp dword [edi], ebx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 0xc]
je 0x1002b980
add dword [ebp - 8], 8
inc edi
mov dword [ebp - 0xc], edi
cmp edi, edx
jge 0x1000864e
jmp 0x1000905b
mov eax, dword [eax - 8]
jmp 0x10008659
mov ecx, esi
call fcn.1001f0a0
mov eax, edi
pop ebx
jmp 0x10006212
mov eax, 0x80004003
jmp 0x1002b9b9
xor edi, edi
jmp 0x1002b9c7
mov dword [0], edi
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
mov eax, edi
jmp 0x10006212
cmp dword [0x10066330], edi
je 0x1000614e
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
jmp 0x1000614e
push 0x8004001e
call dword [sym.imp.kernel32.dll_SetLastError]
xor edi, edi
jmp 0x1001e981
add dword [ebp - 8], 8
inc ecx
cmp ecx, edx
jl 0x100061d2
mov eax, dword [ebp - 0x14]
and eax, 0xf7ffffff
mov dword [ebx + 0x3c], eax
jmp 0x100061f6
test edi, edi
js 0x1000864e
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov dword [eax + ecx*8], edi
jmp 0x10008689
push ecx
push edi
mov ecx, 0x10064710
call fcn.10016da7
xor edi, edi
mov eax, 0x8007000e
jmp 0x10006205
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
jmp 0x10006205
push eax
call dword [sym.imp.kernel32.dll_SetLastError]
xor edi, edi
jmp 0x1001e981
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x1001e981
push 0x80040014
call dword [sym.imp.kernel32.dll_SetLastError]
mov eax, edi
jmp 0x10006213