Function at 0x401390
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
push edi
push esi
push ebx
xor ebx, ebx
sub esp, 0x4c
mov eax, dword [esp + 0x64]
mov esi, dword [eax]
mov eax, esi
movzx edx, word [eax]
lea ecx, [eax + 2]
cmp dx, 0x5c
je 0x4013c3
lea esi, [esi]
test dx, dx
je 0x4013d0
mov eax, ecx
movzx edx, word [eax]
lea ecx, [eax + 2]
cmp dx, 0x5c
jne 0x4013b0
mov ebx, eax
mov eax, ecx
jmp 0x4013b7
test ebx, ebx
lea eax, [ebx + 2]
mov edi, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x1c], 0
cmovne esi, eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x24], edi
call edi
mov ebx, eax
mov eax, dword [sym.imp.kernel32.dll_GetProcessHeap]
sub esp, 0x20
mov dword [esp + 0x30], eax
call eax
mov dword [esp + 8], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [esp + 4], 0
mov dword [esp + 0x34], eax
call eax
sub esp, 0xc
mov dword [esp + 0x3c], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call edi
sub esp, 0x20
cmp dword [esp + 0x60], 1
jle 0x4019b3
mov edi, 1
mov dword [esp + 0x28], 0
mov esi, dword [sym.imp.kernel32.dll_lstrcmpW]
mov dword [esp + 0x38], 0
mov ebp, edi
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0
jmp 0x4014eb
mov dword [esp + 4], str.__no_convert
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x401540
mov dword [esp + 0x20], 1
add ebp, 1
cmp dword [esp + 0x60], ebp
jle 0x40157e
mov eax, dword [esp + 0x64]
lea edi, [ebp*4]
mov ebx, dword [eax + ebp*4]
test byte [section..data], 8
je 0x4014c2
mov eax, ebx
call fcn.004011b0
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], str.arg__d_____s_n
mov dword [esp + 8], 0x4042f4
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call fcn.004010f0
jmp 0x4014c2
mov dword [esp + 4], str.__workdir
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x401830
add ebp, 1
cmp dword [esp + 0x60], ebp
jle 0x401851
mov eax, dword [esp + 0x64]
add ebp, 1
mov eax, dword [eax + edi + 4]
mov dword [esp + 0x28], eax
cmp dword [esp + 0x60], ebp
jg 0x4014eb
mov edi, ebp
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x4018d0
mov ebx, dword [esp + 0x2c]
test ebx, ebx
jne 0x401974
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x30]
sub esi, edi
mov dword [esp + 0x2c], esi
call eax
lea ecx, [esi*4 + 8]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 8], ecx
call eax
sub esp, 0xc
mov ebp, eax
cmp dword [esp + 0x60], edi
jle 0x401719
mov eax, dword [esp + 0x64]
xor ebx, ebx
lea esi, [eax + edi*4]
jmp 0x40161c
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileAttributesW]
sub esp, 4
cmp eax, 0xffffffff
mov eax, dword [esi]
je 0x401626
mov dword [esp], eax
call sub.kernel32.dll_wine_get_unix_file_name
mov dword [ebp + ebx*4], eax
test byte [section..data], 8
jne 0x4016d9
add ebx, 1
add esi, 4
cmp ebx, dword [esp + 0x2c]
je 0x401719
mov edx, dword [esp + 0x20]
mov eax, dword [esi]
test edx, edx
je 0x4015e0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0xfdf2
call eax
sub esp, 0x20
mov edi, eax
mov ecx, dword [esp + 0x30]
call ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], eax
call edx
sub esp, 0xc
mov dword [ebp + ebx*4], eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [esi]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x24]
mov dword [esp], 0xfdf2
call eax
sub esp, 0x20
test byte [section..data], 8
je 0x40160c
mov eax, dword [ebp + ebx*4]
mov dword [esp + 0x10], ebx
add esi, 4
add ebx, 1
mov dword [esp + 0xc], str.argv__d__s_n
mov dword [esp + 0x14], eax
mov dword [esp + 8], 0x4042f4
mov dword [esp + 4], 0x403000
mov dword [esp], 3
call fcn.004010f0
cmp ebx, dword [esp + 0x2c]
jne 0x40161c
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov dword [ebp + eax*4], 0
test ecx, ecx
je 0x401808
mov edi, dword [esp + 0x28]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfdf2
call eax
sub esp, 0x20
mov esi, eax
mov edx, dword [esp + 0x30]
call edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call edx
sub esp, 0xc
mov ebx, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfdf2
call eax
sub esp, 0x20
mov dword [esp], ebx
call sub.winelib.dll_winelib_chdir
sub esp, 4
test eax, eax
jne 0x401980
mov eax, dword [esp + 0x30]
call eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp], ebp
mov dword [esp + 4], 1
call sub.ntdll.dll___wine_unix_spawnvp
sub esp, 8
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x2c]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.__help
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
jne 0x401883
mov dword [esp + 0x38], 1
jmp 0x4014de
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 4], str._s:error:_missing_argument_for___workdir_option_n
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.00401050
mov dword [esp + 0x2c], 2
jmp 0x401565
mov dword [esp + 4], 0x404304
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
je 0x401844
mov dword [esp + 4], 0x4042fc
mov dword [esp], ebx
call esi
sub esp, 8
test eax, eax
je 0x401844
mov dword [esp + 4], 0x40434c
mov edi, ebp
mov dword [esp], ebx
call esi
sub esp, 8
cmp eax, 1
adc edi, 0
jmp 0x401580
mov dword [esp], str.Usage:__name0____help_____no_convert_____workdir_DIR__n
call fcn.00401000
mov dword [esp], str.________________APPLICATION__PARAMETERS__n
call fcn.00401000
mov dword [esp], 0x4040be
call fcn.00401000
mov dword [esp], str.Runs_a_native_application__converting_its_parameters_from_Windows_paths_to_n
call fcn.00401000
mov dword [esp], str.native_paths._n
call fcn.00401000
mov dword [esp], 0x4040be
call fcn.00401000
mov dword [esp], str.Options:_n
call fcn.00401000
mov dword [esp], str.__APPLICATION_______The_native_application_to_run_n
call fcn.00401000
mov dword [esp], str.__PARAMETERS________Parameters_for_the_application._Parameters_matching_an_n
call fcn.00401000
mov dword [esp], str.____________________existing_Windows_file_are_converted_to_a_native_path_n
call fcn.00401000
mov dword [esp], str.____no_convert______Dont_convert_the_application_parameters_to_native_paths_n
call fcn.00401000
mov dword [esp], str.____workdir_DIR_____Change_to_the_specified_native_directory_n
call fcn.00401000
mov dword [esp], str.____help___h________Shows_this_help_message_n
call fcn.00401000
mov dword [esp + 0x2c], 0
mov eax, dword [esp + 0x2c]
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov edx, dword [esp + 0x3c]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], str._s:error:_unable_to_chdir_to__s_n
mov dword [esp + 8], edx
mov dword [esp], eax
call fcn.00401050
mov dword [esp + 0x2c], 1
jmp 0x401974
mov eax, dword [esp + 0x30]
call eax
mov edx, dword [esp + 0x60]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [esp + 0x34]
lea edx, [edx*4 + 4]
mov dword [esp + 8], edx
call eax
sub esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x60]
mov dword [ebp + eax*4 - 4], 0
jmp 0x401808