Function at 0x40e1f0
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
mov ebx, ecx
mov dword [ebp - 0x1c], 0
xorps xmm0, xmm0
movq qword [ebp - 0x24], xmm0
test ebx, ebx
je 0x40e489
push 0xc
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.PSAPI.DLL_GetModuleInformation]
test eax, eax
je 0x40e489
mov edx, dword [ebp - 0x20]
mov eax, 0x5a4d
mov dword [ebp - 0x14], edx
cmp word [ebx], ax
jne 0x40e489
mov ecx, dword [ebx + 0x3c]
lea eax, [ecx + 0xf8]
cmp eax, edx
jae 0x40e489
add ecx, ebx
mov dword [ebp - 8], ecx
cmp dword [ecx], 0x4550
jne 0x40e489
movzx eax, word [ecx + 4]
push esi
mov esi, 0x14c
push edi
cmp si, ax
jne 0x40e276
xor edi, edi
jmp 0x40e293
mov esi, 0x200
cmp si, ax
je 0x40e28e
mov esi, 0x8664
cmp si, ax
jne 0x40e487
mov edi, 1
mov esi, dword [ecx + 0x28]
add esi, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], esi
je 0x40e487
cmp esi, ebx
jbe 0x40e487
lea eax, [edx + ebx]
mov dword [ebp - 0x10], eax
cmp esi, eax
jae 0x40e487
push 0x1c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x40], xmm0
movq qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e487
test dword [ebp - 0x30], 0x1000
je 0x40e487
test dword [ebp - 0x28], 0x1000000
je 0x40e487
xor eax, eax
test byte [ebp - 0x2c], 0xf0
je 0x40e309
mov eax, 1
test eax, eax
je 0x40e487
lea eax, [edi + 0xc]
shl eax, 4
add eax, dword [ebp - 8]
mov ecx, dword [eax]
test ecx, ecx
je 0x40e426
cmp dword [eax + 4], 0
je 0x40e426
cmp ecx, dword [ebp - 0x14]
jae 0x40e426
test edi, edi
jne 0x40e341
mov edi, dword [ecx + ebx + 0xc]
jmp 0x40e345
mov edi, dword [ecx + ebx + 0x18]
test edi, edi
je 0x40e423
cmp edi, ebx
jbe 0x40e423
mov eax, dword [ebp - 0x10]
cmp edi, eax
jae 0x40e423
mov esi, dword [edi]
test esi, esi
je 0x40e40f
nop word [eax + eax]
cmp esi, ebx
jbe 0x40e40f
cmp esi, eax
jae 0x40e40f
push 0x1c
lea eax, [ebp - 0x40]
mov dword [ebp - 0x28], 0
xorps xmm0, xmm0
push eax
push esi
movups xmmword [ebp - 0x40], xmm0
movq qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40e40f
test dword [ebp - 0x30], 0x1000
je 0x40e40f
test dword [ebp - 0x28], 0x1000000
je 0x40e40f
test byte [ebp - 0x2c], 0xf0
je 0x40e40f
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
push 0x40
push 0x64
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [ebp - 4], 0
je 0x40e3dd
mov byte [esi], 0xc3
jmp 0x40e3ee
mov ax, word [0x420038]
mov word [esi], ax
mov al, byte [0x42003a]
mov byte [esi + 2], al
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push 0x64
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [edi + 4]
add edi, 4
mov eax, dword [ebp - 0x10]
test esi, esi
jne 0x40e370
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [ebp - 0x18]
mov edi, dword [ebp - 4]
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x40
push 0x14
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40e487
test edi, edi
jne 0x40e455
mov eax, dword [0x42002c]
mov dword [esi], eax
mov al, byte [0x420030]
mov byte [esi + 4], al
jmp 0x40e466
mov ax, word [0x420034]
mov word [esi], ax
mov al, byte [0x420036]
mov byte [esi + 2], al
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push 0x14
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret