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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e485
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x49d140]
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 [0x4a2a14]
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 0x411bbb
nop
cmp dword [eax], esi
je 0x411c0f
mov eax, dword [eax + 8]
test eax, eax
jne 0x411bb0
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 0x411d82
mov dword [ebx + 0x14], 0
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x411d5c
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 0x411bcb
mov eax, dword [edi]
cmp byte [eax + 0x38], 0
jne 0x411bcb
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 [0x4a29ec]
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 [0x4a29ec]
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], 0x49dbf8
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 0x411cdb
mov eax, dword [edi + 0x48]
test eax, eax
je 0x411cc4
mov dword [eax + 0x14], ecx
jmp 0x411cc7
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 0x411d3c
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 0x411d3c
lea esi, [ebx + 0x38]
push esi
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x411d28
mov dword [eax + 0x14], edi
jmp 0x411d2b
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 [0x4a29ec]
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 0x411dab
mov dword [ecx + 0x14], ebx
jmp 0x411dae
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 0x411e04
lea ebx, [esi + 0x38]
push ebx
call dword [ebp + 8]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x411df0
mov dword [eax + 0x14], edi
jmp 0x411df3
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