Function at 0x401fdc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
nop
mov eax, 0x63
mov byte [ebp - 0x15], al
mov eax, 0x6f
mov byte [ebp - 0x14], al
mov eax, 0x6d
mov byte [ebp - 0x13], al
mov eax, 0x62
mov byte [ebp - 0x12], al
mov eax, 0x45
mov byte [ebp - 0x11], al
mov eax, 0x63
mov byte [ebp - 0x10], al
mov eax, 0x6f
mov byte [ebp - 0xf], al
mov eax, 0x2e
mov byte [ebp - 0xe], al
mov eax, 0x65
mov byte [ebp - 0xd], al
mov eax, 0x78
mov byte [ebp - 0xc], al
mov eax, 0x65
mov byte [ebp - 0xb], al
mov eax, 0
mov byte [ebp - 0xa], al
mov eax, dword [ebp + 8]
cmp eax, 2
jle 0x4020f2
mov eax, dword [ebp + 0xc]
add eax, 8
mov ecx, 0x40699b
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x402097
mov eax, dword [ebp + 0xc]
add eax, 8
mov ecx, 0x40699e
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x402097
jmp 0x4020a2
mov eax, 1
mov dword [0x406010], eax
mov eax, dword [ebp + 0xc]
add eax, 8
mov ecx, 0x4069a1
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4020e7
mov eax, dword [ebp + 0xc]
add eax, 8
mov ecx, 0x4069a4
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4020e7
jmp 0x4020f2
mov eax, 1
mov dword [0x406010], eax
mov eax, dword [0x406010]
cmp eax, 0
je 0x40210b
call fcn.00401f6a
jmp 0x402143
mov eax, 0x4069a7
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0x4069a9
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0x4069e4
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, str.Net_Yaroze_batch_combiner_and_PS_X_EXE_patcher
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, dword [ebp + 8]
cmp eax, 1
jle 0x4021fc
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406a15
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4021f4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406a18
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4021f4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406a1b
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4021f4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406a1e
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4021f4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406a21
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_strcmp
add esp, 8
cmp eax, 0
je 0x4021f4
jmp 0x4021fc
mov eax, 0
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
cmp eax, 2
jge 0x40221b
mov eax, str._n_nSyntax:_yarexe_scriptfile___v__nscriptfile___is_the_siocons_AUTO_or_CWs_.sio__.dat_batch_files_n_v_or__v_for_verbose_output_and_leaves_PS_X_exe_from_CodeWarrior_.pxe_file._n_nOutput_files_is_psx.exe__a_exefixup_combined_file_which_is_ready_to_run___nIf_it_didnt_create_it__something_went_wrong_in_combine_or_eco2exe__etc.__nauto_file__Net_Yaroze_script__must_have_the_last_line_as:__go_nFile_combEco.exe_is_a_temporary_file_which_is_the_siocons_script_combined_file_and_ecoff_to_exe_applied._n_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
jmp 0x402760
mov eax, 0x406c10
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
cmp eax, ecx
jge 0x402271
jmp 0x40224f
mov eax, dword [ebp - 0x1c]
mov ecx, eax
inc eax
mov dword [ebp - 0x1c], eax
jmp 0x402231
mov eax, dword [ebp - 0x1c]
shl eax, 2
mov ecx, dword [ebp + 0xc]
add ecx, eax
mov eax, dword [ecx]
push eax
mov eax, dword [ebp - 0x1c]
push eax
mov eax, str.argv__d__s_n
push eax
call sub.msvcrt.dll_printf
add esp, 0xc
jmp 0x402244
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406c1f
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [0x478174], eax
mov eax, dword [0x478174]
cmp eax, 0
je 0x4022a2
jmp 0x402342
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, dword [eax]
push ecx
call fcn.004013e4
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406c22
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [0x478174], eax
mov eax, dword [0x478174]
cmp eax, 0
je 0x4022e4
jmp 0x402312
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, dword [eax]
push ecx
call fcn.0040139b
add esp, 4
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, 0x406c25
push ecx
mov ecx, dword [eax]
push ecx
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [0x478174], eax
mov eax, dword [0x478174]
cmp eax, 0
je 0x402326
jmp 0x402342
mov eax, dword [ebp + 0xc]
add eax, 4
mov ecx, dword [eax]
push ecx
mov eax, str.Could_not_find_input_file__s__in_original_case_and_both_upper_and_lower_case__n
push eax
call sub.msvcrt.dll_printf
add esp, 8
jmp 0x402760
mov eax, 0x406c77
push eax
lea eax, [ebp - 0x15]
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [0x478178], eax
mov eax, dword [0x478178]
cmp eax, 0
je 0x40236e
jmp 0x40238a
mov eax, dword [ebp + 0xc]
add eax, 8
mov ecx, dword [eax]
push ecx
mov eax, str.Could_not_open_output_file__s_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
jmp 0x402760
mov eax, 0x406ca6
push eax
mov eax, 0x406c9a
push eax
call sub.msvcrt.dll_fopen
add esp, 8
mov dword [0x47817c], eax
mov eax, dword [0x47817c]
cmp eax, 0
je 0x4023b8
jmp 0x4023d1
mov eax, 0x406cd3
push eax
mov eax, str.Could_not_open_temporary_output_file__s_n
push eax
call sub.msvcrt.dll_printf
add esp, 8
jmp 0x402760
mov eax, dword [0x47817c]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, 0x200800
push eax
mov eax, 1
push eax
call sub.msvcrt.dll_calloc
add esp, 8
mov dword [0x478190], eax
mov eax, 0x200800
push eax
mov eax, 1
push eax
call sub.msvcrt.dll_calloc
add esp, 8
mov dword [0x47869c], eax
mov eax, dword [0x478190]
cmp eax, 0
je 0x402437
mov eax, dword [0x47869c]
cmp eax, 0
je 0x402437
jmp 0x40244a
mov eax, str.Not_enough_memory_to_build_image__need_4_megs__n
push eax
call sub.msvcrt.dll_printf
add esp, 4
jmp 0x402760
mov eax, 0x61000
push eax
mov eax, 0x10000
push eax
mov eax, 0x40867c
push eax
call fcn.00401193
add esp, 0xc
cmp eax, 0
je 0x402472
jmp 0x402760
mov eax, dword [0x478174]
push eax
call fcn.00401000
add esp, 4
mov dword [0x478180], eax
mov eax, dword [0x478180]
inc eax
push eax
mov eax, 1
push eax
call sub.msvcrt.dll_calloc
add esp, 8
mov dword [0x478194], eax
mov eax, dword [0x478194]
cmp eax, 0
je 0x4024b7
jmp 0x4024ca
mov eax, str.ERROR:_Out_of_memory_trying_to_read_script_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
jmp 0x402760
mov eax, dword [0x478180]
push eax
mov eax, dword [0x478194]
push eax
mov eax, dword [0x478174]
push eax
call fcn.0040104e
add esp, 0xc
mov eax, dword [0x478180]
mov ecx, dword [0x478194]
add ecx, eax
mov eax, 0
mov byte [ecx], al
mov eax, 0
mov dword [ebp - 4], eax
mov eax, 0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [0x478180]
cmp eax, ecx
jge 0x4025c9
jmp 0x40252d
mov eax, dword [ebp - 4]
mov ecx, eax
inc eax
mov dword [ebp - 4], eax
jmp 0x40250c
mov eax, dword [ebp - 4]
mov ecx, dword [0x478194]
add ecx, eax
movzx eax, byte [ecx]
mov byte [ebp - 9], al
movzx eax, byte [ebp - 9]
cmp eax, 0xd
je 0x40255d
movzx eax, byte [ebp - 9]
cmp eax, 0xa
je 0x40255d
jmp 0x402597
mov eax, dword [ebp - 8]
mov ecx, 0x478198
add ecx, eax
mov eax, 0
mov byte [ecx], al
mov eax, 0
mov dword [ebp - 8], eax
mov eax, 0x478198
push eax
call fcn.00401c66
add esp, 4
cmp eax, 0
je 0x402592
jmp 0x402760
jmp 0x402522
movzx eax, byte [ebp - 9]
cmp eax, 0
je 0x4025a9
jmp 0x4025ae
jmp 0x402522
mov eax, dword [ebp - 8]
mov ecx, eax
inc eax
mov dword [ebp - 8], eax
mov eax, 0x478198
add eax, ecx
movzx ecx, byte [ebp - 9]
mov byte [eax], cl
jmp 0x402522
mov eax, dword [ebp - 8]
cmp eax, 0
je 0x402600
mov eax, dword [0x406010]
cmp eax, 0
je 0x4025f2
mov eax, str._nASSUMMING_a_single_line__one_executable_file_with_no_data__no_go_statement_or_even_new_line___n
push eax
call sub.msvcrt.dll_printf
add esp, 4
mov eax, 0x478198
push eax
call fcn.00401c66
add esp, 4
mov eax, dword [0x40600c]
cmp eax, 0
jne 0x402622
mov eax, str._n_ERROR:_auto_file_incorrect__the_word_local_must_be_before_load__n_IE:_local_load_main.exe_n
push eax
call sub.msvcrt.dll_printf
add esp, 4
jmp 0x402760
mov eax, dword [0x478190]
add eax, 0xf800
mov dword [0x478190], eax
mov eax, 0x800
push eax
mov eax, 0
push eax
mov eax, dword [0x478190]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, 8
push eax
mov eax, 0x406df7
push eax
mov eax, dword [0x478190]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [0x478190]
add eax, 0x4c
mov ecx, str.YAREXE___v3_Sept_2022___CodeWarrior_and_included_Libps.exe
push ecx
push eax
call sub.msvcrt.dll_strcpy
add esp, 8
mov eax, dword [0x478190]
add eax, 0x10
mov ecx, dword [0x406004]
mov dword [eax], ecx
mov eax, dword [0x478190]
add eax, 0x18
mov ecx, 0x80010000
mov dword [eax], ecx
mov eax, dword [0x478190]
add eax, 0x1c
mov ecx, dword [section..data]
sub ecx, 0x10000
mov dword [eax], ecx
mov eax, dword [0x478190]
add eax, 0x30
mov ecx, dword [0x406008]
mov dword [eax], ecx
mov eax, dword [section..data]
sub eax, 0xf800
mov ecx, dword [0x478178]
push ecx
push eax
mov eax, 1
push eax
mov eax, dword [0x478190]
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov eax, dword [0x406010]
cmp eax, 1
jne 0x40271e
mov eax, dword [section..data]
sub eax, 0xf800
push eax
mov eax, str.EXE_size:__lu_bytes_n______Combine2__eco2exe_finished_successfully_________n
push eax
call sub.msvcrt.dll_printf
add esp, 8
mov eax, dword [0x478178]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [0x406010]
cmp eax, 1
jne 0x40274e
lea eax, [ebp - 0x15]
push eax
mov eax, str._nexefixup_filename_s__n
push eax
call sub.msvcrt.dll_printf
add esp, 8
lea eax, [ebp - 0x15]
push eax
call fcn.00404761
add esp, 4
mov dword [0x406ea0], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
push eax
call sub.msvcrt.dll_fflush
add esp, 4
mov eax, dword [0x478174]
cmp eax, 0
je 0x402790
mov eax, dword [0x478174]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [0x478178]
cmp eax, 0
je 0x4027ae
mov eax, dword [0x478178]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
mov eax, dword [0x47817c]
cmp eax, 0
je 0x4027cc
mov eax, dword [0x47817c]
push eax
call sub.msvcrt.dll_fclose
add esp, 4
lea eax, [ebp - 0x15]
push eax
call sub.msvcrt.dll__unlink
add esp, 4
mov eax, 0x406ea4
push eax
call sub.msvcrt.dll__unlink
add esp, 4
mov eax, dword [0x478190]
cmp eax, 0
je 0x402804
mov eax, dword [0x478190]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [0x47869c]
cmp eax, 0
je 0x402822
mov eax, dword [0x47869c]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [0x478194]
cmp eax, 0
je 0x402840
mov eax, dword [0x478194]
push eax
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [0x406ea0]
leave
ret