Function at 0x456278
Capabilities:
Get system information on windows
Parse pe header
Read file via mapping

Disassembly:
push 0x40
mov eax, 0x49ff7f
call fcn.00459b52
xor ebx, ebx
mov edi, ebx
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov byte [ebp - 4], 1
mov esi, ebx
mov dword [ebp - 0x10], esi
mov byte [ebp - 4], 2
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
test eax, eax
je 0x4562c9
mov edi, eax
mov dword [ebp - 0x18], edi
cmp eax, 0xffffffff
je 0x4563f2
push ebx
push ebx
push ebx
push 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x4563f2
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x14], ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x48]
push eax
push 0
push 0
push 4
push ebx
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4563f2
mov esi, eax
mov ecx, 0x5a4d
mov dword [ebp - 0x10], esi
cmp word [eax], cx
jne 0x4563b6
mov ebx, dword [eax + 0x3c]
add ebx, eax
push 0xf8
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x4563af
cmp dword [ebx], 0x4550
jne 0x4563af
mov eax, dword [ebx + 0x54]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x20], eax
jae 0x4563b9
mov ebx, esi
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x28]
push 0
push 0
push 4
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x28], eax
cmp ebx, eax
je 0x456388
cmp dword [sym.imp.KERNEL32.dll_UnmapViewOfFile], 0
je 0x456383
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x28]
mov esi, eax
mov dword [ebp - 0x10], esi
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x4563af
mov ebx, dword [esi + 0x3c]
push 0xf8
add ebx, esi
push ebx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x4563af
cmp dword [ebx], 0x4550
je 0x4563b9
mov ebx, 0xc1
jmp 0x4563fa
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4563c7
mov dword [eax], esi
xor esi, esi
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4563d5
mov dword [eax], edi
xor edi, edi
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4563e5
mov ecx, dword [ebp - 0x1c]
and dword [ebp - 0x14], 0
mov dword [eax], ecx
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x4563ee
mov dword [eax], ebx
xor ebx, ebx
jmp 0x4563fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov byte [ebp - 4], 1
test esi, esi
je 0x456416
cmp dword [sym.imp.KERNEL32.dll_UnmapViewOfFile], 0
je 0x456416
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
and dword [ebp - 0x10], 0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x456436
test esi, esi
je 0x456436
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x14], 0
or dword [ebp - 4], 0xffffffff
test edi, edi
je 0x45644d
test esi, esi
je 0x45644d
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x18], 0
mov eax, ebx
call fcn.00459b20
ret