Function at 0x401080
Capabilities:
Clear file content
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x44a044]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
push 0x7fe
push eax
lea ecx, [ebp - 0x806]
push ecx
mov word [ebp - 0x808], ax
call fcn.00427f40
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401114
push ebx
lea edx, [ebp - 0x808]
push 0x43ade4
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x40010
push 0x43adfc
lea eax, [ebp - 0x808]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421294
mov esp, ebp
pop ebp
ret
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x40116a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x43ae04
lea ecx, [ebp - 0x808]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x40010
push 0x43adfc
lea edx, [ebp - 0x808]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421294
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 4
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x80c], eax
test eax, eax
jne 0x4011cd
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push str._s_r_nCould_not_create_file_mapping.
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x40010
push 0x43adfc
lea ecx, [ebp - 0x808]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421294
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x4011fc
mov edx, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push esi
call edi
push ebx
push str._s_r_nCould_not_map_view_of_file.
jmp 0x401192
mov edx, 0x5a4d
cmp word [edi], dx
je 0x40122a
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push esi
call edi
push ebx
push str._s_r_nInvalid_DOS_signature.
jmp 0x40112f
mov eax, dword [edi + 0x3c]
add eax, edi
cmp dword [eax], 0x4550
mov dword [ebp - 0x810], eax
je 0x401261
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push esi
call edi
push ebx
push str._s_r_nInvalid_NT_signature.
jmp 0x40112f
mov ecx, dword [eax + 0x98]
mov eax, dword [eax + 0x9c]
mov dword [ebp - 0x814], ecx
test eax, eax
je 0x40136f
push eax
add ecx, edi
push 0
push ecx
call fcn.00427f40
mov eax, dword [ebp - 0x810]
add esp, 0xc
xor ecx, ecx
push edi
mov dword [eax + 0x98], ecx
mov dword [eax + 0x9c], ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [ebp - 0x814]
xor eax, eax
push eax
push eax
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40130e
push ebx
lea edx, [ebp - 0x808]
push str._s_r_nFailed_to_set_file_pointer.
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x40010
push 0x43adfc
lea eax, [ebp - 0x808]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call edi
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421294
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x40135d
push ebx
lea ecx, [ebp - 0x808]
push str._s_r_nFailed_to_set_end_of_file.
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x40010
push 0x43adfc
lea edx, [ebp - 0x808]
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call edi
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421294
mov esp, ebp
pop ebp
ret
push esi
call edi
push ebx
push 0x43af98
lea eax, [ebp - 0x808]
push eax
jmp 0x401395
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x80c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
push esi
call edi
push ebx
push 0x43afb4
lea edx, [ebp - 0x808]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [ebp - 4]
add esp, 0xc
pop edi
xor ecx, ebp
mov eax, 1
pop esi
call fcn.00421294
mov esp, ebp
pop ebp
ret