Function at 0x40f100
Capabilities:
Check if file exists
Create process on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x44350b
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x4521a0]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4521a0]
xor eax, esp
push eax
lea eax, [esp + 0x1b8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1c8]
mov esi, dword [esp + 0x1cc]
xor ebp, ebp
mov ebx, edx
mov dword [esp + 0x28], ebx
cmp eax, ebp
jne 0x40f69f
cmp ecx, ebp
jne 0x40fa46
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0xffffffffffffffff
lea eax, [esi + 0x1c]
mov ebx, 7
xor edx, edx
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], ebp
push ebp
mov dword [esp + 0x38], eax
mov word [ecx + 4], dx
call fcn.00405080
sub esp, 0x1c
mov esi, esp
mov dword [esp + 0x1f8], ebp
xor eax, eax
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
mov dword [esp + 0x5c], esp
mov word [esi + 4], ax
push ebp
mov eax, 0x4470e4
call fcn.00405170
sub esp, 0x1c
mov byte [esp + 0x214], 1
mov esi, esp
mov dword [esp + 0x70], esp
xor ecx, ecx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push 0xe
mov eax, str.currentversion
mov word [esi + 4], cx
call fcn.00405170
sub esp, 0x1c
mov byte [esp + 0x230], 2
mov esi, esp
mov dword [esp + 0x88], esp
xor edx, edx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push ebx
mov eax, str.version
mov word [esi + 4], dx
call fcn.00405170
lea edi, [esp + 0x1cc]
mov dword [esp + 0x230], 0xffffffff
call fcn.00417bf0
add esp, 0x54
mov dword [esp + 0x1dc], 3
mov ecx, esp
mov dword [esp + 0x34], esp
xor eax, eax
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], ebp
push 0xffffffffffffffff
mov word [ecx + 4], ax
mov eax, dword [esp + 0x34]
push ebp
call fcn.00405080
sub esp, 0x1c
mov byte [esp + 0x1f8], 4
mov esi, esp
mov dword [esp + 0x54], esp
xor ecx, ecx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push ebp
mov eax, 0x4470e4
mov word [esi + 4], cx
call fcn.00405170
sub esp, 0x1c
mov byte [esp + 0x214], 5
mov dword [esp + 0x78], esp
mov esi, esp
xor edx, edx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push 0xc
mov eax, str.upgraderange
mov word [esi + 4], dx
call fcn.00405170
sub esp, 0x1c
mov esi, esp
mov byte [esp + 0x230], 6
xor eax, eax
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
mov dword [esp + 0x90], esp
mov word [esi + 4], ax
push ebx
mov eax, str.version
call fcn.00405170
lea edi, [esp + 0x1e8]
mov byte [esp + 0x230], 3
call fcn.00417bf0
add esp, 0x54
mov byte [esp + 0x1dc], bl
mov edi, esp
mov dword [esp + 0x34], esp
call fcn.00417a40
sub esp, 0x1c
mov byte [esp + 0x1f8], 8
mov esi, esp
mov dword [esp + 0x54], esp
xor ecx, ecx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push ebp
mov eax, 0x4470e4
mov word [esi + 4], cx
call fcn.00405170
sub esp, 0x1c
mov byte [esp + 0x214], 9
mov esi, esp
mov dword [esp + 0x78], esp
xor edx, edx
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
push 0xe
mov eax, str.lastUpgradeVer
mov word [esi + 4], dx
call fcn.00405170
sub esp, 0x1c
mov esi, esp
mov byte [esp + 0x230], 0xa
xor eax, eax
mov dword [esi + 0x18], ebx
mov dword [esi + 0x14], ebp
mov dword [esp + 0x90], esp
mov word [esi + 4], ax
push ebx
mov eax, str.version
call fcn.00405170
lea edi, [esp + 0x1b0]
mov byte [esp + 0x230], bl
call fcn.00417bf0
add esp, 0x70
mov edi, dword [esp + 0x28]
add edi, 0xcd0
push 0xffffffffffffffff
push ebp
lea eax, [esp + 0x164]
mov ecx, edi
mov byte [esp + 0x1c8], 0xb
call fcn.00405080
push 0x447978
lea ecx, [esp + 0x160]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00417380
add esp, 0xc
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x164]
mov byte [esp + 0x1c8], 0xc
call fcn.00405080
mov esi, 8
mov byte [esp + 0x1c0], 0xb
cmp dword [esp + 0x44], esi
jb 0x40f3f3
mov eax, dword [esp + 0x30]
push eax
call fcn.00427f1c
add esp, 4
mov eax, dword [esp + 0x160]
xor ecx, ecx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebp
mov word [esp + 0x30], cx
cmp dword [esp + 0x174], esi
jae 0x40f419
lea eax, [esp + 0x160]
push eax
call fcn.004180d0
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x40f4b2
cmp dword [esp + 0x158], esi
jb 0x40f447
mov edx, dword [esp + 0x144]
push edx
call fcn.00427f1c
add esp, 4
xor eax, eax
mov dword [esp + 0x158], ebx
mov dword [esp + 0x154], ebp
mov word [esp + 0x144], ax
cmp dword [esp + 0x190], esi
jb 0x40f478
mov ecx, dword [esp + 0x17c]
push ecx
call fcn.00427f1c
add esp, 4
xor edx, edx
mov dword [esp + 0x190], ebx
mov dword [esp + 0x18c], ebp
mov word [esp + 0x17c], dx
cmp dword [esp + 0x174], esi
jb 0x40fa46
mov eax, dword [esp + 0x160]
push eax
call fcn.00427f1c
add esp, 4
jmp 0x40fa46
push 0x447978
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.00417380
add esp, 0xc
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x148]
mov byte [esp + 0x1c8], 0xd
call fcn.00405080
mov byte [esp + 0x1c0], 0xb
cmp dword [esp + 0x60], esi
jb 0x40f4fe
mov eax, dword [esp + 0x4c]
push eax
call fcn.00427f1c
add esp, 4
mov eax, dword [esp + 0x144]
xor ecx, ecx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x5c], ebp
mov word [esp + 0x4c], cx
cmp dword [esp + 0x158], esi
jae 0x40f524
lea eax, [esp + 0x144]
push eax
call fcn.004180d0
mov ecx, dword [esp + 0x18]
add esp, 4
cmp ecx, 0xc1e
jle 0x40f61b
cmp eax, ecx
jge 0x40f61b
sub esp, 0x1c
lea edx, [esp + 0x194]
mov esi, esp
mov dword [esp + 0x34], esp
push edx
call fcn.0040dff0
call fcn.0040fa90
test al, al
je 0x40f616
lea esi, [esp + 0x14]
call fcn.00404850
mov byte [esp + 0x1c0], 0xe
cmp dword [edi + 0x18], 8
jb 0x40f584
mov edi, dword [edi + 4]
jmp 0x40f587
add edi, 4
push edi
push 0x44797c
lea edi, [esp + 0x1c]
call fcn.00405750
mov eax, dword [esp + 0x1c]
add esp, 8
lea ecx, [esp + 0x194]
call fcn.00404940
mov byte [esp + 0x1c0], 0xf
cmp dword [esp + 0x1ac], 8
mov eax, dword [esp + 0x198]
jae 0x40f5c9
lea eax, [esp + 0x198]
mov edi, dword [esp + 0x28]
push ebp
push 0x4479a0
lea esi, [edi + 0x22c]
push eax
mov eax, dword [esi]
mov edx, dword [eax + 0x48]
mov ecx, esi
call edx
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, dword [esi]
mov edx, dword [eax + 0x48]
push ebp
mov ecx, esi
call edx
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push edi
call fcn.0040ed30
lea esi, [esp + 0x194]
call fcn.00413550
lea ecx, [esp + 0x14]
call fcn.00404920
mov esi, 8
cmp dword [esp + 0x158], esi
jb 0x40f634
mov eax, dword [esp + 0x144]
push eax
call fcn.00427f1c
add esp, 4
xor ecx, ecx
mov dword [esp + 0x158], ebx
mov dword [esp + 0x154], ebp
mov word [esp + 0x144], cx
cmp dword [esp + 0x190], esi
jb 0x40f665
mov edx, dword [esp + 0x17c]
push edx
call fcn.00427f1c
add esp, 4
xor eax, eax
mov dword [esp + 0x190], ebx
mov dword [esp + 0x18c], ebp
mov word [esp + 0x17c], ax
cmp dword [esp + 0x174], esi
jb 0x40fa46
mov ecx, dword [esp + 0x160]
push ecx
call fcn.00427f1c
add esp, 4
jmp 0x40fa46
cmp eax, 1
jne 0x40f7b1
cmp ecx, ebp
jne 0x40fa46
push 0x40
lea edx, [esp + 0x6c]
push ebp
push edx
mov dword [esp + 0x14c], ebp
mov dword [esp + 0x150], ebp
mov dword [esp + 0x154], ebp
mov dword [esp + 0x158], ebp
call fcn.0042c020
xor eax, eax
add esp, 0xc
cmp dword [esi + 0x34], 8
mov dword [esp + 0x64], 0x44
mov word [esp + 0x94], ax
mov dword [esp + 0x90], 1
jb 0x40f704
mov esi, dword [esi + 0x20]
jmp 0x40f707
add esi, 0x20
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x68]
push edx
push ebp
push ebp
push 0x220
push ebp
push ebp
push ebp
push 0x4479ac
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40fa46
sub esp, 0x1c
mov edi, esp
mov dword [esp + 0x34], esp
call fcn.00417a40
sub esp, 0x1c
mov dword [esp + 0x1f8], 0x10
lea eax, [ebx + 0xcd0]
mov esi, esp
mov dword [esp + 0x54], esp
push eax
call fcn.0040dff0
sub esp, 0x1c
mov byte [esp + 0x214], 0x11
mov eax, str.lastUpgradeVer
mov ecx, esp
mov dword [esp + 0x78], esp
call fcn.00404940
sub esp, 0x1c
mov byte [esp + 0x230], 0x12
mov eax, str.version
mov ecx, esp
mov dword [esp + 0x90], esp
call fcn.00404940
mov dword [esp + 0x230], 0xffffffff
call fcn.00417e30
add esp, 0x70
jmp 0x40fa27
cmp eax, 2
jne 0x40fa1d
lea edi, [eax + 6]
cmp ecx, ebp
jne 0x40f9f1
cmp dword [esi + 0x34], edi
jb 0x40f7cf
mov eax, dword [esi + 0x20]
jmp 0x40f7d2
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40f9f1
cmp dword [esi + 0x34], edi
jb 0x40f7eb
mov esi, dword [esi + 0x20]
jmp 0x40f7ee
add esi, 0x20
push esi
lea ecx, [esp + 0xb0]
push ecx
call fcn.00411340
mov dword [esp + 0x1c0], 0x13
mov eax, dword [esp + 0xac]
mov edx, dword [eax + 4]
mov ecx, dword [esp + edx + 0xb4]
test cl, 6
jne 0x40f9d8
mov dword [esp + 0x174], 0xf
mov dword [esp + 0x170], ebp
mov byte [esp + 0x160], 0
mov eax, edx
push 0xa
lea ecx, [esp + eax + 0xb0]
push ecx
mov byte [esp + 0x1c8], 0x14
call fcn.00412c30
movzx edx, al
push edx
lea eax, [esp + 0xb0]
push eax
lea ecx, [esp + 0x164]
call fcn.00413350
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 8]
add ecx, eax
and dl, 6
movsx eax, dl
add esp, 8
neg eax
sbb eax, eax
not eax
test ecx, eax
je 0x40f9cc
push 1
push 0x4479b4
lea ecx, [esp + 0x164]
push ecx
call fcn.004121a0
push 1
push 0x4479b8
lea edx, [esp + 0x164]
push edx
mov edi, eax
call fcn.004121a0
push 2
mov esi, eax
push 0x4479bc
lea eax, [esp + 0x164]
push eax
call fcn.004121a0
cmp eax, 0xffffffff
je 0x40f8dd
cmp edi, 0xffffffff
je 0x40f8dd
cmp esi, 0xffffffff
jne 0x40f935
mov ecx, dword [esp + 0xac]
mov edx, dword [ecx + 4]
push 0xa
lea eax, [esp + edx + 0xb0]
push eax
call fcn.00412c30
movzx ecx, al
push ecx
lea edx, [esp + 0xb0]
push edx
lea ecx, [esp + 0x164]
call fcn.00413350
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
mov edx, dword [ecx + eax + 8]
add ecx, eax
and dl, 6
movsx eax, dl
add esp, 8
neg eax
sbb eax, eax
not eax
test ecx, eax
jne 0x40f88e
jmp 0x40f9cc
sub esi, edi
dec esi
push esi
lea ecx, [edi + 1]
lea esi, [esp + 0x198]
lea edx, [esp + 0x160]
call fcn.00411310
xor ecx, ecx
mov dword [esp + 0x190], 7
mov dword [esp + 0x18c], ebp
mov word [esp + 0x17c], cx
mov byte [esp + 0x1c0], 0x16
cmp dword [esp + 0x1ac], 0x10
mov eax, dword [esp + 0x198]
jae 0x40f98b
lea eax, [esp + 0x198]
lea edx, [esp + 0x178]
push edx
push eax
call fcn.00418610
sub esp, 0x14
lea eax, [esp + 0x194]
mov esi, esp
mov dword [esp + 0x34], esp
push eax
call fcn.0040dff0
call fcn.004248d0
lea esi, [esp + 0x178]
call fcn.00413550
lea ecx, [esp + 0x194]
call fcn.00406220
lea ecx, [esp + 0x15c]
call fcn.00406220
lea eax, [esp + 0xac]
mov dword [esp + 0x1c0], 0xffffffff
call fcn.0040fa70
jmp 0x40fa46
mov eax, str.error
lea ecx, [esp + 0x194]
call fcn.00404940
cmp dword [esp + 0x1ac], edi
jb 0x40fa46
mov ecx, dword [esp + 0x198]
push ecx
call fcn.00427f1c
add esp, 4
jmp 0x40fa46
cmp eax, 3
je 0x40fa27
cmp eax, 4
jne 0x40fa46
mov edx, dword [ebx + 0x22c]
mov eax, dword [edx + 0x48]
push ebp
lea ecx, [ebx + 0x22c]
push ebp
push 0x4c9
call eax
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [esp + 0x1b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.00427f27
add esp, 0x1b0
ret 8