Function at 0x401370
Capabilities:
Check if file exists
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28c
mov eax, dword [0x4dbe18]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov bl, al
shr eax, 3
mov dword [ebp - 0x224], ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x230], edx
mov edx, dword [ebp + 0x18]
and al, 1
and bl, 1
push esi
mov esi, dword [ebp + 0xc]
mov dword [edx], 0
mov dword [ebp - 0x228], edx
mov dword [edi], 0
mov byte [ebp - 0x21d], al
test ecx, ecx
jne 0x4013db
mov dword [edi], 1
xor eax, eax
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret
push 0
push ecx
call dword [sym.imp.USER32.dll_FindWindowW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x401475
mov ecx, dword [ebp - 0x224]
cmp eax, dword [ecx]
je 0x40141a
mov edx, dword [ebp - 0x228]
push edx
push eax
mov edx, edi
mov ecx, esi
call fcn.00401140
add esp, 8
test al, al
je 0x401475
mov eax, dword [ebp - 0x22c]
cmp byte [ebp - 0x21d], 0
mov ecx, dword [ebp - 0x224]
mov dword [ecx], eax
je 0x401460
lea edx, [ebp - 0x224]
push edx
push 0x1f4
push 0
push 0
push 0
push 0x482
push eax
mov dword [ebp - 0x224], 0
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
cmp dword [ebp - 0x224], 1
jne 0x4013c9
mov eax, 1
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret
test bl, bl
je 0x4013c9
test esi, esi
je 0x4013c9
xor ebx, ebx
call fcn.00410df0
cmp al, 1
jne 0x401597
push 0x208
lea ecx, [ebp - 0x21a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x21c], ax
call fcn.0048f0a0
mov eax, dword [ebp - 0x230]
add esp, 0xc
cmp eax, ebx
je 0x4014d1
push eax
lea edx, [ebp - 0x21c]
push 0x104
push edx
call fcn.0048b1ab
add esp, 0xc
push 0x40
lea eax, [ebp - 0x288]
push ebx
push eax
call fcn.0048f0a0
mov cx, word [ebp + 0x14]
add esp, 0xc
xor eax, eax
lea edx, [ebp - 0x240]
push edx
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], eax
lea eax, [ebp - 0x28c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
mov word [ebp - 0x25c], cx
push ebx
lea ecx, [ebp - 0x21c]
push ecx
push esi
mov dword [ebp - 0x240], ebx
mov dword [ebp - 0x28c], 0x44
mov dword [ebp - 0x260], 1
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x401568
mov dword [edi], 0x64
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x228]
mov dword [edx], eax
mov eax, ebx
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x23c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov ebx, 2
call esi
mov ecx, dword [ebp - 0x240]
push ecx
call esi
mov eax, ebx
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4015c8
mov dword [edi], 0x68
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x228]
mov dword [edx], eax
mov eax, ebx
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 8]
pop esi
mov eax, ebx
xor ecx, ebp
mov dword [edi], 2
pop ebx
call fcn.0048ac3c
mov esp, ebp
pop ebp
ret