Function at 0x40112a
Capabilities:
Copy file
Parse pe header
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x764
push str.PatchPE_2.04___Copyright__c__2017_2024_by_Javier_Gutierrez_Chamorro_et_al._nPatches_PE_headers_to_make_them_compatible_with_older_versions_of_Windows_nor__in_the_occasional_case_of_data_only_DLLs__make_them_work_on_Windows_CE._n_n
call sub.msvcrt.dll_wprintf
cmp dword [ebp + 8], 2
pop ecx
jge 0x401154
push str.Usage:_patchpe.exe__File____Options___n_nExample:_patchpe.exe_notepad.exe__Default_n_nAvailable_options:_n_Copy__File___________________________Create_and_operate_on_a_copy_of_the_file_n_Default______________________________Apply_default_modifications_as_of_v1.35_n_Preview______________________________Show_but_dont_apply_applicable_changes_n_Machine__Value_______________________Modify_IMAGE_FILE_HEADER_accordingly_n_Characteristics__Value__:_Mask_______Modify_IMAGE_FILE_HEADER_accordingly_n_LinkerVersion__Value_________________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_Subsystem__Value_____________________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_DllCharacteristics__Value__:_Mask____Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_OperatingSystemVersion__Value________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_ImageVersion__Value__________________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_SubsystemVersion__Value______________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_ImageBase__Value_____________________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_SizeOfStackReserve__Value____________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_SizeOfStackCommit__Value_____________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_SizeOfHeapReserve__Value_____________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_SizeOfHeapCommit__Value______________Modify_IMAGE_OPTIONAL_HEADER_accordingly_n_DependentLoadFlags__Value__:_Mask____Modify_IMAGE_LOAD_CONFIG_DIR_accordingly_n_Like__File___________________________Use_values_from_given_PE_file_n_nIf_no_options_are_given__no_patching_takes_place._nIf_the__Copy_option_is_given__it_must_precede_all_other_options._nIf_the__Like_option_is_given__subsequent_options_go_without_values._n
call sub.msvcrt.dll_wprintf
pop ecx
or eax, 0xffffffff
leave
ret
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
inc esi
cmp dword [ebp + 8], 3
mov dword [ebp - 0x14], esi
jle 0x4011ab
push str._Copy
push dword [ebx + 8]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x4011ab
push eax
push dword [ebx + 0xc]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4011a5
push dword [ebx + 0xc]
push dword [ebx + 4]
push str.Cannot_copy__s_to__s_n
call sub.msvcrt.dll_wprintf
add esp, 0xc
push 0xfffffffffffffffe
pop eax
jmp 0x402634
push 3
pop esi
mov dword [ebp - 0x14], esi
cmp dword [ebp + 8], 2
mov ecx, 0x403fc0
mov ebx, dword [ebx + esi*4]
mov eax, 0x403fb8
push edi
cmovle eax, ecx
mov dword [ebp - 0x18], ebx
push eax
push ebx
call dword [sym.imp.msvcrt.dll__wfopen]
mov edi, eax
mov dword [ebp - 0x2c], edi
pop ecx
pop ecx
test edi, edi
jne 0x4011ea
push ebx
push str.Cannot_read_input_file__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffffd
jmp 0x402632
mov esi, dword [sym.imp.msvcrt.dll_fread]
lea eax, [ebp - 0x2ec]
push edi
push 0x40
push 1
push eax
call esi
add esp, 0x10
cmp eax, 0x40
je 0x40121a
push ebx
push str.Cannot_read_DOS_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffffc
jmp 0x402612
mov ecx, 0x5a4d
mov eax, 0x4d5a
cmp word [ebp - 0x2ec], cx
je 0x40124a
cmp word [ebp - 0x2ec], ax
je 0x40124a
push ebx
push str.Not_a_valid_DOS_Executable__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffffb
jmp 0x402612
push 0
push dword [ebp - 0x2b0]
push edi
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x401274
push ebx
push str.Cannot_seek_to_read_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffffa
jmp 0x402612
push edi
push 0x1a
lea eax, [ebp - 0x2ac]
push 1
push eax
call esi
add esp, 0x10
cmp eax, 0x1a
je 0x40129e
push ebx
push str.Cannot_read_PE_header_preamble__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff9
jmp 0x402612
cmp dword [ebp - 0x2ac], 0x4550
je 0x4012be
push ebx
push str.Not_a_valid_PE_Executable._Invalid_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff8
jmp 0x402612
lea ecx, [ebp - 0x2ac]
call fcn.00401026
mov esi, eax
test esi, esi
je 0x40261d
push edi
push esi
lea eax, [ebp - 0x292]
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x4012ff
push ebx
push str.Cannot_read_PE_header_followup__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff7
jmp 0x402612
test dword [ebp - 0x294], 0x100
lea ecx, [ebp - 0x1d4]
movzx esi, word [ebp - 0x2a6]
lea eax, [ebp - 0x1e4]
cmove eax, ecx
mov dword [ebp - 0x24], esi
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], eax
push edi
push 0x28
lea eax, [ebp - 0x9c]
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, 0x28
jne 0x402603
mov ecx, dword [ebp - 0x90]
mov edx, dword [ebp - 0x28]
cmp ecx, edx
ja 0x401368
mov eax, dword [ebp - 0x94]
add eax, ecx
cmp eax, edx
ja 0x401402
add esi, 0xffff
mov dword [ebp - 0x24], esi
test si, si
jne 0x40132d
and dword [ebp - 0x10], 0
lea esi, [ebp - 0x2ac]
mov eax, 0x84
mov byte [ebp - 5], 0
mov ecx, eax
lea edi, [ebp - 0x764]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea esi, [ebp - 0x2ac]
mov eax, dword [ebp - 0x14]
lea edi, [ebp - 0x554]
inc eax
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp + 8]
jge 0x401d2f
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov ecx, dword [ebp + 0xc]
xor esi, esi
push str._Default
mov eax, dword [ecx + eax*4]
push eax
mov dword [ebp - 4], eax
call edi
pop ecx
pop ecx
test eax, eax
jne 0x40148f
or word [ebp - 0x296], 0x30
push 4
pop ecx
mov word [ebp - 0x26c], cx
mov word [ebp - 0x26a], ax
mov word [ebp - 0x264], cx
mov word [ebp - 0x262], ax
jmp 0x401d16
test si, si
je 0x401376
mov eax, dword [ebp - 0x88]
sub eax, ecx
push 0
add eax, edx
push eax
push edi
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x40143a
push ebx
push str.Cannot_seek_to_read_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff4
jmp 0x402612
lea ecx, [ebp - 0x2ac]
call fcn.00401072
mov esi, eax
test esi, esi
je 0x40147b
push edi
push esi
lea eax, [ebp - 0x1a4]
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, esi
je 0x401376
push ebx
push str.Cannot_read_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff3
jmp 0x402612
push ebx
push str.Not_a_valid_PE_Executable._Invalid_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff2
jmp 0x402612
push str._Preview
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4014a8
mov byte [ebp - 5], 1
jmp 0x401d16
cmp dword [ebp - 0x10], esi
jne 0x401692
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x14], esi
cmp esi, dword [ebp + 8]
jge 0x40249a
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + esi*4]
test esi, esi
je 0x401692
push str._Like
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401692
push 0x403fc0
push esi
call dword [sym.imp.msvcrt.dll__wfopen]
mov dword [ebp - 0x10], eax
pop ecx
pop ecx
test eax, eax
je 0x402486
mov edi, dword [sym.imp.msvcrt.dll_fread]
push eax
push 0x40
lea eax, [ebp - 0x2ec]
push 1
push eax
call edi
add esp, 0x10
cmp eax, 0x40
jne 0x402472
mov eax, 0x5a4d
cmp word [ebp - 0x2ec], ax
je 0x40153c
mov eax, 0x4d5a
cmp word [ebp - 0x2ec], ax
jne 0x4023be
push 0
push dword [ebp - 0x2b0]
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x40245e
push dword [ebp - 0x10]
lea eax, [ebp - 0x764]
push 0x1a
push 1
push eax
call edi
add esp, 0x10
cmp eax, 0x1a
jne 0x40244a
cmp dword [ebp - 0x764], 0x4550
jne 0x402436
lea ecx, [ebp - 0x764]
call fcn.00401026
mov edi, eax
test edi, edi
je 0x402422
push dword [ebp - 0x10]
lea eax, [ebp - 0x74a]
push edi
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x40240e
test dword [ebp - 0x74c], 0x100
lea ecx, [ebp - 0x68c]
movzx edi, word [ebp - 0x75e]
lea eax, [ebp - 0x69c]
cmove eax, ecx
mov ecx, dword [eax]
mov dword [ebp - 0xc], ecx
push dword [ebp - 0x10]
lea eax, [ebp - 0x344]
push 0x28
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, 0x28
jne 0x4023fa
mov ecx, dword [ebp - 0x338]
mov edx, dword [ebp - 0xc]
cmp ecx, edx
ja 0x401615
mov eax, dword [ebp - 0x33c]
add eax, ecx
cmp eax, edx
ja 0x401621
mov eax, 0xffff
add edi, eax
test di, di
jne 0x4015dc
test di, di
je 0x401d0b
mov eax, dword [ebp - 0x330]
sub eax, ecx
push 0
add eax, edx
push eax
push dword [ebp - 0x10]
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x4023e6
lea ecx, [ebp - 0x764]
call fcn.00401072
mov edi, eax
test edi, edi
je 0x4023d2
push dword [ebp - 0x10]
lea eax, [ebp - 0x65c]
push edi
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
cmp eax, edi
je 0x401d0b
push ebx
push str.Cannot_read_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe7
jmp 0x402612
push str._Machine
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4016ca
test esi, esi
je 0x4016b7
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
jmp 0x4016be
mov ax, word [ebp - 0x760]
mov word [ebp - 0x2a8], ax
jmp 0x401d16
push str._Characteristics
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x40173e
test esi, esi
je 0x4016f2
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx edi, ax
jmp 0x4016f9
movzx edi, word [ebp - 0x74e]
mov eax, dword [ebp - 4]
mov ecx, 0xffff
cmp eax, esi
push 0x3a
pop edx
cmove edi, ecx
cmp word [eax], dx
jne 0x401724
push 0
lea ecx, [ebp - 4]
add eax, 2
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx ecx, ax
mov eax, ecx
and ecx, edi
not eax
and eax, dword [ebp - 0x53e]
or eax, ecx
mov word [ebp - 0x296], ax
jmp 0x401d0b
push str._LinkerVersion
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4017e3
test esi, esi
je 0x40176b
push 0xa
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx ecx, al
jmp 0x401774
mov ecx, dword [ebp - 0x74c]
shr ecx, 0x10
mov eax, dword [ebp - 0x294]
shl ecx, 0x10
xor ecx, eax
and ecx, 0xff0000
push 0x4043e4
push dword [ebp - 4]
xor eax, ecx
mov dword [ebp - 0x294], eax
call dword [sym.imp.msvcrt.dll_wcsspn]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
mov dword [ebp - 4], eax
test esi, esi
je 0x4017bf
push 0xa
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx ecx, al
jmp 0x4017c8
mov ecx, dword [ebp - 0x74c]
shr ecx, 0x18
mov eax, dword [ebp - 0x294]
shl ecx, 0x18
and eax, 0xffffff
or ecx, eax
mov dword [ebp - 0x294], ecx
jmp 0x401d16
push 0x4043e8
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x40181e
test esi, esi
je 0x40180b
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x401812
movzx eax, word [ebp - 0x708]
mov word [ebp - 0x250], ax
jmp 0x401d16
push str._DllCharacteristics
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401892
test esi, esi
je 0x401846
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx edi, ax
jmp 0x40184d
movzx edi, word [ebp - 0x706]
mov eax, dword [ebp - 4]
mov ecx, 0xffff
cmp eax, esi
push 0x3a
pop edx
cmove edi, ecx
cmp word [eax], dx
jne 0x401878
push 0
lea ecx, [ebp - 4]
add eax, 2
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx ecx, ax
mov eax, ecx
and ecx, edi
not eax
and eax, dword [ebp - 0x4f6]
or eax, ecx
mov word [ebp - 0x24e], ax
jmp 0x401d0b
push str._SectionAlignment
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4018c8
test esi, esi
je 0x4018b7
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
jmp 0x4018bd
mov eax, dword [ebp - 0x72c]
mov dword [ebp - 0x274], eax
jmp 0x401d16
push str._FileAlignment
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4018fe
test esi, esi
je 0x4018ed
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
jmp 0x4018f3
mov eax, dword [ebp - 0x728]
mov dword [ebp - 0x270], eax
jmp 0x401d16
push str._OperatingSystemVersion
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x40197a
test esi, esi
je 0x401927
push 0xa
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x40192e
movzx eax, word [ebp - 0x724]
push 0x4043e4
push dword [ebp - 4]
mov word [ebp - 0x26c], ax
call dword [sym.imp.msvcrt.dll_wcsspn]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
mov dword [ebp - 4], eax
test esi, esi
je 0x401967
push 0xa
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x40196e
movzx eax, word [ebp - 0x722]
mov word [ebp - 0x26a], ax
jmp 0x401d16
push str._ImageVersion
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x4019f6
test esi, esi
je 0x4019a3
push 0xa
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x4019aa
movzx eax, word [ebp - 0x720]
push 0x4043e4
push dword [ebp - 4]
mov word [ebp - 0x268], ax
call dword [sym.imp.msvcrt.dll_wcsspn]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
mov dword [ebp - 4], eax
test esi, esi
je 0x4019e3
push 0xa
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x4019ea
movzx eax, word [ebp - 0x71e]
mov word [ebp - 0x266], ax
jmp 0x401d16
push str._SubsystemVersion
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401a72
test esi, esi
je 0x401a1f
push 0xa
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x401a26
movzx eax, word [ebp - 0x71c]
push 0x4043e4
push dword [ebp - 4]
mov word [ebp - 0x264], ax
call dword [sym.imp.msvcrt.dll_wcsspn]
pop ecx
pop ecx
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax*2]
mov dword [ebp - 4], eax
test esi, esi
je 0x401a5f
push 0xa
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx eax, ax
jmp 0x401a66
movzx eax, word [ebp - 0x71a]
mov word [ebp - 0x262], ax
jmp 0x401d16
push str._ImageBase
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401ad0
test esi, esi
je 0x401a97
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll__wcstoui64]
add esp, 0xc
jmp 0x401ab0
lea eax, [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x764]
call fcn.0040104d
mov ecx, eax
call fcn.00401000
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x304]
mov dword [ebp - 0x48], edx
push eax
call fcn.0040104d
lea ecx, [ebp - 0x4c]
jmp 0x401c31
push str._SizeOfStackReserve
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401b2e
test esi, esi
je 0x401af5
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll__wcstoui64]
add esp, 0xc
jmp 0x401b0e
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x764]
call fcn.00401108
mov ecx, eax
call fcn.00401000
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x314]
mov dword [ebp - 0x50], edx
push eax
call fcn.00401108
lea ecx, [ebp - 0x54]
jmp 0x401c31
push str._SizeOfStackCommit
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401b89
test esi, esi
je 0x401b53
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll__wcstoui64]
add esp, 0xc
jmp 0x401b6c
lea eax, [ebp - 0x31c]
push eax
lea ecx, [ebp - 0x764]
call fcn.004010e3
mov ecx, eax
call fcn.00401000
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x6c]
mov dword [ebp - 0x58], edx
push eax
call fcn.004010e3
lea ecx, [ebp - 0x5c]
jmp 0x401c31
push str._SizeOfHeapReserve
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401bde
test esi, esi
je 0x401bae
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll__wcstoui64]
add esp, 0xc
jmp 0x401bc4
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x764]
call fcn.004010be
mov ecx, eax
call fcn.00401000
mov dword [ebp - 0x64], eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x60], edx
push eax
call fcn.004010be
lea ecx, [ebp - 0x64]
jmp 0x401c31
push str._SizeOfHeapCommit
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401c44
test esi, esi
je 0x401c03
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll__wcstoui64]
add esp, 0xc
jmp 0x401c19
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x764]
call fcn.00401099
mov ecx, eax
call fcn.00401000
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x20]
mov dword [ebp - 0x30], edx
push eax
call fcn.00401099
lea ecx, [ebp - 0x34]
push dword [eax]
push ecx
push dword [eax + 4]
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x401d16
cmp word [ebp - 0x24], 0
je 0x4024a0
push str._DependentLoadFlags
push dword [ebp - 4]
call edi
pop ecx
pop ecx
test eax, eax
jne 0x401d13
test esi, esi
je 0x401c7b
push eax
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx edi, ax
jmp 0x401c99
test dword [ebp - 0x74c], 0x100
movzx ecx, word [ebp - 0x60e]
movzx eax, word [ebp - 0x626]
cmovne ecx, eax
movzx edi, cx
mov eax, dword [ebp - 4]
mov ecx, 0xffff
cmp eax, esi
push 0x3a
pop edx
cmove edi, ecx
cmp word [eax], dx
jne 0x401cc6
push 0
lea ecx, [ebp - 4]
add eax, 2
push ecx
push eax
call dword [sym.imp.msvcrt.dll_wcstoul]
add esp, 0xc
movzx edx, ax
jmp 0x401cc8
mov edx, ecx
test dword [ebp - 0x53c], 0x100
movzx eax, word [ebp - 0x416]
movzx ecx, word [ebp - 0x3fe]
cmovne ecx, eax
mov eax, edx
not eax
and edx, edi
and cx, ax
lea eax, [ebp - 0x16e]
or cx, dx
test dword [ebp - 0x294], 0x100
lea edx, [ebp - 0x156]
cmove eax, edx
mov word [eax], cx
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
jmp 0x401d16
mov dword [ebp - 4], esi
cmp dword [ebp - 4], esi
je 0x4024a3
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp + 8]
jl 0x4013b9
mov eax, dword [ebp - 0x294]
mov esi, eax
shr esi, 9
and esi, 1
shr eax, 8
add esi, esi
and eax, 1
or esi, eax
push ebx
shl esi, 3
push str.File:________________________________s_n
mov dword [ebp - 0xc], esi
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x550]
push eax
push str.Machine:____________________________0x_04X
call sub.msvcrt.dll_wprintf
mov cx, word [ebp - 0x2a8]
mov edi, 0x404680
cmp cx, word [ebp - 0x550]
mov ebx, 0x404684
movzx eax, cx
push eax
mov eax, edi
cmovne eax, ebx
push eax
call sub.msvcrt.dll_wprintf
mov eax, esi
shl eax, 2
push eax
push str.Bitness:_____________________________d_n
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x53e]
push eax
push str.Characteristics:____________________0x_04X
call sub.msvcrt.dll_wprintf
mov cx, word [ebp - 0x296]
cmp cx, word [ebp - 0x53e]
movzx eax, cx
push eax
mov eax, edi
cmovne eax, ebx
push eax
call sub.msvcrt.dll_wprintf
mov ecx, dword [ebp - 0x53c]
mov eax, ecx
shr eax, 0x18
push eax
shr ecx, 0x10
movzx eax, cl
push eax
push str.Linker_Version:______________________u._u
call sub.msvcrt.dll_wprintf
mov edx, dword [ebp - 0x294]
add esp, 0x3c
mov ecx, dword [ebp - 0x53c]
mov eax, edx
shr eax, 0x10
mov ebx, str.______u._u_n
movzx eax, al
mov dword [ebp + 8], eax
mov eax, ecx
shr eax, 0x10
movzx eax, al
cmp dword [ebp + 8], eax
jne 0x401e25
xor ecx, edx
mov eax, edi
test ecx, 0xff000000
je 0x401e27
mov eax, ebx
shr edx, 0x18
push edx
push dword [ebp + 8]
push eax
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x4f8]
push eax
push str.Subsystem:___________________________u
call sub.msvcrt.dll_wprintf
mov cx, word [ebp - 0x250]
mov edx, str.______u_n
cmp cx, word [ebp - 0x4f8]
movzx eax, cx
push eax
mov eax, edi
cmovne eax, edx
push eax
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x4f6]
push eax
push str.Dll_Characteristics:________________0x_04X
call sub.msvcrt.dll_wprintf
mov cx, word [ebp - 0x24e]
cmp cx, word [ebp - 0x4f6]
movzx eax, cx
mov ecx, 0x404684
push eax
mov eax, edi
cmovne eax, ecx
push eax
call sub.msvcrt.dll_wprintf
push dword [ebp - 0x51c]
push str.Section_Alignment:__________________0x_08X
call sub.msvcrt.dll_wprintf
mov eax, dword [ebp - 0x274]
mov edx, str._____0x_08X_n
cmp eax, dword [ebp - 0x51c]
mov ecx, edi
push eax
cmovne ecx, edx
push ecx
call sub.msvcrt.dll_wprintf
push dword [ebp - 0x518]
push str.File_Alignment:_____________________0x_08X
call sub.msvcrt.dll_wprintf
mov eax, dword [ebp - 0x270]
add esp, 0x44
cmp eax, dword [ebp - 0x518]
mov ecx, edi
push eax
mov eax, str._____0x_08X_n
cmovne ecx, eax
push ecx
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x512]
push eax
movzx eax, word [ebp - 0x514]
push eax
push str.Operating_System_Version:____________u._u
call sub.msvcrt.dll_wprintf
mov dx, word [ebp - 0x26c]
add esp, 0x14
mov ax, word [ebp - 0x26a]
cmp dx, word [ebp - 0x514]
jne 0x401f38
mov ecx, edi
cmp ax, word [ebp - 0x512]
je 0x401f3a
mov ecx, ebx
movzx eax, ax
push eax
movzx eax, dx
push eax
push ecx
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x50e]
push eax
movzx eax, word [ebp - 0x510]
push eax
push str.Image_Version:_______________________u._u
call sub.msvcrt.dll_wprintf
mov dx, word [ebp - 0x268]
add esp, 0x18
mov ax, word [ebp - 0x266]
cmp dx, word [ebp - 0x510]
jne 0x401f87
mov ecx, edi
cmp ax, word [ebp - 0x50e]
je 0x401f89
mov ecx, ebx
movzx eax, ax
push eax
movzx eax, dx
push eax
push ecx
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x50a]
push eax
movzx eax, word [ebp - 0x50c]
push eax
push str.Subsystem_Version:___________________u._u
call sub.msvcrt.dll_wprintf
mov cx, word [ebp - 0x264]
add esp, 0x18
mov ax, word [ebp - 0x262]
cmp cx, word [ebp - 0x50c]
jne 0x401fd6
cmp ax, word [ebp - 0x50a]
jne 0x401fd6
mov ebx, edi
movzx eax, ax
push eax
movzx eax, cx
push eax
push ebx
call sub.msvcrt.dll_wprintf
add esp, 0xc
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.0040104d
mov ecx, eax
call fcn.00401000
push edx
push eax
push esi
push str.Image_Base:_________________________0x_0I64X
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.0040104d
mov ecx, eax
call fcn.00401000
mov esi, eax
lea ecx, [ebp - 0x2ac]
lea eax, [ebp - 0x44]
mov ebx, edx
push eax
call fcn.0040104d
mov ecx, eax
call fcn.00401000
mov ecx, str._____0x_0I64X_n
mov dword [ebp + 8], ecx
cmp eax, esi
jne 0x40204f
mov esi, edi
cmp edx, ebx
je 0x402051
mov esi, ecx
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.0040104d
mov ecx, eax
call fcn.00401000
mov ebx, dword [ebp - 0xc]
push edx
push eax
push ebx
push esi
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.00401108
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push str.Size_Of_Stack_Reserve:______________0x_0I64X
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.00401108
mov ecx, eax
call fcn.00401000
mov esi, eax
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00401108
mov ecx, eax
call fcn.00401000
cmp eax, esi
jne 0x4020d8
mov esi, edi
cmp edx, dword [ebp - 0xc]
je 0x4020dd
mov esi, str._____0x_0I64X_n
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00401108
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push esi
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.004010e3
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push str.Size_Of_Stack_Commit:_______________0x_0I64X
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.004010e3
mov ecx, eax
call fcn.00401000
mov esi, eax
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004010e3
mov ecx, eax
call fcn.00401000
cmp eax, esi
jne 0x402161
mov esi, edi
cmp edx, dword [ebp - 0xc]
je 0x402166
mov esi, str._____0x_0I64X_n
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004010e3
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push esi
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.004010be
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push str.Size_Of_Heap_Reserve:_______________0x_0I64X
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.004010be
mov ecx, eax
call fcn.00401000
mov esi, eax
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004010be
mov ecx, eax
call fcn.00401000
cmp eax, esi
jne 0x4021ea
mov esi, edi
cmp edx, dword [ebp - 0xc]
je 0x4021ef
mov esi, str._____0x_0I64X_n
lea eax, [ebp - 0x6c]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.004010be
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push esi
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.00401099
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push str.Size_Of_Heap_Commit:________________0x_0I64X
call sub.msvcrt.dll_wprintf
add esp, 0x10
lea eax, [ebp - 0x20]
lea ecx, [ebp - 0x554]
push eax
call fcn.00401099
mov ecx, eax
call fcn.00401000
mov esi, eax
mov dword [ebp - 0xc], edx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00401099
mov ecx, eax
call fcn.00401000
cmp eax, esi
jne 0x402274
cmp edx, dword [ebp - 0xc]
jne 0x402274
mov dword [ebp + 8], edi
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.00401099
mov ecx, eax
call fcn.00401000
push edx
push eax
push ebx
push dword [ebp + 8]
call sub.msvcrt.dll_wprintf
mov eax, dword [ebp - 0x53e]
mov esi, str.Yes___3GB_
xor eax, dword [ebp - 0x296]
mov ecx, str.No__2GB_
test byte [ebp - 0x53e], 0x20
movzx ebx, ax
mov eax, esi
cmove eax, ecx
push eax
push str.Large_Address_Aware:_________________s
call sub.msvcrt.dll_wprintf
test byte [ebp - 0x296], 0x20
mov eax, str.No__2GB_
mov ecx, str.______s_n
cmove esi, eax
test bl, 0x20
mov eax, edi
cmovne eax, ecx
push esi
push eax
call sub.msvcrt.dll_wprintf
test byte [ebp - 0x53e], 0x10
mov esi, 0x404cdc
mov ecx, 0x404ce4
mov eax, esi
cmove eax, ecx
push eax
push str.Aggressively_trim_the_working_set:___s
call sub.msvcrt.dll_wprintf
test byte [ebp - 0x296], 0x20
mov eax, 0x404ce4
mov ecx, str.______s_n
cmove esi, eax
test bl, 0x10
mov eax, edi
cmovne eax, ecx
push esi
push eax
call sub.msvcrt.dll_wprintf
movzx eax, word [ebp - 0x416]
mov ebx, 0x100
test dword [ebp - 0x53c], ebx
movzx ecx, word [ebp - 0x3fe]
cmovne ecx, eax
cmp word [ebp - 0x24], 0
movzx eax, cx
mov ecx, str.Dependent_Load_Flags:_______________0x_04X
push eax
mov eax, str.Dependent_Load_Flags:_______________N_A
cmovne eax, ecx
push eax
call sub.msvcrt.dll_wprintf
test dword [ebp - 0x294], ebx
movzx eax, word [ebp - 0x16e]
movzx ecx, word [ebp - 0x156]
cmovne ecx, eax
test dword [ebp - 0x53c], ebx
movzx eax, word [ebp - 0x416]
movzx edx, cx
movzx ecx, word [ebp - 0x3fe]
cmovne ecx, eax
mov eax, 0x404684
cmp dx, cx
push edx
cmovne edi, eax
push edi
call sub.msvcrt.dll_wprintf
add esp, 0x40
cmp byte [ebp - 5], 0
je 0x4024b5
mov eax, str._nNot_patched_due_to_preview_mode__n_n
jmp 0x4025f2
push esi
push str.Not_a_valid_DOS_Executable__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffef
jmp 0x402612
push ebx
push str.Not_a_valid_PE_Executable._Invalid_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe6
jmp 0x402612
push ebx
push str.Cannot_seek_to_read_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe8
jmp 0x402612
push ebx
push str.Cannot_read_section_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe9
jmp 0x402612
push ebx
push str.Cannot_read_PE_header_followup__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffeb
jmp 0x402612
push ebx
push str.Not_a_valid_PE_Executable._Invalid_optional_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffea
jmp 0x402612
push esi
push str.Not_a_valid_PE_Executable._Invalid_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffec
jmp 0x402612
push esi
push str.Cannot_read_PE_header_preamble__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffed
jmp 0x402612
push esi
push str.Cannot_seek_to_read_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffee
jmp 0x402612
push esi
push str.Cannot_read_DOS_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff0
jmp 0x402612
push esi
push str.Cannot_read_input_file__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff1
jmp 0x402612
and dword [ebp - 4], 0
jmp 0x4024a3
mov dword [ebp - 4], esi
push str.Invalid_option_n
call sub.msvcrt.dll_wprintf
pop ecx
push 0xffffffffffffffe5
jmp 0x402612
push 0x210
lea eax, [ebp - 0x2ac]
push eax
lea eax, [ebp - 0x554]
push eax
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x4025ed
mov ebx, dword [ebp - 0x2c]
push 0
push dword [ebp - 0x2b0]
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x402507
push dword [ebp - 0x18]
push str.Cannot_seek_to_write_new_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe4
jmp 0x402612
mov edi, dword [sym.imp.msvcrt.dll_fwrite]
lea eax, [ebp - 0x2ac]
push ebx
push 0x1a
push 1
push eax
call edi
add esp, 0x10
cmp eax, 0x1a
je 0x402539
push dword [ebp - 0x18]
push str.Cannot_write_new_header_preamble__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe3
jmp 0x402612
lea ecx, [ebp - 0x2ac]
call fcn.00401026
mov esi, eax
test esi, esi
je 0x402574
push ebx
push esi
lea eax, [ebp - 0x292]
push 1
push eax
call edi
add esp, 0x10
cmp eax, esi
je 0x402574
push dword [ebp - 0x18]
push str.Cannot_write_new_header_followup__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe2
jmp 0x402612
cmp word [ebp - 0x24], 0
je 0x4025e6
mov eax, dword [ebp - 0x88]
sub eax, dword [ebp - 0x90]
add eax, dword [ebp - 0x28]
push 0
push eax
push ebx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
je 0x4025ae
push dword [ebp - 0x18]
push str.Cannot_seek_to_write_new_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe1
jmp 0x402612
lea ecx, [ebp - 0x2ac]
call fcn.00401072
mov esi, eax
test esi, esi
je 0x4025e6
push ebx
push esi
lea eax, [ebp - 0x1a4]
push 1
push eax
call edi
add esp, 0x10
cmp eax, esi
je 0x4025e6
push dword [ebp - 0x18]
push str.Cannot_write_new_load_config__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xffffffffffffffe0
jmp 0x402612
mov eax, str._nPatched_successfully__n_n
jmp 0x4025f2
mov eax, str._nNothing_to_patch__n_n
push eax
call sub.msvcrt.dll_wprintf
pop ecx
call dword [sym.imp.msvcrt.dll__fcloseall]
xor eax, eax
jmp 0x402633
push ebx
push str.Cannot_read_section_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
push 0xfffffffffffffff5
pop esi
call dword [sym.imp.msvcrt.dll__fcloseall]
mov eax, esi
jmp 0x402633
push ebx
push str.Not_a_valid_PE_Executable._Invalid_optional_PE_header__s_n
call sub.msvcrt.dll_wprintf
pop ecx
pop ecx
call dword [sym.imp.msvcrt.dll__fcloseall]
push 0xfffffffffffffff6
pop eax
pop edi
pop esi
pop ebx
leave
ret