Function at 0x40bcd0
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 0x40bf1b
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 0x40bf1b
mov edx, dword [ebp - 0x20]
mov eax, 0x5a4d
mov dword [ebp - 0x14], edx
cmp word [ebx], ax
jne 0x40bf1b
mov ecx, dword [ebx + 0x3c]
lea eax, [ecx + 0xf8]
cmp eax, edx
jae 0x40bf1b
add ecx, ebx
mov dword [ebp - 8], ecx
cmp dword [ecx], 0x4550
jne 0x40bf1b
movzx eax, word [ecx + 4]
push esi
mov esi, 0x14c
push edi
cmp si, ax
jne 0x40bd56
xor edi, edi
jmp 0x40bd73
mov esi, 0x200
cmp si, ax
je 0x40bd6e
mov esi, 0x8664
cmp si, ax
jne 0x40bf19
mov edi, 1
mov esi, dword [ecx + 0x28]
add esi, ebx
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], esi
je 0x40bf19
cmp esi, ebx
jbe 0x40bf19
lea eax, [edx + ebx]
mov dword [ebp - 0x10], eax
cmp esi, eax
jae 0x40bf19
mov ecx, esi
call fcn.0040c510
test eax, eax
je 0x40bf19
lea eax, [edi + 0xc]
shl eax, 4
add eax, dword [ebp - 8]
mov ecx, dword [eax]
test ecx, ecx
je 0x40beb8
cmp dword [eax + 4], 0
je 0x40beb8
cmp ecx, dword [ebp - 0x14]
jae 0x40beb8
test edi, edi
jne 0x40bdd9
mov edi, dword [ecx + ebx + 0xc]
jmp 0x40bddd
mov edi, dword [ecx + ebx + 0x18]
test edi, edi
je 0x40beb5
cmp edi, ebx
jbe 0x40beb5
mov eax, dword [ebp - 0x10]
cmp edi, eax
jae 0x40beb5
mov esi, dword [edi]
test esi, esi
je 0x40bea1
cmp esi, ebx
jbe 0x40bea1
cmp esi, eax
jae 0x40bea1
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 0x40bea1
test dword [ebp - 0x30], 0x1000
je 0x40bea1
test dword [ebp - 0x28], 0x1000000
je 0x40bea1
test byte [ebp - 0x2c], 0xf0
je 0x40bea1
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 0x40be6f
mov byte [esi], 0xc3
jmp 0x40be80
mov ax, word [0x4b58ec]
mov word [esi], ax
mov al, byte [0x4b58ee]
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 0x40be02
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 0x40bf19
test edi, edi
jne 0x40bee7
mov eax, dword [0x4b58e0]
mov dword [esi], eax
mov al, byte [0x4b58e4]
mov byte [esi + 4], al
jmp 0x40bef8
mov ax, word [0x4b58e8]
mov word [esi], ax
mov al, byte [0x4b58ea]
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