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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x11c
mov eax, dword [0x4b1810]
xor eax, esp
mov dword [esp + 0x118], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x10]
lea esi, [edi + 0x1e4]
push dword [esi]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x441054
push esi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440de7
call fcn.0043c500
lea eax, [esp + 0x38]
xorps xmm0, xmm0
push eax
movlpd qword [esp + 0x34], xmm0
call dword [0x4b29a0]
add esp, 4
mov dword [esp + 0x18], 0
lea ecx, [esp + 0x18]
push dword [eax + 4]
push dword [eax]
push dword [edi + 0x12c]
push dword [edi + 0x128]
call fcn.00422480
mov ecx, dword [esp + 0x28]
add esp, 0x10
test ecx, ecx
je 0x440e3f
or eax, 0xffffffff
mov edx, bind
cmp ecx, 1
jne 0x440e3f
mov eax, ecx
mov edx, bind
neg eax
mov dword [esp + 0x108], 0xf
mov dword [esp + 0x10], eax
adc edx, 0
mov dword [esp + 0x104], 0
neg edx
mov byte [esp + 0xf4], 0
test byte [ebx], 1
mov dword [esp + 0x14], edx
je 0x440fdc
push dword [esp + 0x28]
lea eax, [esp + 0x24]
mov dword [esp + 0x24], edi
push dword [esp + 0x10]
mov ecx, edi
mov byte [esp + 0x2c], 0
push eax
call fcn.00441570
mov ecx, eax
test ecx, ecx
je 0x440ea7
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x14]
push eax
call fcn.0043dff0
mov eax, dword [edi + 0x16c]
test al, 8
je 0x440f3c
push ecx
lea eax, [esp + 0x14]
mov ecx, edi
push eax
push 0x45
lea eax, [esp + 0x118]
push eax
call fcn.00440810
lea ecx, [esp + 0xf4]
mov dword [esp + 0xc], eax
cmp ecx, eax
je 0x440f23
cmp dword [esp + 0x108], 0x10
jb 0x440ef8
push dword [esp + 0xf4]
call fcn.0048d7cb
mov eax, dword [esp + 0x10]
add esp, 4
push eax
lea ecx, [esp + 0xf8]
mov dword [esp + 0x10c], 0xf
mov dword [esp + 0x108], 0
mov byte [esp + 0xf8], 0
call fcn.00419750
cmp dword [esp + 0x120], 0x10
jb 0x440f3c
push dword [esp + 0x10c]
call fcn.0048d7cb
add esp, 4
cmp byte [esp + 0x24], 0
je 0x440f4d
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x104], 0
je 0x440fdc
cmp dword [0x4b7158], 2
jg 0x440fcc
push 1
push 2
lea ecx, [esp + 0x50]
mov dword [esp + 0x24], 2
mov dword [esp + 0x48], 2
call fcn.0041eb80
mov dword [esp + 0xe4], 0x413aa0
mov dword [esp + 0xe8], 0x887
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x887
push 0x413aa0
lea ecx, [esp + 0x48]
mov dword [esp + 0xf4], eax
call fcn.0041f870
lea eax, [esp + 0xf4]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.0041b320
add esp, 8
test byte [esp + 0x1c], 2
je 0x440fdc
lea ecx, [esp + 0x40]
call fcn.0041f5f0
test byte [ebx], 4
je 0x44100a
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x44100a
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push dword [esp + 0x48]
push ebx
push 0x45
push dword [esp + 0x3c]
push dword [esp + 0x3c]
call eax
add esp, 0x30
cmp dword [esp + 0x108], 0x10
jb 0x441023
push dword [esp + 0xf4]
call fcn.0048d7cb
add esp, 4
push 0
push dword [esi]
mov dword [esp + 0x110], 0xf
mov dword [esp + 0x10c], 0
mov byte [esp + 0xfc], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x441054
call fcn.0043c500
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00491511
mov esp, ebp
pop ebp
ret 0x10