Function at 0x407420
Capabilities:
Get file size
Read file via mapping
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push 0x42fc58
mov esi, 0x11
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x14], edi
cmp edi, 0xffffffff
je 0x40765c
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov ebx, eax
push ebx
push 0
push 2
push 0
push edi
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x407654
push ebx
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [ebp - 8], edi
test edi, edi
je 0x407646
mov edi, dword [0x42f7bc]
test edi, edi
jne 0x407508
lea edi, [ebx - 0x13]
mov dword [ebp - 4], 0x13
mov dword [0x42f7bc], edi
test edi, edi
je 0x4074ff
mov ebx, eax
nop dword [eax]
lea ecx, [edi + ebx]
mov edx, 0x422d80
mov esi, 0xf
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4074f1
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4074d0
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x4074f1
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
je 0x4074fc
sub edi, 1
mov dword [0x42f7bc], edi
jne 0x4074c0
mov ebx, dword [ebp - 0xc]
add edi, 0x13
mov dword [0x42f7bc], edi
mov eax, dword [ebp - 8]
lea esi, [edi + eax]
lea edi, [eax + ebx]
cmp esi, edi
jae 0x40754b
mov ecx, esi
mov edx, esi
lea ebx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407520
sub ecx, ebx
add esi, ecx
push edx
push dword [ebp + 8]
mov eax, dword [esi + 1]
add esi, 5
mov dword [ebp - 4], eax
call fcn.0040f993
add esp, 8
test eax, eax
je 0x407564
add esi, dword [ebp - 4]
cmp esi, edi
jb 0x407515
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0x11
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x40764c
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x4075b7
mov eax, dword [ebp - 4]
add eax, dword [ebp + 0x1c]
push eax
push 1
call fcn.004166f8
mov ecx, eax
add esp, 8
mov eax, dword [ebp + 0x14]
mov dword [eax], ecx
test ecx, ecx
je 0x40754b
push dword [ebp - 4]
push esi
push ecx
call fcn.0040d680
mov ecx, dword [ebp + 0x18]
lea esi, [edi + 0x11]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0xc
test ecx, ecx
je 0x407556
mov eax, dword [ebp - 4]
push dword [ebp - 8]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x40764c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 0xc]
mov dword [ebp - 0xc], 8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40761f
mov eax, dword [ebp - 4]
cmp edi, 2
jne 0x4075f3
sub esi, dword [ebp - 8]
add eax, esi
mov esi, dword [ebp - 8]
mov dword [ebp - 4], eax
push 0
lea ecx, [ebp - 4]
push ecx
push eax
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, dword [ebp - 0xc]
xor ecx, ecx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
push ebx
cmovne esi, ecx
call edi
test esi, esi
je 0x407556
jmp 0x40762a
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
cmp eax, 0x20
mov ecx, 0x1f
cmove esi, ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x40764c
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call edi
mov edi, dword [ebp - 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret