Function at 0x440d20
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x4b0780]
xor eax, esp
mov dword [esp + 0x260], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x24], edi
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [esp + 0x44], eax
mov byte [esp + 0x80], al
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x24]
mov dword [esp + 0x58], eax
mov eax, dword [ebp + 0x2c]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0x30]
mov dword [esp + 0x40], eax
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x3c], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x38]
mov dword [esp + 0x8c], eax
xor eax, eax
mov dword [esp + 0x84], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
cmp byte [ecx], al
jne 0x440db6
mov ecx, eax
mov dword [ebx], edx
mov dword [ebx + 4], ecx
jmp 0x4413c5
push dword [edi + 0x1e4]
lea esi, [edi + 0x1e4]
mov dword [esp + 0x8c], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x440de5
mov eax, dword [esp + 0x34]
mov dword [ebx], 0
mov dword [ebx + 4], eax
jmp 0x4413c5
push esi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440df7
call fcn.0043d0d0
test byte [ebp + 0x3c], 4
je 0x440e19
mov eax, dword [ebp + 0x18]
xor eax, dword [edi + 0x118]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 0x1c]
xor eax, dword [edi + 0x11c]
mov dword [esp + 0x38], eax
jmp 0x440e27
mov eax, dword [ebp + 0x1c]
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x48], eax
push dword [esp + 0x58]
lea eax, [esp + 0x54]
mov ecx, edi
push eax
call fcn.0043d930
test byte [ebp + 0x3c], 0x20
je 0x440e50
lea eax, [esp + 0xb0]
mov ecx, edi
push eax
call fcn.0043d8b0
mov ecx, eax
jmp 0x440e64
mov eax, dword [esp + 0x50]
lea ecx, [esp + 0x68]
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x6c], eax
mov eax, dword [ecx]
xorps xmm0, xmm0
push dword [edi + 0x1e0]
mov dword [esp + 0x9c], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0xa0], eax
movlpd qword [esp + 0x74], xmm0
mov eax, dword [esp + 0x74]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 0x98], eax
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x440f1d
call fcn.00439a60
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x440f1d
push dword [edi + 0x1dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
mov dword [esp + 0x18], edx
test edx, edx
je 0x440ee9
mov ecx, dword [edx + 0x20]
cmp ecx, dword [edi + 0x234]
je 0x440f1d
mov eax, dword [edx]
mov ecx, edx
push 1
call dword [eax + 4]
push 0x28
call fcn.0048cef3
add esp, 4
test eax, eax
je 0x440f01
push edi
mov ecx, eax
call fcn.0043f420
jmp 0x440f03
xor eax, eax
push eax
push dword [edi + 0x1dc]
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440f1d
call fcn.0043d0d0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esp + 0x1c], eax
jne 0x44109a
call fcn.0043b910
push dword [esp + 0x1c]
mov ecx, eax
call fcn.0043b2a0
mov dword [esp + 0x20], eax
call fcn.00443b30
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x20]
cmp ecx, eax
je 0x44109a
test ecx, ecx
je 0x44109a
cmp byte [ecx], 0
je 0x44109a
call fcn.00443b30
push dword [esp + 0x20]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440f85
call fcn.0043d0d0
add edi, 0x18
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x1c]
push ecx
add eax, 0xac
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
mov dword [esp + 0x70], eax
call fcn.00427000
mov ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x2c]
cmp esi, dword [ecx]
jne 0x440fd7
push dword [esp + 0x20]
lea eax, [esp + 0x20]
push ecx
push eax
call fcn.00443080
add esp, 4
mov ecx, eax
call fcn.00436d00
jmp 0x441088
push 0x413d3c
lea ecx, [esp + 0xac]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
call fcn.00420ac0
lea eax, [esi + 0xc]
push eax
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], eax
call fcn.00419d30
lea eax, [esp + 0x5c]
push eax
lea edx, [esp + 0xac]
lea ecx, [esp + 0xa4]
call fcn.0042cb20
mov esi, dword [esp + 0x64]
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x60]
add esp, 4
mov byte [esp + 0x7c], 0
mov edx, esi
push dword [esp + 0x7c]
push eax
call fcn.004453e0
add esp, 8
cmp eax, esi
jne 0x441077
sub esi, dword [esp + 0x5c]
test esi, 0xfffffff8
mov esi, dword [esp + 0x2c]
je 0x44106c
push 0x2c
mov ecx, esi
call fcn.00428520
push dword [esp + 0x20]
mov ecx, esi
call fcn.00419440
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x441088
push eax
call fcn.0048cf69
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
test byte [ecx], 8
je 0x4410cb
call fcn.00446290
test eax, eax
je 0x4410cb
push dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
push dword [esp + 0x44]
mov cl, byte [esp + 0x4c]
push dword [esp + 0x54]
push dword [ebp + 0x28]
call fcn.00445fe0
add esp, 0x10
mov eax, dword [esp + 0x14]
mov dword [esp + 0x230], 0xf
mov dword [esp + 0x22c], 0
mov byte [esp + 0x21c], 0
test byte [eax], 3
je 0x441246
mov eax, dword [esp + 0x18]
mov byte [esp + 0xf], 0
test eax, eax
je 0x441117
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.0043f650
mov ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x441137
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 1
lea eax, [esp + 0x34]
mov byte [esp + 0x13], 1
push eax
mov ecx, edi
call fcn.00440b40
mov ecx, eax
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x441188
push dword [esp + 0x74]
push dword [esp + 0x74]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push dword [ebp + 0x3c]
push dword [esp + 0xa0]
push dword [esp + 0x54]
push dword [esp + 0x5c]
push dword [esp + 0x6c]
push dword [ebp + 0x28]
push dword [esp + 0x60]
push dword [esp + 0x74]
push dword [esp + 0x58]
push dword [esp + 0x48]
push dword [esp + 0xb8]
push dword [esp + 0x58]
call fcn.0043e720
mov ecx, dword [esp + 0x24]
mov eax, dword [edi + 0x16c]
test al, 8
je 0x4411d5
push ecx
mov ecx, dword [esp + 0x48]
cmp cl, 0x58
push dword [esp + 0x5c]
movzx eax, cl
mov ecx, 0x42
cmove eax, ecx
mov ecx, edi
movzx eax, al
push eax
lea eax, [esp + 0x260]
push eax
call fcn.004413e0
push eax
lea ecx, [esp + 0x220]
call fcn.00427a90
lea ecx, [esp + 0x254]
call fcn.00419410
cmp byte [esp + 0xf], 0
je 0x4411e3
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x22c], 0
je 0x441246
cmp dword [0x4b60d8], 2
jg 0x44122b
push 2
push 0x7f9
mov eax, 4
lea ecx, [esp + 0xc0]
push 0x413f68
mov dword [esp + 0x1c], eax
call fcn.0041fdc0
lea ecx, [esp + 0x21c]
add eax, 8
push ecx
push eax
call fcn.0041b930
add esp, 8
mov eax, dword [esp + 0x10]
test al, 4
je 0x44124a
and eax, 0xfffffffb
lea ecx, [esp + 0xb8]
mov dword [esp + 0x10], eax
call fcn.0041fe10
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp dword [edi + 0x150], ecx
jne 0x4412fd
mov dword [esp + 0x234], 0
mov dword [esp + 0x238], 0
mov dword [esp + 0x250], 0xf
mov dword [esp + 0x24c], 0
mov byte [esp + 0x23c], 0
test al, 0x20
je 0x44129e
lea ecx, [esp + 0x168]
call fcn.0041fe10
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x28]
lea ecx, [edi + 0x154]
call fcn.0042edf0
lea ecx, [edi + 0x130]
mov bl, al
push ecx
lea ecx, [esp + 0x238]
call fcn.0042d780
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x4412ea
mov eax, dword [esp + 0x234]
test eax, eax
je 0x4412ea
push eax
call dword [esp + 0x23c]
add esp, 4
lea ecx, [esp + 0x234]
call fcn.00427f90
mov ebx, dword [esp + 0x84]
mov eax, dword [esp + 0x14]
test byte [eax], 4
je 0x44134f
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x44134f
push dword [ebp + 0x3c]
mov edx, dword [esp + 0x48]
cmp dl, 0x58
push dword [esp + 0x40]
push dword [esp + 0x48]
push dword [esp + 0x58]
push dword [ebp + 0x28]
push dword [esp + 0x4c]
push dword [esp + 0x60]
push dword [esp + 0x44]
push eax
movzx eax, dl
mov edx, 0x42
cmove eax, edx
movzx eax, al
push eax
push dword [esp + 0x7c]
push dword [esp + 0x7c]
call ecx
add esp, 0x30
mov eax, dword [esp + 0x18]
test eax, eax
je 0x44136e
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x9c]
push ecx
mov ecx, eax
call fcn.0043f7e0
cmp dword [esp + 0x230], 0x10
mov eax, dword [esp + 0x30]
mov dword [ebx], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 4], eax
jb 0x441394
push dword [esp + 0x21c]
call fcn.0048cf69
add esp, 4
push 0
push dword [esi]
mov dword [esp + 0x238], 0xf
mov dword [esp + 0x234], 0
mov byte [esp + 0x224], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4413c5
call fcn.0043d0d0
mov ecx, dword [esp + 0x26c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00490c9e
mov esp, ebp
pop ebp
ret 0x38