Function at 0x418e40
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject pe
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c0
mov eax, dword [0x4af480]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, ecx
mov dword [ebp - 0x5b8], edx
push edi
xor esi, esi
mov dword [ebp - 0x5a8], eax
mov dword [ebp - 0x5b4], 0
mov edi, 0x2bc
mov dword [ebp - 0x5c0], esi
call fcn.00418da0
cmp eax, 0x40
jne 0x418ecb
mov edi, 0x2bd
mov dword [ebp + 0xc], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ecx, eax
call fcn.00418da0
cmp eax, 0x40
je 0x418ecb
push 0x10
push 0x4a6574
push str.You_must_run_64_bit_version_of_MPQEditor_to_do_this.
push dword [0x4b4e44]
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
mov eax, 0x3eb
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0047d33b
mov esp, ebp
pop ebp
ret
push ebx
lea eax, [ebp - 0x5a4]
mov edx, edi
push eax
push str.RT_BINARY
call fcn.004189f0
mov ebx, eax
lea eax, [ebp - 0x5a0]
push eax
mov eax, dword [ebp + 0xc]
push str.RT_BINARY
movzx edx, ax
call fcn.004189f0
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
add esp, 0x10
mov dword [ebp - 0x5b0], eax
test ebx, ebx
je 0x4191e8
test eax, eax
je 0x4191e8
mov eax, dword [ebp - 0x5a4]
mov edi, dword [ebp - 0x5a0]
add eax, 0xff
add edi, 0xfff
and eax, 0xffffff00
and edi, 0xfffff000
mov dword [ebp - 0x5bc], eax
add edi, eax
push edi
push 8
push dword [0x4b3a28]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 0x5ac], eax
test eax, eax
je 0x4191d5
push dword [ebp - 0x5a4]
push ebx
push eax
call fcn.0047efe0
push dword [ebp - 0x5a0]
mov eax, dword [ebp - 0x5bc]
push dword [ebp - 0x5b0]
add eax, dword [ebp - 0x5ac]
push eax
call fcn.0047efe0
add esp, 0x18
push 0x40
push 0x1000
push edi
push 0
push dword [ebp - 0x5a8]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebp - 0x5a0], eax
test eax, eax
je 0x4191ab
lea ecx, [ebp - 0x5b4]
push ecx
push edi
push dword [ebp - 0x5ac]
push eax
push dword [ebp - 0x5a8]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
cmp dword [ebp - 0x5b4], edi
jne 0x4191a4
mov ecx, dword [ebp - 0x5a4]
mov eax, ebx
mov edi, dword [ebp - 0x5b8]
add ecx, ebx
test edi, edi
jne 0x419086
cmp ebx, ecx
jae 0x41900b
cmp dword [eax], 0x64726854
jne 0x419004
cmp dword [eax + 4], 0x636f7250
je 0x41901d
add eax, 8
cmp eax, ecx
jb 0x418ff3
push 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x7f
jmp 0x4191b3
mov ecx, dword [ebp - 0x5a0]
sub eax, ebx
add ecx, 8
add eax, ecx
je 0x419013
lea ecx, [ebp - 0x5c0]
push ecx
push 0
push 0
push eax
push 0
push 0
push dword [ebp - 0x5a8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov edi, eax
test edi, edi
je 0x419060
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x419068
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0x8000
push 0
push dword [ebp - 0x5a0]
push dword [ebp - 0x5a8]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x4191b3
cmp ebx, ecx
jae 0x41900b
nop word [eax + eax]
cmp dword [eax], 0x6e69614d
jne 0x4190a1
cmp dword [eax + 4], 0x636f7250
je 0x4190ba
add eax, 8
cmp eax, ecx
jb 0x419090
push 0x7f
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, 0x7f
jmp 0x4191b3
mov esi, dword [ebp - 0x5a0]
sub eax, ebx
add esi, 8
add esi, eax
je 0x419013
push 0
lea eax, [ebp - 0x5a4]
mov dword [ebp - 0x5a0], 0
push eax
push str.Wow64SetThreadContext
lea eax, [ebp - 0x5a0]
mov dword [ebp - 0x5a4], 0
push eax
push str.Wow64GetThreadContext
push str.kernel32.dll
call fcn.00478970
add esp, 0x18
push dword [ebp - 0x5a8]
call fcn.00478890
test al, al
je 0x419165
push 0x2c8
lea eax, [ebp - 0x2cc]
mov dword [ebp - 0x2d0], 0x10007
push 0
push eax
call fcn.0047ee80
add esp, 0xc
lea eax, [ebp - 0x2d0]
push eax
push edi
call dword [ebp - 0x5a0]
test eax, eax
je 0x4191ab
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x220], esi
push eax
push edi
call dword [ebp - 0x5a4]
test eax, eax
je 0x4191ab
xor esi, esi
jmp 0x4191b3
lea eax, [ebp - 0x59c]
mov dword [ebp - 0x59c], 0x1003f
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x41919d
lea eax, [ebp - 0x59c]
mov dword [ebp - 0x4ec], esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x41919d
xor esi, esi
jmp 0x4191b3
mov esi, 0x78
jmp 0x4191b3
mov esi, 0x1d
jmp 0x4191b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push dword [ebp - 0x5ac]
push 0
push dword [0x4b3a28]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x5b0]
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4191f1
mov eax, dword [ebp - 0x5b0]
mov esi, 8
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4191f1
mov esi, 0x138f
test eax, eax
je 0x419202
push eax
push 0
push dword [0x4b3a28]
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x419211
push ebx
push 0
push dword [0x4b3a28]
call ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.0047d33b
mov esp, ebp
pop ebp
ret