Function at 0x401000
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push 0
call sub.kernel32.dll_GetModuleHandleA
mov dword [section..data], eax
xor ecx, ecx
mov dword [0x403004], 0x4c
mov dword [0x403008], ecx
mov dword [0x40300c], eax
mov dword [0x403010], 0x403050
mov dword [0x403020], 0x403084
mov dword [0x403024], 0x104
mov dword [0x403034], 0x403067
mov dword [0x403038], 0x281000
push 0x403004
call sub.comdlg32.dll_GetOpenFileNameA
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push 0x403084
call sub.kernel32.dll_CreateFileA
mov dword [0x40318c], eax
cmp eax, 0xffffffff
je 0x4012ec
push 0x403188
push eax
call sub.kernel32.dll_GetFileSize
mov dword [0x403190], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
test eax, eax
je 0x401301
mov dword [0x40508d], eax
push 0
push 0x403188
push dword [0x403190]
push dword [0x40508d]
push dword [0x40318c]
call sub.kernel32.dll_ReadFile
push dword [0x40318c]
call sub.kernel32.dll_CloseHandle
mov eax, dword [0x40320b]
mov ecx, dword [0x403190]
mov esi, dword [0x40508d]
sub ecx, 3
sub esi, 1
add esi, 1
sub ecx, 1
je 0x401321
cmp dword [esi], eax
jne 0x4010f5
mov edi, 0x40320b
mov edx, ecx
mov ecx, 0x16
repe cmpsb byte [esi], byte es:[edi]
je 0x401121
add edx, 0x16
sub edx, ecx
mov ecx, edx
jmp 0x4010f5
add esi, 6
lea edi, [0x403227]
mov ecx, 0x24
repe cmpsb byte [esi], byte es:[edi]
je 0x401142
add edx, 0x1c
sub edx, ecx
mov ecx, edx
jmp 0x4010f5
mov ecx, 0x40324b
sub ecx, 0x40320b
sub esi, dword [0x40508d]
sub esi, ecx
mov dword [0x405099], esi
mov edx, esi
mov esi, dword [0x40508d]
mov eax, dword [esi + 0x3c]
add esi, eax
cmp word [esi], 0x4550
jne 0x401336
movzx ecx, word [esi + 6]
mov eax, esi
sub eax, dword [0x40508d]
add eax, 0x58
add esi, 0xf8
mov dword [0x405091], eax
test ecx, ecx
je 0x401336
mov eax, dword [esi + 0x14]
add eax, dword [esi + 0x10]
cmp eax, edx
jae 0x4011a7
sub ecx, 1
add esi, 0x2c
jmp 0x40118d
add esi, 0x24
sub esi, dword [0x40508d]
mov dword [0x405095], esi
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push 0x403084
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x4012ec
mov dword [0x40318c], eax
push 0
push 0
push dword [0x405095]
push dword [0x40318c]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x403188
push 4
push 0x403194
push dword [0x40318c]
call sub.kernel32.dll_WriteFile
push 0
push 0
push dword [0x405099]
push dword [0x40318c]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x403188
push 0x1e3e
push 0x40324b
push dword [0x40318c]
call sub.kernel32.dll_WriteFile
push dword [0x40318c]
call sub.kernel32.dll_CloseHandle
push 0x40319c
push 0x403198
push 0x403084
call sub.imagehlp.dll_MapFileAndCheckSumA
test eax, eax
jne 0x401336
mov eax, dword [0x403198]
cmp eax, dword [0x40319c]
je 0x4012d2
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push 0x403084
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x4012ec
mov dword [0x40318c], eax
push 0
push 0
push dword [0x405091]
push dword [0x40318c]
call sub.kernel32.dll_SetFilePointer
push 0
push 0x403188
push 4
push 0x40319c
push dword [0x40318c]
call sub.kernel32.dll_WriteFile
push dword [0x40318c]
call sub.kernel32.dll_CloseHandle
push 0
push str.Success_
push str.Success_
push 0
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_ExitProcess
push 0x10
push str.Error_
push str.File_open_error_
push 0
call sub.user32.dll_MessageBoxA
jmp 0x4012e5
push dword [0x40318c]
call sub.kernel32.dll_CloseHandle
push 0x10
push str.Error_
push str.Can_not_allocate_memory_
push 0
call sub.user32.dll_MessageBoxA
jmp 0x4012e5
push 0x10
push str.Error_
push str.Can_not_find_source_bytes_
push 0
call sub.user32.dll_MessageBoxA
jmp 0x4012e5
push 0x10
push str.Error_
push str.Can_not_fix_checksum_
push 0
call sub.user32.dll_MessageBoxA
jmp 0x4012e5