Function at 0x401428
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8a0
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.0040109e
push 0x44
pop esi
push esi
lea eax, [ebp - 0x884]
push 0
push eax
call sub.MSVCR90.dll_memset
add esp, 0x14
lea eax, [ebp - 0x884]
push eax
mov dword [ebp - 0x884], esi
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
or dword [ebp - 0x82c], 0xffffffff
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x401487
sub eax, edx
push ebx
sar eax, 1
push edi
mov ebx, eax
lea eax, [ebp - 0x61c]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, eax
cmp edi, esi
jb 0x4014b4
xor edi, edi
push 0xc
push str.redirect.ini
lea eax, [ebp + ebx*2 - 0x20c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x824]
push eax
call fcn.004016bb
add esp, 0x14
test eax, eax
je 0x401509
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
test eax, eax
jne 0x401500
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x401509
mov byte [ebp - 0x825], 1
jmp 0x401510
mov byte [ebp - 0x825], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40151b
movzx ecx, byte [ebp - 0x825]
sub eax, edx
sar eax, 1
add ebx, 0x36
neg ecx
sbb ecx, ecx
and ecx, ebx
add ecx, eax
lea eax, [ecx + edi*4 + 0x12]
xor ecx, ecx
push 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
push esi
push ebx
call fcn.0040137d
add esp, 0xc
cmp byte [ebp - 0x825], 0
je 0x401592
push 0x29
push str.___env:INIFILENAMEvnd.sun.star.pathname:
push eax
call fcn.0040135a
lea ecx, [ebp - 0x20c]
push ecx
push eax
call fcn.0040137d
push 0xd
push str.redirect.ini_
push eax
call fcn.0040135a
add esp, 0x20
push 0xf
push str.___env:OOO_CWD
push eax
call fcn.0040135a
add esp, 0xc
xor esi, esi
push 1
cmp edi, esi
jne 0x4015ba
push 0x403248
push eax
call fcn.0040135a
add esp, 0xc
jmp 0x4015d5
push 0x40324c
push eax
call fcn.0040135a
lea ecx, [ebp - 0x61c]
push ecx
push eax
call fcn.004013a5
add esp, 0x14
push 1
push 0x403250
push eax
call fcn.0040135a
add esp, 0xc
lea eax, [ebp - 0x83c]
push eax
lea eax, [ebp - 0x884]
push eax
lea eax, [ebp - 0x20c]
push eax
push esi
push esi
push 1
push esi
push esi
push ebx
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push ebx
mov edi, eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
pop ecx
cmp edi, esi
pop edi
pop ebx
je 0x40167b
push 0xbf
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x83c]
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, 1
jne 0x40164c
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x8a0]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
jmp 0x40161d
lea eax, [ebp - 0x82c]
push eax
push dword [ebp - 0x83c]
mov dword [ebp - 0x82c], esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x83c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x838]
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x82c]
xor ecx, ebp
pop esi
call fcn.00401ae1
leave
ret