Function at 0x10005d10
Capabilities:
Get thread local storage value

Disassembly:
dec dword [ebx + 0x10]
jne 0x10005c7d
cmp dword [ebx + 0x14], 0
jne 0x10020e07
xor ecx, ecx
mov eax, dword [esp + 0x1c]
mov dword [ebx + 0x18], eax
test ecx, ecx
jne 0x10020e1b
cmp dword [0x10066330], 0
lea ecx, [ebx + 4]
je 0x10020e33
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
je 0x10020e40
mov dword [esp + 0x14], 0
jmp 0x10005e1b
dec dword [ebx + 8]
lea eax, [ebx + 4]
cmp dword [0x10066330], 0
je 0x10020e5a
lock xadd dword [eax], edi
dec edi
test edi, edi
je 0x10020e67
add ebx, 0xc
cmp dword [ebx + 0x18], 0
jne 0x10020e81
mov eax, esi
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10002e40
mov esp, ebp
pop ebp
ret 0xc
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x10064870]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
push dword [0x10064010]
xor esi, esi
mov dword [esp + 0x24], esi
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1001f091
cmp dword [eax + 0x1078], esi
je 0x1001f091
push dword [0x10064010]
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x10005e2c
mov edi, dword [eax + 0x1078]
test edi, edi
je 0x10020d96
xor eax, eax
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
test edi, edi
je 0x1001f087
test byte [edi + 0x2c], 2
jne 0x1001f087
cmp dword [edi + 0x24], ebx
lea eax, [edi + 0xc]
jne 0x10020da1
lea ecx, [edi + 4]
cmp dword [0x10066330], ebx
je 0x10020db9
mov eax, 1
lock xadd dword [ecx], eax
inc dword [edi + 8]
mov eax, dword [ebp + 8]
test eax, eax
je 0x1001f075
mov eax, dword [eax]
mov esi, dword [eax + 0x14]
mov ecx, esi
call dword [0x10067390]
mov ecx, dword [ebp + 8]
call esi
test al, 4
je 0x1001f075
mov ecx, dword [ebp + 8]
cmp edi, dword [ecx + 0x10]
jne 0x1001f03c
jmp 0x1001ef85
push dword [0x10064010]
mov dword [esp + 0x14], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
test eax, eax
je 0x1001f05c
mov esi, dword [eax + 0x1078]
test esi, esi
jne 0x1001efb0
jmp 0x10020dc6
mov ebx, dword [esp + 0x18]
test ebx, ebx
jne 0x10005cba
jmp 0x10005ce7
xor edi, edi
jmp 0x10005d71
inc dword [ecx]
mov eax, dword [ecx]
jmp 0x10005e4e
cmp dword [0x10066330], 0
lea ecx, [esi + 4]
je 0x10005e33
mov eax, 1
lock xadd dword [ecx], eax
inc dword [esi + 8]
mov ebx, edx
mov ecx, dword [edx + 0x10]
mov dword [esp + 0x14], ebx
lea eax, [ecx + 1]
mov dword [edx + 0x10], eax
test ecx, ecx
jne 0x10005e67
mov dword [edx + 0x14], ecx
cmp dword [0x10066330], 0
mov eax, dword [edx + 0x18]
mov dword [esp + 0x1c], eax
lea eax, [edx + 4]
mov dword [edx + 0x18], 1
je 0x10020dfa
mov ecx, 1
lock xadd dword [eax], ecx
mov ecx, dword [ebp + 0xc]
mov eax, ecx
and eax, 0x1bffff
cmp eax, ecx
jne 0x1001f075
mov edx, dword [ebp + 0x10]
mov eax, edx
and eax, 0x1bffff
cmp eax, edx
jne 0x1001f075
cmp dword [edi + 0x28], 0
jne 0x1001f063
push ecx
push edx
push ecx
mov ecx, dword [ebp + 8]
call fcn.10016da7
test eax, eax
jns 0x1001efde
push eax
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x1001f038
mov eax, dword [ecx]
mov esi, dword [eax + 0x20]
cmp esi, fcn.10003f90
je 0x1001effe
cmp esi, fcn.10003470
je 0x1001f02e
mov ecx, esi
call dword [0x10067390]
mov ecx, dword [ebp + 8]
call esi
jmp 0x10005df0
mov edx, dword [esp + 0x10]
test edx, edx
je 0x1001f075
test byte [esi + 0x2c], 2
jne 0x1001f075
cmp dword [esi + 0x24], 0
mov eax, esi
mov dword [esp + 0x18], eax
lea eax, [esi + 0xc]
je 0x10005e39
jmp 0x10020ddd
mov esi, 1
mov dword [esp + 0x20], esi
mov ecx, edi
call fcn.1001f0a0
or edi, 0xffffffff
test ebx, ebx
jne 0x10005c6e
jmp 0x10005e1b
mov edx, ecx
lea esp, [esp]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x1001f01a
lea ecx, [eax - 0x28]
test ecx, ecx
je 0x1001f01a
test eax, eax
je 0x1001f04b
lea edx, [eax - 0x28]
jmp 0x1001f003
test dword [edx + 0x3c], 0x400000
je 0x1001f04f
mov eax, dword [edx + 0x10c]
jmp 0x10005df0
call fcn.10003470
jmp 0x10005df0
xor esi, esi
jmp 0x1001efe7
push 0x8004001e
call dword [sym.imp.kernel32.dll_SetLastError]
xor esi, esi
jmp 0x1001efe7
xor edx, edx
jmp 0x1001f003
xor edx, edx
mov eax, dword [edx + 0x10c]
jmp 0x10005df0
xor esi, esi
jmp 0x10020dd0
push 0x8004001f
call dword [sym.imp.kernel32.dll_SetLastError]
xor esi, esi
jmp 0x1001efe7
push 0x80070057
call dword [sym.imp.kernel32.dll_SetLastError]
xor esi, esi
jmp 0x1001efe7
push 0x80070057
jmp 0x10020e9a
push 0x80040014
jmp 0x10020e9a
mov dword [0], esi
jmp 0x10005d71
cmp dword [0x10066330], ebx
je 0x10005d9f
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
jmp 0x10005d9f
inc dword [ecx]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x14]
jmp 0x10005db7
mov dword [0], 0
test esi, esi
jne 0x1001efb0
jmp 0x1001f075
cmp dword [0x10066330], 0
je 0x10005e39
push eax
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x10]
jmp 0x10005e39
inc dword [eax]
mov eax, dword [eax]
mov ebx, dword [esp + 0x14]
jmp 0x10005e8e
cmp dword [ebx + 0x18], 0
je 0x10005c7d
mov ecx, 1
jmp 0x10005c7f
cmp dword [ebx + 8], 0
lea eax, [ebx + 8]
je 0x10005c8e
push eax
call fcn.10016da7
jmp 0x10005c8e
dec dword [ecx]
mov eax, dword [ecx]
mov ebx, dword [esp + 0x14]
jmp 0x10005ca5
mov eax, dword [ebx]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10067390]
mov ecx, ebx
call esi
mov esi, dword [esp + 0x20]
jmp 0x10005cad
dec dword [eax]
mov edi, dword [eax]
mov ebx, dword [esp + 0x18]
jmp 0x10005cd2
mov edx, dword [ebx]
mov esi, dword [edx + 8]
mov ecx, esi
call dword [0x10067390]
mov ecx, ebx
call esi
mov eax, dword [esp + 0x20]
jmp 0x10005ce9
cmp dword [0x10066330], 0
je 0x10005ce7
push ebx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x10005ce7
call dword [sym.imp.kernel32.dll_SetLastError]
jmp 0x10005ce7