Function at 0x1000baa0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100443b5
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x10058014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x24], eax
mov esi, dword [eax + 0x18]
push dword [0x1005c5ac]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1000bafd
cmp dword [eax], esi
je 0x1000bb42
mov eax, dword [eax + 8]
test eax, eax
jne 0x1000baf2
mov eax, dword [edi]
add eax, 0x20
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x20], eax
call eax
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
je 0x1000bca4
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x1000bc8d
mov dword [ecx + 0x14], ebx
mov dword [eax + 0x40], ebx
mov eax, dword [edi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1000bd26
mov esi, dword [eax + 4]
mov eax, dword [edi]
add eax, 0x20
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x20], eax
call eax
test esi, esi
je 0x1000bb0d
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
jne 0x1000bb0d
mov byte [eax + 0x38], 1
mov eax, dword [edi]
add eax, 0x20
push eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x2c], eax
call eax
mov eax, dword [edi]
xorps xmm0, xmm0
push dword [0x1005c574]
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push dword [0x1005c574]
mov dword [ebp - 0x18], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 0x28], eax
call eax
mov esi, dword [ebp - 0x24]
mov dword [ebp - 4], 0
mov edi, dword [edi]
mov dword [ebp - 0x30], edi
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], eax
push 0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 1
push ecx
push ebx
xorps xmm0, xmm0
mov dword [ebp - 0x38], 0
push eax
mov eax, dword [ebx + 0x18]
movq qword [ebp - 0x40], xmm0
call eax
add esp, 0x10
lea ebx, [edi + 0x20]
push ebx
call dword [ebp - 0x20]
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x1000bc1b
mov eax, dword [edi + 0x48]
test eax, eax
je 0x1000bc04
mov dword [eax + 0x14], ecx
jmp 0x1000bc07
mov dword [edi + 0x44], ecx
mov eax, dword [edi + 0x40]
mov dword [edi + 0x48], eax
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov esi, dword [edi + 0x44]
test esi, esi
push ebx
setne al
mov byte [edi + 0x38], al
call dword [ebp - 0x2c]
test esi, esi
je 0x1000bc7c
mov ebx, dword [ebp - 0x24]
lock inc dword [ebx + 0x18]
push edi
push 0
push 0
mov dword [edi + 0x1c], 1
push dword [ebx + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1000bc7c
lea esi, [ebx + 0x38]
push esi
call dword [ebp - 0x20]
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x1000bc68
mov dword [eax + 0x14], edi
jmp 0x1000bc6b
mov dword [ebx + 0x54], edi
mov dword [ebx + 0x58], edi
lea eax, [ebx + 0x34]
mov ecx, 1
xchg dword [eax], ecx
push esi
call dword [ebp - 0x2c]
push dword [ebp - 0x14]
push dword [0x1005c574]
call dword [ebp - 0x28]
jmp 0x1000bd26
mov dword [eax + 0x3c], ebx
mov dword [eax + 0x40], ebx
mov eax, dword [edi]
add eax, 0x20
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1000bd26
mov byte [eax + 0x38], 1
mov eax, dword [edi]
add eax, 0x20
push eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x28], eax
call eax
mov eax, dword [edi]
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x1000bccd
mov dword [ecx + 0x14], ebx
jmp 0x1000bcd0
mov dword [eax + 0x44], ebx
mov esi, dword [ebp - 0x24]
mov dword [eax + 0x48], ebx
mov edi, dword [edi]
mov esi, dword [esi + 0x18]
lock inc dword [esi + 0x18]
push edi
push 0
push 0
mov dword [edi + 0x1c], 1
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1000bd26
lea ebx, [esi + 0x38]
push ebx
call dword [ebp - 0x20]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1000bd12
mov dword [eax + 0x14], edi
jmp 0x1000bd15
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
push ebx
call dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10041f5c
mov esp, ebp
pop ebp
ret 8