Function at 0x440150
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 [0x4b1810]
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 0x4401e6
mov ecx, eax
mov dword [ebx], edx
mov dword [ebx + 4], ecx
jmp 0x4407f5
push dword [edi + 0x1e4]
lea esi, [edi + 0x1e4]
mov dword [esp + 0x8c], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x440215
mov eax, dword [esp + 0x34]
mov dword [ebx], 0
mov dword [ebx + 4], eax
jmp 0x4407f5
push esi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x440227
call fcn.0043c500
test byte [ebp + 0x3c], 4
je 0x440249
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 0x440257
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.0043cd60
test byte [ebp + 0x3c], 0x20
je 0x440280
lea eax, [esp + 0xb0]
mov ecx, edi
push eax
call fcn.0043cce0
mov ecx, eax
jmp 0x440294
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 0x44034d
call fcn.00438e40
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x44034d
push dword [edi + 0x1dc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
mov dword [esp + 0x18], edx
test edx, edx
je 0x440319
mov ecx, dword [edx + 0x20]
cmp ecx, dword [edi + 0x234]
je 0x44034d
mov eax, dword [edx]
mov ecx, edx
push 1
call dword [eax + 4]
push 0x28
call fcn.0048d755
add esp, 4
test eax, eax
je 0x440331
push edi
mov ecx, eax
call fcn.0043e850
jmp 0x440333
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 0x44034d
call fcn.0043c500
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esp + 0x1c], eax
jne 0x4404ca
call fcn.0043acf0
push dword [esp + 0x1c]
mov ecx, eax
call fcn.0043a680
mov dword [esp + 0x20], eax
call fcn.00442f60
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x20]
cmp ecx, eax
je 0x4404ca
test ecx, ecx
je 0x4404ca
cmp byte [ecx], 0
je 0x4404ca
call fcn.00442f60
push dword [esp + 0x20]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x4403b5
call fcn.0043c500
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.00425ea0
mov ecx, dword [esp + 0x68]
mov esi, dword [esp + 0x2c]
cmp esi, dword [ecx]
jne 0x440407
push dword [esp + 0x20]
lea eax, [esp + 0x20]
push ecx
push eax
call fcn.004424b0
add esp, 4
mov ecx, eax
call fcn.004360e0
jmp 0x4404b8
push 0x413824
lea ecx, [esp + 0xac]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
call fcn.004202a0
lea eax, [esi + 0xc]
push eax
lea ecx, [esp + 0xa4]
mov dword [esp + 0x30], eax
call fcn.00419720
lea eax, [esp + 0x5c]
push eax
lea edx, [esp + 0xac]
lea ecx, [esp + 0xa4]
call fcn.0042c010
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.00444810
add esp, 8
cmp eax, esi
jne 0x4404a7
sub esi, dword [esp + 0x5c]
test esi, 0xfffffff8
mov esi, dword [esp + 0x2c]
je 0x44049c
push 0x2c
mov ecx, esi
call fcn.00427070
push dword [esp + 0x20]
mov ecx, esi
call fcn.00418e60
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4404b8
push eax
call fcn.0048d7cb
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 0x4404fb
call fcn.004456c0
test eax, eax
je 0x4404fb
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.00445410
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 0x440676
mov eax, dword [esp + 0x18]
mov byte [esp + 0xf], 0
test eax, eax
je 0x440547
lea ecx, [esp + 0x30]
push ecx
mov ecx, eax
call fcn.0043ea80
mov ecx, eax
mov dword [esp + 0x24], ecx
jmp 0x440567
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.0043ff70
mov ecx, eax
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x4405b8
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.0043db50
mov ecx, dword [esp + 0x24]
mov eax, dword [edi + 0x16c]
test al, 8
je 0x440605
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.00440810
push eax
lea ecx, [esp + 0x220]
call fcn.00426930
lea ecx, [esp + 0x254]
call fcn.00418e30
cmp byte [esp + 0xf], 0
je 0x440613
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esp + 0x22c], 0
je 0x440676
cmp dword [0x4b7158], 2
jg 0x44065b
push 2
push 0x7f9
mov eax, 4
lea ecx, [esp + 0xc0]
push 0x413aa0
mov dword [esp + 0x1c], eax
call fcn.0041f5a0
lea ecx, [esp + 0x21c]
add eax, 8
push ecx
push eax
call fcn.0041b320
add esp, 8
mov eax, dword [esp + 0x10]
test al, 4
je 0x44067a
and eax, 0xfffffffb
lea ecx, [esp + 0xb8]
mov dword [esp + 0x10], eax
call fcn.0041f5f0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
cmp dword [edi + 0x150], ecx
jne 0x44072d
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 0x4406ce
lea ecx, [esp + 0x168]
call fcn.0041f5f0
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x28]
lea ecx, [edi + 0x154]
call fcn.0042e270
lea ecx, [edi + 0x130]
mov bl, al
push ecx
lea ecx, [esp + 0x238]
call fcn.0042cc70
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test bl, bl
je 0x44071a
mov eax, dword [esp + 0x234]
test eax, eax
je 0x44071a
push eax
call dword [esp + 0x23c]
add esp, 4
lea ecx, [esp + 0x234]
call fcn.00426ae0
mov ebx, dword [esp + 0x84]
mov eax, dword [esp + 0x14]
test byte [eax], 4
je 0x44077f
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x44077f
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 0x44079e
lea ecx, [esp + 0x90]
push ecx
lea ecx, [esp + 0x9c]
push ecx
mov ecx, eax
call fcn.0043ec10
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 0x4407c4
push dword [esp + 0x21c]
call fcn.0048d7cb
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 0x4407f5
call fcn.0043c500
mov ecx, dword [esp + 0x26c]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00491511
mov esp, ebp
pop ebp
ret 0x38