Function at 0x4d8e4c
Capabilities:
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 0xc], eax
xor edx, edx
push ebp
push 0x4d906b
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp + 8]
mov edi, eax
cmp word [edi], 0x5a4d
je 0x4d8e90
push 0xc1
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
mov ebx, dword [edi + 0x3c]
add ebx, eax
cmp dword [ebx], 0x4550
je 0x4d8eb4
push 0xc1
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
cmp word [ebx + 4], 0x14c
je 0x4d8ed3
push 0xc1
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
test byte [ebx + 0x38], 1
je 0x4d8ef0
push 0xc1
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
push 4
push 0x3000
mov eax, dword [ebx + 0x50]
push eax
mov eax, dword [ebx + 0x34]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
test esi, esi
jne 0x4d8f36
push 4
push 0x3000
mov eax, dword [ebx + 0x50]
push eax
push 0
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
test esi, esi
jne 0x4d8f36
push 0xe
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
push 0x18
push 8
call sub.kernel32.dll_GetProcessHeap
push eax
call sub.kernel32.dll_HeapAlloc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4d8f6f
push 0x8000
push 0
push esi
call sub.kernel32.dll_VirtualFree_1
push 0xe
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
mov eax, dword [ebp - 0xc]
mov dword [eax + 4], esi
lea eax, [ebp - 0x30]
push eax
call sub.kernel32.dll_GetNativeSystemInfo
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x2c]
mov dword [eax + 0x14], edx
push 4
push 0x1000
mov eax, dword [ebx + 0x54]
push eax
push esi
call sub.kernel32.dll_VirtualAlloc_1
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x54]
mov edx, dword [ebp - 8]
mov ecx, edi
xchg ecx, eax
call fcn.00406ff8
mov eax, dword [edi + 0x3c]
add eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
mov ecx, dword [ebp - 0xc]
mov edx, ebx
mov eax, dword [ebp + 8]
call fcn.004d8860
test al, al
jne 0x4d8fca
call fcn.004d8818
mov edi, esi
mov eax, edi
sub eax, dword [ebx + 0x34]
mov ebx, eax
test ebx, ebx
je 0x4d8fe9
mov edx, ebx
mov eax, dword [ebp - 0xc]
call fcn.004d8bcc
mov edx, dword [ebp - 0xc]
mov byte [edx + 0x11], al
jmp 0x4d8ff0
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x11], 1
mov eax, dword [ebp - 0xc]
push eax
call fcn.004d8cac
test al, al
jne 0x4d9002
call fcn.004d8818
mov eax, dword [ebp - 0xc]
call fcn.004d8a0c
test al, al
jne 0x4d9013
call fcn.004d8818
mov eax, dword [ebp - 0xc]
call fcn.004d8b64
test al, al
jne 0x4d9024
call fcn.004d8818
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x4d905b
add eax, esi
mov ebx, eax
push 0
push 1
push edi
call ebx
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x4d9054
push 0x45a
call sub.kernel32.dll_SetLastError
call fcn.004d8818
mov eax, dword [ebp - 0xc]
mov byte [eax + 0x10], 1
mov eax, dword [ebp - 0xc]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4d9085
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4