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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100659f5
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x1008600c]
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 [0x100895a0]
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 0x100081fb
nop
cmp dword [eax], esi
je 0x1000824f
mov eax, dword [eax + 8]
test eax, eax
jne 0x100081f0
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 0x100083bf
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x10008399
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 0x1000820b
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
jne 0x1000820b
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 [0x10089594]
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 [0x10089594]
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], 0x10086b38
call eax
add esp, 0x10
lea ebx, [edi + 0x20]
push ebx
call dword [ebp + 8]
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x10008318
mov eax, dword [edi + 0x48]
test eax, eax
je 0x10008301
mov dword [eax + 0x14], ecx
jmp 0x10008304
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 0x10008379
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 0x10008379
lea esi, [ebx + 0x38]
push esi
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x10008365
mov dword [eax + 0x14], edi
jmp 0x10008368
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 [0x10089594]
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 0x100083e8
mov dword [ecx + 0x14], ebx
jmp 0x100083eb
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 0x10008441
lea ebx, [esi + 0x38]
push ebx
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1000842d
mov dword [eax + 0x14], edi
jmp 0x10008430
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