Function at 0x405e3c
Capabilities:
Get file size
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x4061cd
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x14], eax
push ebp
push 0x40614b
push dword fs:[0]
mov dword fs:[0], esp
mov esi, dword [ebp - 0x18]
mov eax, esi
cmp word [eax], 0x5a4d
je 0x405e95
call fcn.00401d84
jmp 0x4061af
mov ecx, dword [eax + 0x3c]
test ecx, ecx
jg 0x405ea6
call fcn.00401d84
jmp 0x4061af
cmp edx, ecx
jae 0x405eb4
call fcn.00401d84
jmp 0x4061af
mov eax, dword [ebp - 0x18]
xor edx, edx
push edx
push eax
mov eax, dword [esi + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 0x4550
je 0x405ee1
call fcn.00401d84
jmp 0x4061af
lea eax, [ebp - 0x38]
call fcn.00403c6c
push dword [ebp - 0x38]
push 0x4061e8
push dword [0x40997c]
lea eax, [ebp - 0x30]
mov edx, 3
call fcn.004025bc
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x30]
call fcn.004026fc
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x405f32
call fcn.00401d84
jmp 0x4061af
push 0
push 0
push ebx
call sub.kernel32.dll_GetFileSize
push eax
push 0
push 0x1000002
push 0
push ebx
call sub.kernel32.dll_CreateFileMappingA
mov esi, eax
test esi, esi
jne 0x405f5c
call fcn.00401d84
jmp 0x4061af
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x50]
push eax
push 0
push 0
push 0x80000000
push esi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x405f85
call fcn.00401d84
jmp 0x4061af
push esi
call sub.kernel32.dll_CloseHandle
push ebx
call sub.kernel32.dll_CloseHandle
lea eax, [ebp - 0x2c]
push eax
push 4
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x50]
push eax
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
jne 0x405fb5
call fcn.00401d84
jmp 0x4061af
mov eax, dword [ebp - 4]
push dword [eax + 0x34]
mov eax, dword [ebp - 0x14]
pop edx
sub eax, edx
xor edx, edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
call fcn.0040168c
mov eax, dword [ebp - 4]
lea esi, [eax + 0x18]
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x14]
add esi, eax
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jl 0x40606e
inc eax
mov dword [ebp - 0x34], eax
xor ebx, ebx
lea eax, [ebx + ebx*4]
mov eax, dword [esi + eax*8 + 8]
lea edx, [ebx + ebx*4]
mov edx, dword [esi + edx*8 + 0x10]
mov dword [ebp - 0x28], edx
cmp eax, dword [ebp - 0x28]
jae 0x406020
xor eax, dword [ebp - 0x28]
xor dword [ebp - 0x28], eax
xor eax, dword [ebp - 0x28]
lea edx, [ebx + ebx*4]
mov edx, dword [esi + edx*8 + 0xc]
add edx, eax
mov ecx, dword [ebp - 4]
cmp edx, dword [ecx + 0x50]
jbe 0x40603b
call fcn.00401d84
jmp 0x4061af
lea edx, [ebx + ebx*4]
mov edx, dword [esi + edx*8 + 0xc]
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x24]
xor ecx, ecx
xchg edx, eax
call fcn.00401784
lea eax, [ebx + ebx*4]
mov eax, dword [esi + eax*8 + 0x14]
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
call fcn.0040168c
inc ebx
dec dword [ebp - 0x34]
jne 0x406001
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xa0]
test eax, eax
je 0x406085
push ebp
add eax, dword [ebp - 0x14]
call fcn.00405ce0
pop ecx
mov eax, 0x10c
call fcn.00401568
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x28]
add eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x104], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x100], edx
mov dl, 1
mov eax, dword [0x403064]
call fcn.00403158
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x108], eax
test byte [ebp - 0x1c], 4
je 0x4060ed
mov eax, dword [ebp - 4]
cmp dword [eax + 0x80], 0
je 0x4060ed
push ebp
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x80]
add eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x20]
call fcn.00405d58
pop ecx
mov eax, dword [ebp - 4]
movzx eax, word [eax + 6]
dec eax
test eax, eax
jl 0x406128
inc eax
mov dword [ebp - 0x34], eax
xor ebx, ebx
lea eax, [ebp - 0x2c]
push eax
lea edi, [ebx + ebx*4]
mov eax, dword [esi + edi*8 + 0x24]
call fcn.00405c70
push eax
mov eax, dword [esi + edi*8 + 8]
push eax
mov eax, dword [esi + edi*8 + 0xc]
add eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_VirtualProtect
inc ebx
dec dword [ebp - 0x34]
jne 0x4060ff
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406152
cmp dword [ebp - 0x20], 0
jne 0x40614a
cmp dword [ebp - 0x14], 0
je 0x40614a
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_UnmapViewOfFile
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4061d4
lea eax, [ebp - 0x38]
call fcn.00402338
lea eax, [ebp - 0x30]
call fcn.00402338
ret