Function at 0x409174
Capabilities:
Get file size
Parse pe header
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov esi, eax
mov eax, dword [ebp - 4]
call fcn.00403534
xor eax, eax
push ebp
push 0x4093c4
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.00403544
push eax
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4093ae
push 0
push ebx
call sub.kernel32.dll_GetFileSize_1
mov dword [ebp - 0xc], eax
push 0
push 0
push 0
push 2
push 0
push ebx
call sub.kernel32.dll_CreateFileMappingA
mov edi, eax
test edi, edi
jbe 0x4093a8
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4093a2
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0xc], 0x40
jb 0x409399
lea edx, [esi + 4]
mov eax, dword [ebp - 0x14]
mov ecx, 0x40
call fcn.00402650
cmp word [esi + 4], 0x5a4d
jne 0x409399
mov eax, dword [ebp - 0xc]
xor edx, edx
push edx
push eax
mov ecx, dword [esi + 0x40]
mov eax, ecx
add eax, 0xf8
cdq
cmp edx, dword [esp + 4]
jne 0x409258
cmp eax, dword [esp]
pop edx
pop eax
ja 0x409399
jmp 0x409260
pop edx
pop eax
jg 0x409399
mov eax, dword [ebp - 0x14]
add eax, ecx
mov dword [ebp - 0x1c], eax
lea edx, [esi + 0x44]
mov eax, dword [ebp - 0x1c]
mov ecx, 0xf8
call fcn.00402650
cmp dword [esi + 0x44], 0x4550
jne 0x409399
mov eax, dword [ebp - 0x1c]
add eax, 0xf8
mov dword [esi + 0x144], eax
mov dword [ebp - 0x20], eax
movzx eax, word [esi + 0x4a]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
push eax
lea eax, [esi + 0x148]
mov ecx, 1
mov edx, dword [0x408f28]
call fcn.00404120
add esp, 4
mov ecx, dword [ebp - 0x18]
shl ecx, 3
lea ecx, [ecx + ecx*4]
mov edx, dword [esi + 0x148]
mov eax, dword [ebp - 0x20]
call fcn.00402650
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*4]
mov edx, dword [esi + 0x148]
mov eax, dword [edx + eax*8 - 0x14]
mov edx, dword [ebp - 0x18]
lea edx, [edx + edx*4]
mov ecx, dword [esi + 0x148]
add eax, dword [ecx + edx*8 - 0x18]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x24]
mov dword [esi + 0x150], eax
mov eax, dword [esi + 0x150]
call fcn.00402544
mov dword [esi + 0x14c], eax
mov edx, dword [esi + 0x14c]
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x24]
mov ecx, dword [esi + 0x150]
call fcn.00402650
mov edx, dword [esi + 0x94]
mov eax, esi
call fcn.004090c8
mov dword [esi + 0x13c], eax
cmp dword [esi + 0x13c], 0
je 0x409399
mov eax, dword [ebp - 0x18]
dec eax
test eax, eax
jl 0x409395
inc eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x28]
lea eax, [eax + eax*4]
mov edx, dword [esi + 0x148]
mov edx, dword [edx + eax*8 + 0x10]
push edx
mov edx, dword [esi + 0x148]
mov edx, dword [edx + eax*8 + 0xc]
add edx, dword [esi + 0x13c]
push edx
mov edx, dword [esi + 0x148]
mov eax, dword [edx + eax*8 + 0x14]
add eax, dword [ebp - 0x14]
pop edx
pop ecx
call fcn.00402650
inc dword [ebp - 0x28]
dec dword [ebp - 0x2c]
jne 0x409357
mov byte [ebp - 5], 1
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle_1
push ebx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4093cb
lea eax, [ebp - 4]
call fcn.004031d4
ret