Function at 0x4c5d40
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54f2b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa4
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
push 0
push 0x80
push 3
push 0
push 1
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x1c], edi
jne 0x4c5d9f
or eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 2
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x14], ebx
jne 0x4c5dd4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
test esi, esi
mov dword [ebp - 0x20], esi
jne 0x4c5e0c
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 0x30]
push ecx
push edi
call fcn.0041f6b0
add esp, 8
test eax, eax
jge 0x4c5e3d
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x3c]
mov eax, ecx
cdq
cmp edx, dword [ebp - 0x2c]
jb 0x4c5e6f
ja 0x4c5e4f
cmp eax, dword [ebp - 0x30]
jbe 0x4c5e6f
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp word [esi], 0x5a4d
jne 0x4c5f57
mov eax, dword [ecx + esi]
lea ebx, [ecx + esi]
cmp eax, 0x4550
mov dword [ebp - 4], 0
je 0x4c5eb1
mov edx, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
push edi
call esi
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x88]
push esi
push ebx
push eax
call fcn.004c5a60
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xb0]
push 0x7e
push eax
push ecx
call fcn.00421160
add esp, 0x18
lea edx, [ebp - 0x24]
lea eax, [ebp - 0xb0]
mov dword [ebp - 0x24], 0
push edx
push eax
call sub.VERSION.dll_GetFileVersionInfoSizeA
test eax, eax
mov dword [ebp - 0x28], eax
jg 0x4c5f07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x14]
mov dword [ebp + 8], 0xffffffff
jmp 0x4c5f5e
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 8]
push ecx
push edx
push esi
lea eax, [ebp - 0x28]
push ebx
push eax
mov eax, dword [ebp - 0x18]
push 0
push 0
push eax
push eax
mov dword [ebp + 8], 0
call fcn.004c5b20
mov eax, dword [ebp + 8]
add esp, 0x24
neg eax
mov ebx, dword [ebp - 0x14]
sbb eax, eax
neg eax
dec eax
mov dword [ebp + 8], eax
jmp 0x4c5f5e
mov dword [ebp + 8], 0xffffffff
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret