Function at 0x4022f0
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 esi, dword [ecx + 4]
call fcn.00402220
mov ebx, dword [esi + 4]
test ebx, ebx
je 0x402974
mov dword [esp + 4], str.__app_name
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
jne 0x4027e5
mov eax, dword [esi + 8]
mov dword [ebp - 0x508], eax
test eax, eax
je 0x402974
lea eax, [esi + 0xc]
mov edx, dword [eax]
test edx, edx
je 0x402873
mov ebx, dword [eax + 4]
lea edi, [eax + 4]
mov dword [ebp - 0x4fc], edi
test ebx, ebx
je 0x40286d
xor eax, eax
mov dword [ebp - 0x50c], esi
mov dword [ebp - 0x500], edi
mov esi, eax
lea esi, [esi]
movzx eax, byte [ebx]
test al, al
je 0x40272d
mov edx, ebx
xor edi, edi
xor ecx, ecx
jmp 0x4023b5
cmp al, 9
je 0x402650
cmp al, 0x20
je 0x402650
cmp al, 0x22
je 0x402660
xor ecx, ecx
movzx eax, byte [edx + 1]
add edx, 1
test al, al
je 0x4023c7
cmp al, 0x5c
jne 0x402390
movzx eax, byte [edx + 1]
add edx, 1
add ecx, 1
test al, al
jne 0x4023b5
sub edx, ebx
add edx, 1
add dword [ebp - 0x500], 4
add esi, edx
mov eax, dword [ebp - 0x500]
lea esi, [esi + edi*2]
mov ebx, dword [eax]
test ebx, ebx
jne 0x402378
mov dword [ebp - 0x504], esi
mov ebx, dword [ebp - 0x504]
mov edx, 2
mov esi, dword [ebp - 0x50c]
lea eax, [ebx + 1]
test ebx, ebx
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]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x40253a
mov ebx, dword [ebp - 0x504]
lea eax, [eax + 1]
mov dword [ebp - 0x500], eax
mov eax, 0xff
cmp ebx, eax
cmovle eax, ebx
mov byte [edi], al
mov eax, dword [ebp - 0x4fc]
mov ebx, dword [eax]
test ebx, ebx
je 0x402523
mov dword [ebp - 0x50c], edi
mov dword [ebp - 0x510], esi
lea esi, [esi]
movzx ecx, byte [ebx]
test cl, cl
je 0x402851
mov edx, ebx
mov eax, ecx
xor edi, edi
xor esi, esi
jmp 0x40249b
cmp al, 0x22
je 0x402670
movzx eax, byte [edx + 1]
add edx, 1
test al, al
je 0x4024bb
cmp al, 0x20
je 0x4024a3
cmp al, 9
jne 0x402488
test esi, esi
jne 0x402680
movzx eax, byte [edx + 1]
add edx, 1
mov edi, 1
test al, al
jne 0x40249b
test edi, edi
jne 0x40273c
test esi, esi
jne 0x402720
mov dword [esp + 4], ebx
mov edi, dword [ebp - 0x500]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strcpy]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
lea edx, [edi + eax]
test esi, esi
je 0x4024f4
mov byte [edx], 0x22
add edx, 1
add dword [ebp - 0x4fc], 4
lea eax, [edx + 1]
mov byte [edx], 0x20
mov dword [ebp - 0x500], eax
mov eax, dword [ebp - 0x4fc]
mov ebx, dword [eax]
test ebx, ebx
jne 0x402470
mov edi, dword [ebp - 0x50c]
mov esi, dword [ebp - 0x510]
cmp dword [ebp - 0x504], 1
adc dword [ebp - 0x500], 0xffffffff
mov eax, dword [ebp - 0x500]
mov byte [eax], 0
test byte [section..data], 8
jne 0x402769
lea eax, [ebp - 0x3d8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoA]
mov eax, 2
mov word [ebp - 0x4ec], ax
sub esp, 4
mov eax, 1
test byte [ebp - 0x3ac], 1
jne 0x40275d
mov word [ebp - 0x4ea], ax
xor eax, eax
mov word [ebp - 0x4dd], ax
mov dword [esp], edi
call sub.krnl386.exe16_MapLS
mov dword [ebp - 0x4db], eax
lea eax, [ebp - 0x4ec]
sub esp, 4
mov dword [esp], eax
call sub.krnl386.exe16_MapLS
mov dword [ebp - 0x4d3], 0
sub esp, 4
mov dword [ebp - 0x4d7], eax
mov dword [esp], 1
call sub.krnl386.exe16_RestoreThunkLock
sub esp, 4
mov dword [esp], str.gdi.exe
call sub.krnl386.exe16_LoadLibrary16
sub esp, 4
mov dword [esp], str.user.exe
call sub.krnl386.exe16_LoadLibrary16
sub esp, 4
mov dword [esp], str.mmsystem.dll
call sub.krnl386.exe16_LoadLibrary16
lea eax, [ebp - 0x4dd]
sub esp, 4
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x508]
mov dword [esp], eax
call sub.krnl386.exe16_LoadModule16
movzx ebx, ax
sub esp, 8
cmp bx, 0x1f
jbe 0x402938
lea eax, [ebp - 0x18c]
mov dword [esp], eax
call sub.krnl386.exe16_ReleaseThunkLock
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 0x4023aa
lea esi, [esi + ecx*2 + 1]
xor ecx, ecx
jmp 0x4023aa
test edi, edi
jne 0x402680
mov esi, 1
jmp 0x402490
mov eax, dword [ebp - 0x500]
lea edx, [eax + 1]
mov byte [eax], 0x22
movzx ecx, byte [ebx]
test cl, cl
je 0x4024ee
mov esi, 1
xor eax, eax
mov edi, edx
jmp 0x4026be
cmp cl, 0x22
je 0x4026e0
mov byte [edi], cl
xor eax, eax
mov edi, edx
movzx ecx, byte [ebx + 1]
add ebx, 1
test cl, cl
je 0x4026d8
lea edx, [edi + 1]
cmp cl, 0x5c
jne 0x4026a8
add ebx, 1
mov byte [edi], 0x5c
add eax, 1
mov edi, edx
movzx ecx, byte [ebx]
test cl, cl
jne 0x4026be
mov edx, edi
jmp 0x4024ea
test eax, eax
js 0x40284a
lea edx, [eax + 1]
mov dword [esp + 8], edx
mov dword [ebp - 0x500], edx
mov dword [esp + 4], 0x5c
mov dword [esp], edi
call sub.ucrtbase.dll_memset
mov edx, dword [ebp - 0x500]
lea eax, [edi + edx]
lea edi, [eax + 1]
mov byte [eax], 0x22
xor eax, eax
jmp 0x4026b3
mov edx, dword [ebp - 0x500]
xor esi, esi
jmp 0x40269c
mov edx, 1
mov edi, 1
jmp 0x4023cc
mov eax, dword [ebp - 0x500]
lea edx, [eax + 1]
mov byte [eax], 0x22
test esi, esi
jne 0x40268c
mov dword [ebp - 0x500], edx
mov esi, edi
jmp 0x4024cb
movzx eax, word [ebp - 0x3a8]
jmp 0x402577
mov dword [esp], section..data
call fcn.00402160
test al, 8
je 0x402547
test byte [section..data], 8
jne 0x40288b
mov eax, dword [esi]
xor ebx, ebx
test eax, eax
jne 0x4027ae
jmp 0x402547
add ebx, 1
mov eax, dword [esi + ebx*4]
test eax, eax
je 0x402547
test byte [section..data], 8
je 0x4027a0
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], 0x404000
mov dword [esp], 3
call fcn.004017e0
jmp 0x4027a0
lea edi, [ebp - 0x394]
xor ecx, ecx
mov dword [esp + 4], ebx
xor ebx, ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], str..exe
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SearchPathA]
mov dword [ebp - 0x508], edi
mov edx, eax
sub esp, 0x18
lea eax, [esi + 4]
test edx, edx
jne 0x402347
mov eax, dword [esi + 4]
mov dword [esp], str.winevdm:_unable_to_exec__s:_file_not_found_n
mov dword [esp + 4], eax
call fcn.00401340
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov eax, edi
jmp 0x40270e
mov eax, dword [ebp - 0x500]
mov esi, 1
mov byte [eax], 0x22
add eax, 1
mov dword [ebp - 0x500], eax
jmp 0x4024cb
mov eax, dword [ebp - 0x4fc]
mov dword [ebp - 0x4fc], eax
xor eax, eax
mov dword [ebp - 0x504], eax
mov eax, 2
jmp 0x402403
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], 0x404000
mov dword [esp], 3
call fcn.004017e0
test byte [section..data], 8
je 0x40278a
mov eax, dword [ebp - 0x508]
mov dword [esp + 0xc], str.appname___s_n
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404000
mov dword [esp], 3
mov dword [esp + 0x10], eax
call fcn.004017e0
test byte [section..data], 8
je 0x40278a
lea eax, [edi + 1]
mov dword [esp + 0x14], eax
movsx eax, byte [edi]
mov dword [esp + 0xc], str.cmdline___.s_n
mov dword [esp + 8], str.main
mov dword [esp + 4], 0x404000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.004017e0
jmp 0x40278a
cmp bx, 0xb
je 0x40299f
mov eax, dword [ebp - 0x508]
mov dword [esp], str.winevdm:_cant_exec__s:
mov dword [esp + 4], eax
call fcn.00401340
cmp bx, 2
jne 0x40298d
mov dword [esp], str.file_not_found_n
mov ebx, 2
call fcn.00401340
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 fcn.00401340
mov dword [esp], 1
call dword [sym.imp.kernel32.dll_ExitProcess]
mov dword [esp + 4], ebx
mov dword [esp], str.error_d_n
call fcn.00401340
jmp 0x40296b
mov dword [esp + 4], 0x2e
mov eax, dword [ebp - 0x508]
lea esi, [edi + 1]
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll_strrchr]
mov dword [ebp - 0x51c], eax
call eax
mov dword [ebp - 0x500], esi
test eax, eax
je 0x4029e8
mov dword [esp], eax
mov eax, dword [sym.imp.ucrtbase.dll__stricmp]
mov dword [esp + 4], str..pif
mov dword [ebp - 0x518], eax
call eax
mov ebx, eax
test eax, eax
je 0x402a25
mov edx, dword [ebp - 0x500]
mov eax, dword [ebp - 0x508]
call fcn.00401360
mov eax, dword [ebp - 0x508]
mov dword [esp], str.winevdm:_cant_exec__s:
mov ebx, 0xb
mov dword [esp + 4], eax
call fcn.00401340
mov dword [esp], str.invalid_program_file_n
call fcn.00401340
jmp 0x40296b
xor ecx, ecx
xor esi, esi
mov dword [esp + 0x10], 3
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov eax, dword [ebp - 0x508]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov dword [ebp - 0x4fc], eax
add eax, 1
je 0x402c8b
lea eax, [ebp - 0x4e8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSizeEx]
push edx
push edx
test eax, eax
je 0x40333b
mov eax, 0x186
cmp eax, dword [ebp - 0x4e8]
sbb ebx, dword [ebp - 0x4e4]
jge 0x40333b
xor ebx, ebx
mov eax, dword [sym.imp.kernel32.dll_SetFilePointer]
xor esi, esi
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ebx
mov dword [esp + 4], ebx
mov ebx, dword [ebp - 0x4fc]
mov dword [esp], ebx
mov dword [ebp - 0x514], 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], esi
lea esi, [ebp - 0x18c]
mov dword [esp + 8], 0x171
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [ebp - 0x50c], eax
call eax
sub esp, 0x14
test eax, eax
je 0x4032f3
test byte [section..data], 8
jne 0x403197
xor ecx, ecx
mov dword [esp + 8], 0x16
lea eax, [ebp - 0x4f0]
mov dword [esp + 0x10], ecx
lea ebx, [ebp - 0x4cf]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
mov eax, dword [ebp - 0x50c]
call eax
sub esp, 0x14
mov dword [esp + 8], 0xf
mov dword [esp + 4], str.MICROSOFT_PIFEX
mov dword [esp], ebx
call sub.ucrtbase.dll_strncmp
mov dword [ebp - 0x504], eax
test eax, eax
jne 0x40312c
mov dword [ebp - 0x510], edi
movzx eax, word [ebp - 0x4bf]
test ax, ax
js 0x402d2c
lea edx, [eax + 0x16]
cmp dword [ebp - 0x4e8], edx
mov edx, dword [ebp - 0x4e4]
sbb edx, 0
jl 0x402d2c
xor edx, edx
mov dword [esp + 4], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], edx
mov edi, dword [ebp - 0x4fc]
mov dword [esp], edi
mov eax, dword [ebp - 0x514]
call eax
sub esp, 0x10
test eax, eax
je 0x4032f3
xor eax, eax
mov dword [esp + 8], 0x16
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4f0]
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov dword [esp], edi
mov eax, dword [ebp - 0x50c]
call eax
sub esp, 0x14
test eax, eax
je 0x4032f3
cmp byte [ebp - 0x4cf], 0
je 0x402b7b
test byte [section..data], 8
jne 0x402cd3
mov dword [esp + 8], 0xb
mov dword [esp + 4], str.WINDOWS_386
mov dword [esp], ebx
call sub.ucrtbase.dll_strncmp
test eax, eax
jne 0x402b7b
xor eax, eax
mov dword [esp + 8], 0x68
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4f0]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x290]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
mov eax, dword [ebp - 0x50c]
call eax
sub esp, 0x14
test byte [section..data], 8
jne 0x403005
mov dword [ebp - 0x504], 1
jmp 0x402b7b
test byte [section..data], 2
je 0x4029f9
mov eax, dword [ebp - 0x508]
or edx, 0xffffffff
call fcn.00401230
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], 0x404000
mov dword [esp], 1
call fcn.004017e0
jmp 0x4029f9
movzx ecx, word [ebp - 0x4bf]
or edx, 0xffffffff
mov eax, ebx
movzx edi, word [ebp - 0x4bb]
mov dword [ebp - 0x520], ecx
call fcn.00401230
mov ecx, dword [ebp - 0x520]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.reading_record__s_size__d_next_0x_x_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 0x18], ecx
mov dword [esp + 4], 0x404000
mov dword [esp], 3
call fcn.004017e0
jmp 0x402c19
lea eax, [ebp - 0x168]
mov edi, dword [ebp - 0x510]
mov dword [esp + 8], 0x40
mov dword [esp + 4], eax
lea eax, [ebp - 0x49a]
mov dword [esp], eax
call section..text
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 section..text
sub esp, 0xc
cmp dword [ebp - 0x504], 0
mov dword [esp + 8], 0x41
je 0x402fac
lea eax, [ebp - 0x268]
mov dword [esp + 4], eax
lea eax, [ebp - 0x45a]
mov dword [ebp - 0x50c], eax
lea ebx, [ebp - 0x419]
mov dword [esp], eax
call section..text
lea eax, [ebp - 0x127]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call section..text
movzx eax, word [ebp - 0x27c]
sub esp, 0xc
and eax, 0x10
mov dword [ebp - 0x504], eax
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
lea eax, [ebp - 0x49a]
mov dword [esp + 4], 0x2e
mov dword [esp], eax
mov eax, dword [ebp - 0x51c]
call eax
test eax, eax
je 0x402e32
mov dword [esp + 4], str..bat
mov dword [esp], eax
mov eax, dword [ebp - 0x518]
call eax
test eax, eax
jne 0x402e32
test byte [section..data], 1
jne 0x403105
cmp byte [ebp - 0x419], 0
jne 0x402f1e
xor eax, eax
xor ecx, ecx
mov dword [esp + 0xc], 0x104
mov dword [esp + 8], eax
lea eax, [ebp - 0x49a]
mov dword [esp + 4], eax
lea ebx, [ebp - 0x290]
xor eax, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SearchPathA]
sub esp, 0x18
test eax, eax
je 0x402ed0
cmp dword [ebp - 0x504], 0
jne 0x402eb4
cmp byte [edi + 1], 0
jne 0x402ea2
cmp byte [ebp - 0x45a], 0
mov eax, dword [ebp - 0x50c]
cmove eax, dword [ebp - 0x500]
mov dword [ebp - 0x500], eax
mov edx, dword [ebp - 0x500]
mov eax, ebx
call fcn.00401360
jmp 0x4029f9
call dword [sym.imp.kernel32.dll_AllocConsole]
test eax, eax
je 0x402e82
lea eax, [ebp - 0x4b9]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_SetConsoleTitleA]
push eax
jmp 0x402e82
mov eax, dword [ebp - 0x508]
mov dword [esp + 4], str._s_nInvalid_program_file_name._Check_your_pif_file.
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401290
xor edx, edx
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp], edx
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 2
jmp 0x4029f9
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
push edx
test eax, eax
jne 0x402e3f
test byte [section..data], 2
je 0x402f6b
or edx, 0xffffffff
mov eax, ebx
call fcn.00401230
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], 0x404000
mov dword [esp], 1
call fcn.004017e0
mov eax, dword [ebp - 0x508]
mov dword [esp + 4], str._s_nInvalid_startup_directory._Check_your_pif_file.
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401290
xor eax, eax
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp], eax
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
jmp 0x402e3f
lea eax, [ebp - 0xe7]
mov dword [esp + 4], eax
lea eax, [ebp - 0x45a]
mov dword [ebp - 0x50c], eax
lea ebx, [ebp - 0x419]
mov dword [esp], eax
call section..text
lea eax, [ebp - 0x127]
sub esp, 0xc
mov dword [esp + 8], 0x41
mov dword [esp + 4], eax
mov dword [esp], ebx
call section..text
movzx eax, byte [ebp - 0x129]
sub esp, 0xc
and eax, 2
mov dword [ebp - 0x504], eax
jmp 0x402de1
movzx eax, word [ebp - 0x284]
mov dword [esp + 0x24], eax
movzx eax, word [ebp - 0x282]
mov dword [esp + 0x20], eax
movzx eax, word [ebp - 0x288]
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 + 0xc], str.386rec:_memory_reqd__d_desd__d_EMS_reqd__d_desd__d_XMS_reqd__d_desd__d_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.004017e0
test byte [section..data], 8
je 0x402c7c
movzx eax, word [ebp - 0x27c]
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x27e]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x280]
mov dword [esp + 0xc], str.386rec:_option_0x_x_memory_0x_x_video_0x_x_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.004017e0
test byte [section..data], 8
je 0x402c7c
or edx, 0xffffffff
lea eax, [ebp - 0x268]
call fcn.00401230
mov dword [esp + 0xc], str.386rec:_optional_parameters__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp], 3
call fcn.004017e0
jmp 0x402c7c
xor ecx, ecx
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], 0x404000
mov dword [esp], ecx
call fcn.004017e0
jmp 0x402e32
test byte [section..data], 2
jne 0x4032cf
mov eax, dword [ebp - 0x4fc]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push eax
mov eax, dword [ebp - 0x508]
mov dword [esp + 4], str._s_nInvalid_file_format._Check_your_pif_file.
mov dword [esp], esi
mov dword [esp + 8], eax
call fcn.00401290
xor eax, eax
mov dword [esp + 4], esi
mov dword [esp + 0xc], 0x30
mov dword [esp + 8], str.16_bit_DOS_subsystem
mov dword [esp], eax
call dword [sym.imp.user32.dll_MessageBoxA]
sub esp, 0x10
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xb
jmp 0x4029f9
lea eax, [ebp - 0xe7]
or edx, 0xffffffff
call fcn.00401230
or edx, 0xffffffff
mov ebx, eax
lea eax, [ebp - 0x127]
call fcn.00401230
mov edx, 0x1e
mov dword [ebp - 0x504], eax
lea eax, [ebp - 0x18a]
call fcn.00401230
lea ecx, [ebp - 0x168]
or edx, 0xffffffff
mov dword [ebp - 0x510], eax
mov eax, ecx
call fcn.00401230
mov dword [esp + 0x1c], ebx
mov ebx, dword [ebp - 0x504]
mov dword [esp + 0x18], ebx
mov ebx, dword [ebp - 0x510]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.header:_program__s_title__s_startdir__s_params__s_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 0x14], ebx
mov dword [esp + 4], 0x404000
mov dword [esp], 3
call fcn.004017e0
test byte [section..data], 8
je 0x402b19
movzx eax, byte [ebp - 0xa7]
mov dword [esp + 0x1c], eax
movzx eax, byte [ebp - 0x128]
mov dword [esp + 0x18], eax
movzx eax, word [ebp - 0x16c]
mov dword [esp + 0x14], eax
movzx eax, word [ebp - 0x16a]
mov dword [esp + 0xc], str.header:_memory_reqd__d_desrd__d_drive__d_videomode__d_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.004017e0
test byte [section..data], 8
je 0x402b19
movzx eax, byte [ebp - 0x1c]
mov dword [esp + 0x18], eax
movzx eax, byte [ebp - 0x1d]
mov dword [esp + 0x14], eax
movzx eax, byte [ebp - 0x129]
mov dword [esp + 0xc], str.header:_flags_0x_x_0x_x_0x_x_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp + 0x10], eax
mov dword [esp], 3
call fcn.004017e0
jmp 0x402b19
mov dword [esp + 0xc], str.Invalid_pif_file:_magic_string_not_found_n
mov dword [esp + 8], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp], 1
call fcn.004017e0
test byte [section..data], 2
je 0x403139
mov eax, dword [ebp - 0x508]
or edx, 0xffffffff
call fcn.00401230
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], 0x404000
mov dword [esp], 1
call fcn.004017e0
jmp 0x403139
test byte [section..data], 2
jne 0x40334f
lea esi, [ebp - 0x18c]
jmp 0x403139
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], 0x40550c
mov dword [esp + 4], 0x404000
mov dword [esp], 1
mov dword [esp + 0x10], eax
call fcn.004017e0
jmp 0x4032f3