Function at 0x10005e60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100afda8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push dword [0x100db8a4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp + 8]
lea ecx, [ebx + 0x3c]
cmp eax, ecx
jne 0x10005eae
push 0x65b
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8
push esi
push edi
lea esi, [ebx + 0x44]
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
cmp dword [ebx + 0x34], 0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x10005ee6
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 6
call ebx
mov dword [ebp + 8], 0
jmp 0x1000609e
cmp dword [ebx + 0x60], 0
je 0x10005f05
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xaa
call ebx
mov dword [ebp + 8], 0
jmp 0x1000609e
mov eax, dword [ebx + 0x38]
xor ecx, ecx
mov edx, 4
mul edx
push 0x100da820
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1009c33f
add esp, 8
mov dword [ebx + 0x64], eax
test eax, eax
jne 0x10005f43
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0xe
call ebx
mov dword [ebp + 8], 0
jmp 0x1000609e
xor ecx, ecx
lea eax, [ebx + 0x68]
xchg dword [eax], ecx
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x6c], eax
test eax, eax
jne 0x10005f73
call edi
push dword [ebx + 0x64]
mov edi, eax
call fcn.1009c380
add esp, 4
jmp 0x10006071
push 0
push 1
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x70], eax
test eax, eax
jne 0x10005fad
call edi
push dword [ebx + 0x6c]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x64]
call fcn.1009c380
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebx + 0x74], eax
test eax, eax
jne 0x10005fea
call edi
push dword [ebx + 0x70]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x6c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 0x64]
call fcn.1009c380
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x6c]
mov ecx, ebx
mov dword [ebx + 0x78], eax
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x7c], eax
mov eax, dword [ebx + 0x6c]
mov dword [ebx + 0x80], eax
mov eax, dword [ebx + 0x74]
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x60], 1
call fcn.100060d0
mov edi, eax
test edi, edi
jne 0x10006068
mov eax, dword [ebx + 0x38]
mov edi, dword [ebx + 0x34]
lea eax, [eax + eax*8]
shl eax, 4
add eax, edi
mov dword [ebp + 8], eax
cmp edi, eax
jae 0x10006052
push dword [ebp + 0xc]
mov eax, dword [edi]
push dword [edi + 0x88]
push edi
call dword [eax + 0xa0]
test eax, eax
je 0x10006083
add edi, 0x90
cmp edi, dword [ebp + 8]
jb 0x10006031
cmp dword [ebx + 0x94], 1
je 0x1000608d
mov ecx, ebx
call fcn.10006130
mov edi, eax
test edi, edi
je 0x1000608d
mov ecx, dword [ebx]
push ebx
call dword [ecx + 0x98]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
call ebx
mov dword [ebp + 8], 0
jmp 0x1000609e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x10006068
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
call ebx
mov dword [ebp + 8], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push edi
call ebx
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 8