Function at 0x40f940
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x535766
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x5a6a30]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x228], ebx
call fcn.0042aa6c
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40f99f
push 0x80004005
call fcn.004010e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x220], eax
push str.DoScanUtilityUninstall________________________IN_n
push 4
mov dword [ebp - 4], ebx
call fcn.00403750
add esp, 8
call fcn.0042cb3b
mov edi, dword [eax + 0xc]
call fcn.0042cb3b
mov eax, dword [eax + 4]
mov esi, dword [eax + 0x44]
call fcn.0042cb3b
push 0x1c20
mov dword [eax + 0xc], esi
call fcn.0042a962
cmp eax, ebx
je 0x40f9fd
push 0x1c20
push eax
lea ecx, [ebp - 0x220]
call fcn.00401a80
call fcn.0042cb3b
push 0x44
lea ecx, [ebp - 0x280]
push ebx
push ecx
mov dword [eax + 0xc], edi
call fcn.0051eb70
push 0x208
lea edx, [ebp - 0x218]
push ebx
push edx
mov dword [ebp - 0x280], 0x44
call fcn.0051eb70
add esp, 0x18
push 0x104
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
push 0x5c
push ecx
call fcn.0051edd8
add esp, 8
cmp eax, ebx
je 0x40fa60
xor edx, edx
mov word [eax], dx
mov esi, dword [ebp - 0x220]
push esi
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.0051f22b
add esp, 0xc
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40fab6
mov dword [ebp - 4], eax
lea eax, [esi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40faac
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40fc12
lea ecx, [ebp - 0x23c]
push ecx
lea edx, [ebp - 0x280]
push edx
push ebx
push ebx
push 0x20
push ebx
push ebx
push ebx
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40fba9
mov ecx, dword [ebp - 0x238]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ebx, [ebx]
call fcn.0042cb3b
mov ecx, dword [eax + 4]
call fcn.0042cf67
push 0x1f4
mov byte [ebp - 4], 1
call edi
mov edx, dword [ebp - 0x23c]
push 0x64
push edx
call ebx
mov esi, eax
call fcn.0040c100
lea ecx, [ebp - 0x221]
mov byte [ebp - 4], 0
call fcn.0040c890
cmp esi, 0x102
je 0x40fb00
mov ecx, dword [ebp - 0x23c]
lea eax, [ebp - 0x228]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edx, dword [ebp - 0x23c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x228]
mov ecx, 1
cmp eax, ecx
ja 0x40fb8f
je 0x40fb7f
test eax, eax
jne 0x40fbd4
mov dword [ebp - 0x21c], ecx
jmp 0x40fbd4
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x21c], ecx
mov dword [eax], ecx
jmp 0x40fbd4
cmp eax, 0x1000
jb 0x40fbd4
cmp eax, 0x1001
ja 0x40fbd4
mov dword [ebp - 0x21c], 0
jmp 0x40fbd4
push str._CreateProcess___is_missing_n
push 2
call fcn.00403750
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__GetLastError__:_d_n
push 2
call fcn.00403750
add esp, 0xc
mov dword [ebp - 0x21c], ebx
push str.DoScanUtilityUninstall________________________OUT_n
push 4
call fcn.00403750
mov eax, dword [ebp - 0x220]
add eax, 0xfffffff0
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fc0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x21c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051e701
mov esp, ebp
pop ebp
ret