Function at 0x402800
Capabilities:
Accept command line arguments
Get file size
Get process heap flags
Read file on windows
Set console window title
Set current directory
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff8
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x528
mov eax, dword [ecx + 4]
mov esi, eax
mov dword [ebp - 0x500], eax
call sym.___main
mov eax, dword [esi + 4]
test eax, eax
je 0x402e74
mov edi, str.__app_name
mov ecx, 0xb
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
seta dl
sbb dl, 0
test dl, dl
jne 0x402cd3
mov eax, dword [ebp - 0x500]
mov esi, dword [eax + 8]
mov dword [ebp - 0x4f8], esi
test esi, esi
je 0x402e74
add eax, 0xc
mov edx, dword [eax]
test edx, edx
je 0x402d55
mov ebx, dword [eax + 4]
lea edi, [eax + 4]
mov dword [ebp - 0x4ec], edi
test ebx, ebx
je 0x402d4f
mov dword [ebp - 0x4f0], edi
xor esi, esi
nop
movzx eax, byte [ebx]
xor ecx, ecx
test al, al
sete cl
mov edi, ecx
je 0x4028dd
mov edx, ebx
xor ecx, ecx
jmp 0x4028cb
cmp al, 0x20
je 0x402b50
cmp al, 9
je 0x402b50
cmp al, 0x22
je 0x402b70
xor ecx, ecx
movzx eax, byte [edx + 1]
inc edx
test al, al
je 0x4028d9
cmp al, 0x5c
jne 0x4028a8
movzx eax, byte [edx + 1]
inc edx
inc ecx
test al, al
jne 0x4028cb
sub edx, ebx
add esi, edx
lea eax, [esi + 1]
add esi, 3
test edi, edi
cmove esi, eax
add dword [ebp - 0x4f0], 4
mov eax, dword [ebp - 0x4f0]
mov ebx, dword [eax]
test ebx, ebx
jne 0x402890
lea eax, [esi + 1]
test esi, esi
mov edx, 2
mov dword [ebp - 0x4f4], esi
cmove eax, edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [ebp - 0x4fc], eax
sub esp, 0xc
mov esi, eax
test eax, eax
je 0x402a30
mov edi, dword [ebp - 0x4f4]
lea eax, [eax + 1]
mov dword [ebp - 0x4f0], eax
mov eax, 0xff
cmp edi, 0xff
cmovle eax, edi
mov byte [esi], al
mov eax, dword [ebp - 0x4ec]
mov edi, dword [eax]
test edi, edi
je 0x402a19
lea esi, [esi]
movzx esi, byte [edi]
xor ebx, ebx
mov eax, esi
test al, al
sete bl
je 0x402d6f
mov edx, edi
xor ecx, ecx
jmp 0x4029a1
cmp al, 0x22
je 0x402b60
movzx eax, byte [edx + 1]
inc edx
test al, al
je 0x4029bf
cmp al, 0x20
je 0x4029a9
cmp al, 9
jne 0x402990
test ecx, ecx
jne 0x402b98
movzx eax, byte [edx + 1]
inc edx
mov ebx, 1
test al, al
jne 0x4029a1
test ebx, ebx
jne 0x402c30
test ecx, ecx
jne 0x402bb6
mov esi, dword [ebp - 0x4f0]
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
lea edx, [esi + eax]
test ebx, ebx
jne 0x402b88
lea eax, [edx + 1]
add dword [ebp - 0x4ec], 4
mov dword [ebp - 0x4f0], eax
mov eax, dword [ebp - 0x4ec]
mov byte [edx], 0x20
mov edi, dword [eax]
test edi, edi
jne 0x402978
cmp dword [ebp - 0x4f4], 1
adc dword [ebp - 0x4f0], 0xffffffff
mov eax, dword [ebp - 0x4f0]
mov byte [eax], 0
test byte [0x404030], 8
jne 0x402c4f
lea eax, [ebp - 0x3d0]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
mov eax, 2
sub esp, 4
mov word [ebp - 0x4e4], ax
mov eax, 1
test byte [ebp - 0x3a4], 1
cmovne ax, word [ebp - 0x3a0]
mov word [ebp - 0x4e2], ax
xor eax, eax
mov word [ebp - 0x4d5], ax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call sym._MapLS_4
mov dword [ebp - 0x4d3], eax
sub esp, 4
lea eax, [ebp - 0x4e4]
mov dword [esp], eax
call sym._MapLS_4
mov dword [ebp - 0x4cb], 0
sub esp, 4
mov dword [ebp - 0x4cf], eax
mov dword [esp], 1
call sym._RestoreThunkLock_4
sub esp, 4
mov dword [esp], str.gdi.exe
call sym._LoadLibrary16_4
sub esp, 4
mov dword [esp], str.user.exe
call sym._LoadLibrary16_4
sub esp, 4
mov dword [esp], str.mmsystem.dll
call sym._LoadLibrary16_4
lea eax, [ebp - 0x4d5]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4f8]
mov dword [esp], eax
call sym._LoadModule16_8
movzx ebx, ax
sub esp, 8
cmp bx, 0x1f
jbe 0x402e38
lea eax, [ebp - 0x184]
mov dword [esp], eax
call sym._ReleaseThunkLock_4
sub esp, 4
mov dword [esp], 0xffffffff
call dword [sym.imp.kernel32.dll_Sleep]
xor eax, eax
sub esp, 4
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
xor ecx, ecx
mov edi, 1
jmp 0x4028c2
test ebx, ebx
jne 0x402b98
mov ecx, 1
jmp 0x402998
lea esi, [esi + ecx*2 + 1]
xor ecx, ecx
jmp 0x4028c2
mov edx, dword [ebp - 0x4f0]
lea esi, [esi]
mov byte [edx], 0x22
inc edx
jmp 0x4029f6
mov eax, dword [ebp - 0x4f0]
mov byte [eax], 0x22
inc eax
mov dword [ebp - 0x4f0], eax
movzx esi, byte [edi]
mov eax, esi
test al, al
je 0x402b7b
mov ebx, 1
mov edx, dword [ebp - 0x4f0]
xor ecx, ecx
mov dword [ebp - 0x4f0], ebx
mov ebx, esi
jmp 0x402be4
cmp bl, 0x22
je 0x402c08
mov byte [edx], bl
xor ecx, ecx
mov edx, eax
movzx ebx, byte [edi + 1]
inc edi
test bl, bl
je 0x402bfa
lea eax, [edx + 1]
cmp bl, 0x5c
jne 0x402bd0
inc edi
mov byte [edx], 0x5c
inc ecx
mov edx, eax
movzx ebx, byte [edi]
test bl, bl
jne 0x402be4
mov ebx, dword [ebp - 0x4f0]
jmp 0x4029ee
test ecx, ecx
js 0x402d48
not edx
lea esi, [esi]
mov byte [eax - 1], 0x5c
mov esi, eax
inc eax
lea ebx, [edx + eax]
cmp ecx, ebx
jge 0x402c18
mov byte [esi], 0x22
lea edx, [esi + 1]
xor ecx, ecx
jmp 0x402bdb
mov eax, dword [ebp - 0x4f0]
mov byte [eax], 0x22
lea esi, [eax + 1]
test ecx, ecx
je 0x4029d5
mov dword [ebp - 0x4f0], esi
jmp 0x402ba8
mov dword [esp], 0x404030
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x402a3d
test byte [0x404030], 8
jne 0x402d85
mov eax, dword [ebp - 0x500]
mov esi, dword [ebp - 0x500]
xor ebx, ebx
mov eax, dword [eax]
test eax, eax
jne 0x402c9c
jmp 0x402a3d
inc ebx
mov eax, dword [esi + ebx*4]
test eax, eax
je 0x402a3d
test byte [0x404030], 8
je 0x402c90
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.argv__d_:__s_n
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402c90
lea ebx, [ebp - 0x38c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], str..exe
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SearchPathA]
mov dword [ebp - 0x4f8], ebx
mov edx, eax
mov eax, dword [ebp - 0x500]
sub esp, 0x18
add eax, 4
test edx, edx
jne 0x402868
mov eax, dword [ebp - 0x500]
mov eax, dword [eax + 4]
mov dword [esp], str.winevdm:_unable_to_exec__s:_file_not_found_n
mov dword [esp + 4], eax
call sym._wine_dbg_printf
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov esi, edx
jmp 0x402c26
mov eax, dword [ebp - 0x4ec]
mov dword [ebp - 0x4ec], eax
mov eax, 2
mov dword [ebp - 0x4f4], 0
jmp 0x40290e
mov eax, dword [ebp - 0x4f0]
mov ebx, 1
mov byte [eax], 0x22
lea esi, [eax + 1]
jmp 0x4029d5
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [esp + 0xc], str.GetCommandLine___s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x402c70
mov eax, dword [ebp - 0x4f8]
mov dword [esp + 0xc], str.appname___s_n
mov dword [esp + 8], str.main
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x402c70
mov esi, dword [ebp - 0x4fc]
lea eax, [esi + 1]
mov dword [esp + 0x14], eax
movsx eax, byte [esi]
mov dword [esp + 0xc], str.cmdline___.s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402c70
cmp bx, 0xb
je 0x402e9f
mov eax, dword [ebp - 0x4f8]
mov dword [esp], str.winevdm:_cant_exec__s:
mov dword [esp + 4], eax
call sym._wine_dbg_printf
cmp bx, 2
jne 0x402e8d
mov dword [esp], str.file_not_found_n
mov ebx, 2
call sym._wine_dbg_printf
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp], str.Usage:_winevdm.exe____app_name_app.exe__command_line_n_n
call sym._wine_dbg_printf
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 4], ebx
mov dword [esp], str.error_d_n
call sym._wine_dbg_printf
jmp 0x402e6b
mov eax, dword [ebp - 0x4f8]
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_strrchr]
mov dword [ebp - 0x50c], eax
call eax
mov esi, dword [ebp - 0x4fc]
inc esi
mov dword [ebp - 0x4ec], esi
test eax, eax
je 0x402eec
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__stricmp]
mov dword [esp + 4], str..pif
mov dword [ebp - 0x504], eax
call eax
mov ebx, eax
test eax, eax
je 0x402f29
mov edx, dword [ebp - 0x4ec]
mov eax, dword [ebp - 0x4f8]
call sym._start_dosbox
mov eax, dword [ebp - 0x4f8]
mov dword [esp], str.winevdm:_cant_exec__s:
mov ebx, 0xb
mov dword [esp + 4], eax
call sym._wine_dbg_printf
mov dword [esp], str.invalid_program_file_n
call sym._wine_dbg_printf
jmp 0x402e6b
mov eax, dword [ebp - 0x4f8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x403190
lea eax, [ebp - 0x4e0]
mov dword [esp], esi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetFileSizeEx]
push edi
push edi
test eax, eax
je 0x403827
mov eax, 0x186
cmp eax, dword [ebp - 0x4e0]
sbb ebx, dword [ebp - 0x4dc]
jge 0x403827
mov eax, dword [sym.imp.kernel32.dll_SetFilePointer]
mov dword [esp + 0xc], 0
lea edi, [ebp - 0x184]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
mov dword [ebp - 0x508], eax
call eax
lea eax, [ebp - 0x4e8]
sub esp, 0x10
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.kernel32.dll_ReadFile]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x171
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [ebp - 0x4f4], eax
call eax
sub esp, 0x14
test eax, eax
je 0x403341
test byte [0x404030], 8
jne 0x40340c
lea eax, [ebp - 0x4e8]
lea ebx, [ebp - 0x4c7]
mov dword [esp], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4f4]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x16
mov dword [esp + 4], ebx
call eax
sub esp, 0x14
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.MICROSOFT_PIFEX
mov dword [esp], ebx
call sym._strncmp
mov dword [ebp - 0x4f0], eax
test eax, eax
jne 0x4033da
mov dword [ebp - 0x500], edi
movzx eax, word [ebp - 0x4b7]
test ax, ax
js 0x403544
lea edx, [eax + 0x16]
movzx edx, dx
cmp dword [ebp - 0x4e0], edx
mov edx, dword [ebp - 0x4dc]
sbb edx, 0
jl 0x403544
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x508]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], esi
call eax
sub esp, 0x10
test eax, eax
je 0x40333b
lea eax, [ebp - 0x4e8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4f4]
mov dword [esp + 8], 0x16
mov dword [esp + 4], ebx
mov dword [esp], esi
call eax
sub esp, 0x14
test eax, eax
je 0x40333b
cmp byte [ebp - 0x4c7], 0
je 0x40307f
test byte [0x404030], 8
jne 0x4031d8
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.WINDOWS_386
mov dword [esp], ebx
call sym._strncmp
test eax, eax
jne 0x40307f
lea eax, [ebp - 0x4e8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x288]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4f4]
mov dword [esp + 8], 0x68
mov dword [esp], esi
call eax
sub esp, 0x14
test byte [0x404030], 8
jne 0x403231
mov dword [ebp - 0x4f0], 1
jmp 0x40307f
test byte [0x404030], 2
je 0x402efd
mov eax, dword [ebp - 0x4f8]
or edx, 0xffffffff
call sym._wine_dbgstr_an
mov dword [esp + 0xc], str.open_file__s_failed_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.pif_cmd
mov dword [esp + 4], 0x404030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402efd
movzx ecx, word [ebp - 0x4b7]
or edx, 0xffffffff
mov eax, ebx
movzx edi, word [ebp - 0x4b3]
mov dword [ebp - 0x510], ecx
call sym._wine_dbgstr_an
mov ecx, dword [ebp - 0x510]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0xc], str.reading_record__s_size__d_next_0x_x_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x403122
movzx eax, word [ebp - 0x27c]
mov dword [esp + 0xc], str.386rec:_memory_reqd__d_desd__d_EMS_reqd__d_desd__d_XMS_reqd__d_desd__d_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 0x24], eax
movzx eax, word [ebp - 0x27a]
mov dword [esp + 4], 0x404030
mov dword [esp + 0x20], eax
movzx eax, word [ebp - 0x280]
mov dword [esp], 3
mov dword [esp + 0x1c], eax
movzx eax, word [ebp - 0x27e]
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x288]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x286]
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x403181
movzx eax, word [ebp - 0x274]
mov dword [esp + 0xc], str.386rec:_option_0x_x_memory_0x_x_video_0x_x_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x276]
mov dword [esp + 4], 0x404030
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x278]
mov dword [esp], 3
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x403181
or edx, 0xffffffff
lea eax, [ebp - 0x260]
call sym._wine_dbgstr_an
mov dword [esp + 0xc], str.386rec:_optional_parameters__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov dword [ebp - 0x4f0], 1
jmp 0x40307f
mov edi, dword [ebp - 0x500]
test byte [0x404030], 2
je 0x403380
mov eax, dword [ebp - 0x4f8]
or edx, 0xffffffff
call sym._wine_dbgstr_an
mov dword [esp + 0xc], str.failed_to_read__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.pif_cmd
mov dword [esp + 4], 0x404030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x4f8]
push ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_nInvalid_file_format._Check_your_pif_file.
mov dword [esp], edi
call sym._sprintf
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xb
jmp 0x402efd
test byte [0x404030], 2
je 0x403380
mov dword [esp + 0xc], str.Invalid_pif_file:_magic_string_not_found_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 4], 0x404030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x403341
or edx, 0xffffffff
lea eax, [ebp - 0xdf]
call sym._wine_dbgstr_an
or edx, 0xffffffff
mov ebx, eax
lea eax, [ebp - 0x11f]
call sym._wine_dbgstr_an
mov edx, 0x1e
mov dword [ebp - 0x4f0], eax
lea eax, [ebp - 0x182]
call sym._wine_dbgstr_an
lea ecx, [ebp - 0x160]
or edx, 0xffffffff
mov dword [ebp - 0x500], eax
mov eax, ecx
call sym._wine_dbgstr_an
mov ecx, dword [ebp - 0x4f0]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x500]
mov dword [esp + 0xc], str.header:_program__s_title__s_startdir__s_params__s_n
mov dword [esp + 0x14], ecx
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 4], 0x404030
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x403021
movzx eax, byte [ebp - 0x9f]
mov dword [esp + 0xc], str.header:_memory_reqd__d_desrd__d_drive__d_videomode__d_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 0x1c], eax
movzx eax, byte [ebp - 0x120]
mov dword [esp + 4], 0x404030
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x164]
mov dword [esp], 3
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x162]
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404030], 8
je 0x403021
movzx eax, byte [ebp - 0x14]
mov dword [esp + 0xc], str.header:_flags_0x_x_0x_x_0x_x_n
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x15]
mov dword [esp + 4], 0x404030
mov dword [esp + 0x14], eax
movzx eax, byte [ebp - 0x121]
mov dword [esp], 3
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
jmp 0x403021
lea eax, [ebp - 0x160]
mov dword [esp + 8], 0x40
mov edi, dword [ebp - 0x500]
mov dword [esp + 4], eax
lea eax, [ebp - 0x492]
mov dword [esp], eax
call sym._lstrcpynA_12
lea eax, [ebp - 0x182]
sub esp, 0xc
mov dword [esp + 4], eax
lea eax, [ebp - 0x4b1]
mov dword [esp + 8], 0x1f
mov dword [esp], eax
call sym._lstrcpynA_12
sub esp, 0xc
cmp dword [ebp - 0x4f0], 0
mov dword [esp + 8], 0x41
je 0x4037ce
lea eax, [ebp - 0x260]
lea ebx, [ebp - 0x411]
mov dword [esp + 4], eax
lea eax, [ebp - 0x452]
mov dword [esp], eax
mov dword [ebp - 0x4f4], eax
call sym._lstrcpynA_12
lea eax, [ebp - 0x11f]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._lstrcpynA_12
movzx eax, word [ebp - 0x274]
sub esp, 0xc
and eax, 0x10
mov dword [ebp - 0x4f0], eax
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
lea eax, [ebp - 0x492]
push ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x50c]
mov dword [esp + 4], 0x2e
call eax
test eax, eax
je 0x403644
mov dword [esp], eax
mov eax, dword [ebp - 0x504]
mov dword [esp + 4], str..bat
call eax
test eax, eax
jne 0x403644
test byte [0x404030], 1
jne 0x40383b
cmp byte [ebp - 0x411], 0
jne 0x40373e
lea eax, [ebp - 0x492]
lea ebx, [ebp - 0x288]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SearchPathA]
sub esp, 0x18
test eax, eax
je 0x4036ee
cmp dword [ebp - 0x4f0], 0
jne 0x4036d2
mov eax, dword [ebp - 0x4fc]
cmp byte [eax + 1], 0
jne 0x4036c0
mov eax, dword [ebp - 0x4f4]
cmp byte [ebp - 0x452], 0
cmove eax, dword [ebp - 0x4ec]
mov dword [ebp - 0x4ec], eax
mov edx, dword [ebp - 0x4ec]
mov eax, ebx
call sym._start_dosbox
jmp 0x402efd
call dword [sym.imp.kernel32.dll_AllocConsole]
test eax, eax
je 0x40369a
lea eax, [ebp - 0x4b1]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetConsoleTitleA]
push eax
jmp 0x40369a
mov eax, dword [ebp - 0x4f8]
mov dword [esp + 4], str._s_nInvalid_program_file_name._Check_your_pif_file.
mov dword [esp], edi
mov dword [esp + 8], eax
call sym._sprintf
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
jmp 0x402efd
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push edx
test eax, eax
jne 0x403651
test byte [0x404030], 2
je 0x40378b
or edx, 0xffffffff
mov eax, ebx
call sym._wine_dbgstr_an
mov dword [esp + 0xc], str.Cannot_change_directory__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.pif_cmd
mov dword [esp + 4], 0x404030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov eax, dword [ebp - 0x4f8]
mov dword [esp + 4], str._s_nInvalid_startup_directory._Check_your_pif_file.
mov dword [esp], edi
mov dword [esp + 8], eax
call sym._sprintf
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp + 4], edi
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
jmp 0x403651
lea eax, [ebp - 0xdf]
lea ebx, [ebp - 0x411]
mov dword [esp + 4], eax
lea eax, [ebp - 0x452]
mov dword [esp], eax
mov dword [ebp - 0x4f4], eax
call sym._lstrcpynA_12
lea eax, [ebp - 0x11f]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym._lstrcpynA_12
movzx eax, byte [ebp - 0x121]
sub esp, 0xc
and eax, 2
mov dword [ebp - 0x4f0], eax
jmp 0x4035f9
test byte [0x404030], 2
jne 0x403864
lea edi, [ebp - 0x184]
jmp 0x403380
mov dword [esp + 0xc], str..bat_programs_in_pif_files_are_not_supported._n
mov dword [esp + 8], str.pif_cmd
mov dword [esp + 4], 0x404030
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x403644
mov eax, dword [ebp - 0x4e0]
mov dword [esp + 0xc], str.Invalid_pif_file:_size_error__d_n
lea edi, [ebp - 0x184]
mov dword [esp + 8], str.read_pif_file
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x404030
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x403341