Function at 0x4023b0
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, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x548
mov eax, dword [ecx + 4]
mov esi, eax
mov dword [ebp - 0x514], eax
call dbg.__main
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x402a52
mov dword [esp + 4], str.__app_name
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
jne 0x4028bd
mov eax, dword [ebp - 0x514]
mov ebx, dword [eax + 8]
mov dword [ebp - 0x50c], ebx
test ebx, ebx
je 0x402a52
add eax, 0xc
mov edx, dword [eax]
test edx, edx
je 0x402938
mov ebx, dword [eax + 4]
lea edi, [eax + 4]
mov dword [ebp - 0x4fc], edi
test ebx, ebx
je 0x402932
mov dword [ebp - 0x500], edi
xor esi, esi
lea esi, [esi]
nop
movzx eax, byte [ebx]
xor ecx, ecx
test al, al
sete cl
mov edi, ecx
je 0x402830
mov edx, ebx
xor ecx, ecx
jmp 0x402485
cmp al, 0x20
je 0x402720
cmp al, 9
je 0x402720
cmp al, 0x22
je 0x402730
xor ecx, ecx
movzx eax, byte [edx + 1]
add edx, 1
test al, al
je 0x402497
cmp al, 0x5c
jne 0x402460
movzx eax, byte [edx + 1]
add edx, 1
add ecx, 1
test al, al
jne 0x402485
sub edx, ebx
add edx, 1
add dword [ebp - 0x500], 4
mov eax, dword [ebp - 0x500]
add esi, edx
lea esi, [esi + edi*2]
mov ebx, dword [eax]
test ebx, ebx
jne 0x402440
lea eax, [esi + 1]
test esi, esi
mov edx, 2
mov dword [ebp - 0x508], 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 - 0x510], eax
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x402600
mov esi, dword [ebp - 0x508]
lea eax, [eax + 1]
mov dword [ebp - 0x500], eax
mov eax, 0xff
cmp esi, eax
cmovle eax, esi
mov byte [ebx], al
mov eax, dword [ebp - 0x4fc]
mov ebx, dword [eax]
test ebx, ebx
je 0x4025e9
lea esi, [esi]
nop
movzx ecx, byte [ebx]
xor eax, eax
test cl, cl
sete al
mov esi, eax
je 0x402952
mov edx, ebx
mov eax, ecx
xor edi, edi
jmp 0x402563
cmp al, 0x22
je 0x402740
movzx eax, byte [edx + 1]
add edx, 1
test al, al
je 0x402583
cmp al, 0x20
je 0x40256b
cmp al, 9
jne 0x402550
test edi, edi
jne 0x402768
movzx eax, byte [edx + 1]
add edx, 1
mov esi, 1
test al, al
jne 0x402563
test esi, esi
jne 0x402810
test edi, edi
jne 0x402786
mov edx, dword [ebp - 0x500]
mov dword [esp], edx
mov dword [ebp - 0x500], edx
mov dword [esp + 4], ebx
call dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
mov edx, dword [ebp - 0x500]
lea edi, [edx + eax]
test esi, esi
jne 0x402758
lea eax, [edi + 1]
add dword [ebp - 0x4fc], 4
mov dword [ebp - 0x500], eax
mov eax, dword [ebp - 0x4fc]
mov byte [edi], 0x20
mov ebx, dword [eax]
test ebx, ebx
jne 0x402530
cmp dword [ebp - 0x508], 1
adc dword [ebp - 0x500], 0xffffffff
mov eax, dword [ebp - 0x500]
mov byte [eax], 0
test byte [0x404000], 8
jne 0x40283a
lea eax, [ebp - 0x3d8]
mov edi, 2
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
mov eax, 1
mov word [ebp - 0x4ec], di
sub esp, 4
test byte [ebp - 0x3ac], 1
cmovne ax, word [ebp - 0x3a8]
mov word [ebp - 0x4ea], ax
xor eax, eax
mov word [ebp - 0x4dd], ax
mov eax, dword [ebp - 0x510]
mov dword [esp], eax
call sym._MapLS_4
mov dword [ebp - 0x4db], eax
sub esp, 4
lea eax, [ebp - 0x4ec]
mov dword [esp], eax
call sym._MapLS_4
mov dword [ebp - 0x4d3], 0
sub esp, 4
mov dword [ebp - 0x4d7], 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 - 0x4dd]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x50c]
mov dword [esp], eax
call sym._LoadModule16_8
movzx ebx, ax
sub esp, 8
cmp bx, 0x1f
jbe 0x402a16
lea eax, [ebp - 0x18c]
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 0x40247a
lea esi, [esi + ecx*2 + 1]
xor ecx, ecx
jmp 0x40247a
test esi, esi
jne 0x402768
mov edi, 1
jmp 0x402558
mov edi, dword [ebp - 0x500]
lea esi, [esi]
mov byte [edi], 0x22
add edi, 1
jmp 0x4025c6
mov eax, dword [ebp - 0x500]
mov byte [eax], 0x22
add eax, 1
mov dword [ebp - 0x500], eax
movzx ecx, byte [ebx]
test cl, cl
je 0x40274e
mov esi, 1
xor edx, edx
mov edi, dword [ebp - 0x500]
mov dword [ebp - 0x500], esi
mov esi, edx
jmp 0x4027b6
cmp cl, 0x22
je 0x4027e0
mov byte [edi], cl
xor esi, esi
mov edi, eax
movzx ecx, byte [ebx + 1]
add ebx, 1
test cl, cl
je 0x4027d0
lea eax, [edi + 1]
cmp cl, 0x5c
jne 0x4027a0
add ebx, 1
mov byte [edi], 0x5c
add esi, 1
mov edi, eax
movzx ecx, byte [ebx]
test cl, cl
jne 0x4027b6
mov esi, dword [ebp - 0x500]
jmp 0x4025be
lea ecx, [esi + 1]
mov dword [esp], edi
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x5c
mov dword [ebp - 0x504], ecx
call sym._memset
mov ecx, dword [ebp - 0x504]
add ecx, edi
lea edi, [edi + esi + 2]
xor esi, esi
mov byte [ecx], 0x22
jmp 0x4027ab
mov eax, dword [ebp - 0x500]
mov byte [eax], 0x22
lea edx, [eax + 1]
test edi, edi
je 0x402599
mov dword [ebp - 0x500], edx
jmp 0x40277a
mov edx, 1
jmp 0x40249c
mov dword [esp], global___dbch
call sym.___wine_dbg_get_channel_flags
test al, 8
je 0x40260d
test byte [0x404000], 8
jne 0x402963
mov eax, dword [ebp - 0x514]
mov esi, dword [ebp - 0x514]
xor ebx, ebx
mov eax, dword [eax]
test eax, eax
jne 0x402886
jmp 0x40260d
add ebx, 1
mov eax, dword [esi + ebx*4]
test eax, eax
je 0x40260d
test byte [0x404000], 8
je 0x402878
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402878
lea esi, [ebp - 0x394]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], str..exe
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SearchPathA]
mov dword [ebp - 0x50c], esi
mov edx, eax
mov eax, dword [ebp - 0x514]
sub esp, 0x18
add eax, 4
test edx, edx
jne 0x402415
mov eax, dword [ebp - 0x514]
mov eax, dword [eax + 4]
mov dword [esp], str.winevdm:_unable_to_exec__s:_file_not_found_n
mov dword [esp + 4], eax
call dbg.wine_dbg_printf
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov eax, dword [ebp - 0x4fc]
mov dword [ebp - 0x4fc], eax
mov eax, 2
mov dword [ebp - 0x508], 0
jmp 0x4024c7
mov eax, dword [ebp - 0x500]
mov byte [eax], 0x22
lea edx, [eax + 1]
jmp 0x402599
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x40285b
mov eax, dword [ebp - 0x50c]
mov dword [esp + 0xc], str.appname___s_n
mov dword [esp + 8], str.main
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x40285b
mov esi, dword [ebp - 0x510]
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], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x40285b
cmp bx, 0xb
je 0x402a7d
mov eax, dword [ebp - 0x50c]
mov dword [esp], str.winevdm:_cant_exec__s:
mov dword [esp + 4], eax
call dbg.wine_dbg_printf
cmp bx, 2
jne 0x402a6b
mov dword [esp], str.file_not_found_n
mov ebx, 2
call dbg.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 dbg.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 dbg.wine_dbg_printf
jmp 0x402a49
mov eax, dword [ebp - 0x50c]
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_strrchr]
mov dword [ebp - 0x514], eax
call eax
mov esi, dword [ebp - 0x510]
lea ebx, [esi + 1]
mov dword [ebp - 0x4fc], ebx
test eax, eax
je 0x402acc
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__stricmp]
mov dword [esp + 4], str..pif
mov dword [ebp - 0x51c], eax
call eax
mov ebx, eax
test eax, eax
je 0x402b09
mov edx, dword [ebp - 0x4fc]
mov eax, dword [ebp - 0x50c]
call dbg.start_dosbox
mov eax, dword [ebp - 0x50c]
mov dword [esp], str.winevdm:_cant_exec__s:
mov ebx, 0xb
mov dword [esp + 4], eax
call dbg.wine_dbg_printf
mov dword [esp], str.invalid_program_file_n
call dbg.wine_dbg_printf
jmp 0x402a49
mov eax, dword [ebp - 0x50c]
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 edi, eax
cmp eax, 0xffffffff
je 0x402d70
lea eax, [ebp - 0x4e8]
mov dword [esp], edi
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_GetFileSizeEx]
push esi
push esi
test eax, eax
je 0x403405
mov eax, 0x186
cmp eax, dword [ebp - 0x4e8]
sbb ebx, dword [ebp - 0x4e4]
jge 0x403405
mov eax, dword [sym.imp.kernel32.dll_SetFilePointer]
mov dword [esp + 0xc], 0
lea esi, [ebp - 0x18c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
mov dword [ebp - 0x518], eax
call eax
lea eax, [ebp - 0x4f0]
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], esi
mov dword [esp], edi
mov dword [ebp - 0x504], eax
call eax
sub esp, 0x14
test eax, eax
je 0x402f21
test byte [0x404000], 8
jne 0x402fec
lea eax, [ebp - 0x4f0]
lea ebx, [ebp - 0x4cf]
mov dword [esp], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x504]
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 - 0x500], eax
test eax, eax
jne 0x402fba
mov dword [ebp - 0x508], esi
movzx eax, word [ebp - 0x4bf]
test ax, ax
js 0x403122
lea edx, [eax + 0x16]
movzx edx, dx
cmp dword [ebp - 0x4e8], edx
mov edx, dword [ebp - 0x4e4]
sbb edx, 0
jl 0x403122
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x518]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], edi
call eax
sub esp, 0x10
test eax, eax
je 0x402f1b
lea eax, [ebp - 0x4f0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x504]
mov dword [esp + 8], 0x16
mov dword [esp + 4], ebx
mov dword [esp], edi
call eax
sub esp, 0x14
test eax, eax
je 0x402f1b
cmp byte [ebp - 0x4cf], 0
je 0x402c5f
test byte [0x404000], 8
jne 0x402db8
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.WINDOWS_386
mov dword [esp], ebx
call sym._strncmp
test eax, eax
jne 0x402c5f
lea eax, [ebp - 0x4f0]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x290]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x504]
mov dword [esp + 8], 0x68
mov dword [esp], edi
call eax
sub esp, 0x14
test byte [0x404000], 8
jne 0x402e11
mov dword [ebp - 0x500], 1
jmp 0x402c5f
test byte [0x404000], 2
je 0x402add
mov eax, dword [ebp - 0x50c]
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], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402add
movzx ecx, word [ebp - 0x4bf]
or edx, 0xffffffff
mov eax, ebx
movzx esi, word [ebp - 0x4bb]
mov dword [ebp - 0x520], ecx
call sym._wine_dbgstr_an
mov ecx, dword [ebp - 0x520]
mov dword [esp + 0x14], esi
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], 0x405514
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x402d02
movzx eax, word [ebp - 0x284]
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], 0x405514
mov dword [esp + 0x24], eax
movzx eax, word [ebp - 0x282]
mov dword [esp + 4], global___dbch
mov dword [esp + 0x20], eax
movzx eax, word [ebp - 0x288]
mov dword [esp], 3
mov dword [esp + 0x1c], eax
movzx eax, word [ebp - 0x286]
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x290]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x28e]
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x402d61
movzx eax, word [ebp - 0x27c]
mov dword [esp + 0xc], str.386rec:_option_0x_x_memory_0x_x_video_0x_x_n
mov dword [esp + 8], 0x405514
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x27e]
mov dword [esp + 4], global___dbch
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x280]
mov dword [esp], 3
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x402d61
or edx, 0xffffffff
lea eax, [ebp - 0x268]
call sym._wine_dbgstr_an
mov dword [esp + 0xc], str.386rec:_optional_parameters__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x405514
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
mov dword [ebp - 0x500], 1
jmp 0x402c5f
mov esi, dword [ebp - 0x508]
test byte [0x404000], 2
je 0x402f60
mov eax, dword [ebp - 0x50c]
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], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x50c]
push ebx
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_nInvalid_file_format._Check_your_pif_file.
mov dword [esp], esi
call sym._sprintf
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp + 4], esi
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 0x402add
test byte [0x404000], 2
je 0x402f60
mov dword [esp + 0xc], str.Invalid_pif_file:_magic_string_not_found_n
mov dword [esp + 8], 0x405514
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402f21
or edx, 0xffffffff
lea eax, [ebp - 0xe7]
call sym._wine_dbgstr_an
or edx, 0xffffffff
mov ebx, eax
lea eax, [ebp - 0x127]
call sym._wine_dbgstr_an
mov edx, 0x1e
mov dword [ebp - 0x500], eax
lea eax, [ebp - 0x18a]
call sym._wine_dbgstr_an
or edx, 0xffffffff
mov dword [ebp - 0x508], eax
lea eax, [ebp - 0x168]
call sym._wine_dbgstr_an
mov dword [esp + 0x1c], ebx
mov ecx, dword [ebp - 0x508]
mov ebx, dword [ebp - 0x500]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0xc], str.header:_program__s_title__s_startdir__s_params__s_n
mov dword [esp + 8], 0x405514
mov dword [esp + 4], global___dbch
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x402c01
movzx eax, byte [ebp - 0xa7]
mov dword [esp + 0xc], str.header:_memory_reqd__d_desrd__d_drive__d_videomode__d_n
mov dword [esp + 8], 0x405514
mov dword [esp + 0x1c], eax
movzx eax, byte [ebp - 0x128]
mov dword [esp + 4], global___dbch
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x16c]
mov dword [esp], 3
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x16a]
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
test byte [0x404000], 8
je 0x402c01
movzx eax, byte [ebp - 0x1c]
mov dword [esp + 0xc], str.header:_flags_0x_x_0x_x_0x_x_n
mov dword [esp + 8], 0x405514
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x1d]
mov dword [esp + 4], global___dbch
mov dword [esp + 0x14], eax
movzx eax, byte [ebp - 0x129]
mov dword [esp], 3
mov dword [esp + 0x10], eax
call sym._wine_dbg_log.constprop.0
jmp 0x402c01
lea eax, [ebp - 0x168]
mov dword [esp + 8], 0x40
mov esi, dword [ebp - 0x508]
mov dword [esp + 4], eax
lea eax, [ebp - 0x49a]
mov dword [esp], eax
call dbg.lstrcpynA
lea eax, [ebp - 0x18a]
sub esp, 0xc
mov dword [esp + 4], eax
lea eax, [ebp - 0x4b9]
mov dword [esp + 8], 0x1f
mov dword [esp], eax
call dbg.lstrcpynA
sub esp, 0xc
cmp dword [ebp - 0x500], 0
mov dword [esp + 8], 0x41
je 0x4033ac
lea eax, [ebp - 0x268]
lea ebx, [ebp - 0x419]
mov dword [esp + 4], eax
lea eax, [ebp - 0x45a]
mov dword [esp], eax
mov dword [ebp - 0x504], eax
call dbg.lstrcpynA
lea eax, [ebp - 0x127]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call dbg.lstrcpynA
movzx eax, word [ebp - 0x27c]
sub esp, 0xc
and eax, 0x10
mov dword [ebp - 0x500], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
lea eax, [ebp - 0x49a]
push ecx
mov dword [esp], eax
mov eax, dword [ebp - 0x514]
mov dword [esp + 4], 0x2e
call eax
test eax, eax
je 0x403222
mov dword [esp], eax
mov eax, dword [ebp - 0x51c]
mov dword [esp + 4], str..bat
call eax
test eax, eax
jne 0x403222
test byte [0x404000], 1
jne 0x403419
cmp byte [ebp - 0x419], 0
jne 0x40331c
lea eax, [ebp - 0x49a]
lea ebx, [ebp - 0x290]
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 0x4032cc
cmp dword [ebp - 0x500], 0
jne 0x4032b0
mov eax, dword [ebp - 0x510]
cmp byte [eax + 1], 0
jne 0x40329e
mov eax, dword [ebp - 0x504]
cmp byte [ebp - 0x45a], 0
cmove eax, dword [ebp - 0x4fc]
mov dword [ebp - 0x4fc], eax
mov edx, dword [ebp - 0x4fc]
mov eax, ebx
call dbg.start_dosbox
jmp 0x402add
call dword [sym.imp.kernel32.dll_AllocConsole]
test eax, eax
je 0x403278
lea eax, [ebp - 0x4b9]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetConsoleTitleA]
push eax
jmp 0x403278
mov eax, dword [ebp - 0x50c]
mov dword [esp + 4], str._s_nInvalid_program_file_name._Check_your_pif_file.
mov dword [esp], esi
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], esi
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 0x402add
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push edx
test eax, eax
jne 0x40322f
test byte [0x404000], 2
je 0x403369
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], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov eax, dword [ebp - 0x50c]
mov dword [esp + 4], str._s_nInvalid_startup_directory._Check_your_pif_file.
mov dword [esp], esi
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], esi
mov dword [esp], 0
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
jmp 0x40322f
lea eax, [ebp - 0xe7]
lea ebx, [ebp - 0x419]
mov dword [esp + 4], eax
lea eax, [ebp - 0x45a]
mov dword [esp], eax
mov dword [ebp - 0x504], eax
call dbg.lstrcpynA
lea eax, [ebp - 0x127]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call dbg.lstrcpynA
movzx eax, byte [ebp - 0x129]
sub esp, 0xc
and eax, 2
mov dword [ebp - 0x500], eax
jmp 0x4031d7
test byte [0x404000], 2
jne 0x403442
lea esi, [ebp - 0x18c]
jmp 0x402f60
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], global___dbch
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0
jmp 0x403222
mov eax, dword [ebp - 0x4e8]
mov dword [esp + 0xc], str.Invalid_pif_file:_size_error__d_n
lea esi, [ebp - 0x18c]
mov dword [esp + 8], 0x405514
mov dword [esp + 0x10], eax
mov dword [esp + 4], global___dbch
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
jmp 0x402f21