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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006a165
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x10086040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
mov esi, dword [eax + 0x18]
push dword [0x100894c8]
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
lea eax, [esi + 0x14]
neg esi
sbb esi, esi
and esi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1000ab9b
nop
cmp dword [eax], esi
je 0x1000abef
mov eax, dword [eax + 8]
test eax, eax
jne 0x1000ab90
mov eax, dword [edi]
add eax, 0x20
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp + 8], eax
call eax
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
je 0x1000ad62
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x1000ad3c
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]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
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 + 8], eax
call eax
test esi, esi
je 0x1000abab
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
jne 0x1000abab
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 + 0xc], eax
call eax
mov eax, dword [edi]
push dword [0x100894bc]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
push eax
push dword [0x100894bc]
mov dword [ebp - 0x2c], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 0x14], eax
call eax
mov esi, dword [ebp - 0x10]
mov dword [ebp - 4], 0
mov edi, dword [edi]
mov dword [ebp - 0x20], edi
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], eax
push 0
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
push ecx
push ebx
push eax
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0x10086be8
call eax
add esp, 0x10
lea eax, [edi + 0x20]
lea ebx, [edi + 0x20]
push eax
call dword [ebp + 8]
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x1000acbb
mov eax, dword [edi + 0x48]
test eax, eax
je 0x1000aca4
mov dword [eax + 0x14], ecx
jmp 0x1000aca7
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 + 0xc]
test esi, esi
je 0x1000ad1c
mov ebx, dword [ebp - 0x10]
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 0x1000ad1c
lea esi, [ebx + 0x38]
push esi
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x1000ad08
mov dword [eax + 0x14], edi
jmp 0x1000ad0b
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 + 0xc]
push dword [ebp - 0x28]
push dword [0x100894bc]
call dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
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]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
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 + 0xc], eax
call eax
mov eax, dword [edi]
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x1000ad8b
mov dword [ecx + 0x14], ebx
jmp 0x1000ad8e
mov dword [eax + 0x44], ebx
mov esi, dword [ebp - 0x10]
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 0x1000ade4
lea ebx, [esi + 0x38]
push ebx
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1000add0
mov dword [eax + 0x14], edi
jmp 0x1000add3
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 + 0xc]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8