Function at 0x401410
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x40600c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x14], edi
mov ebx, dword [edi + 0xc]
test ebx, ebx
je 0x40163f
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [ebp - 0x10], ecx
push esi
cmp ecx, eax
je 0x40148b
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub eax, ecx
lea ecx, [ebp - 8]
mov dword [ebp - 0xc], eax
push ecx
push 0x40
push eax
push ebx
mov dword [ebp - 8], 0
call esi
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push ebx
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
push ebx
call esi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov ebx, dword [edi + 0xc]
xor esi, esi
mov ecx, 1
mov edx, 0x406e20
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x4014c9
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, 0x20
jae 0x4014b0
push 0
jmp 0x4014b2
push 1
call edi
inc esi
mov ecx, 1
xor eax, eax
mov edx, 0x406e20
lock cmpxchg dword [edx], ecx
test eax, eax
jne 0x4014a7
cmp dword [0x406e24], 0
je 0x401632
mov edx, dword [0x406e68]
xor edi, edi
test edx, edx
je 0x401632
mov esi, dword [0x406e60]
mov eax, esi
nop
cmp ebx, dword [eax]
je 0x401501
inc edi
add eax, 0x2c
cmp edi, edx
jb 0x4014f0
jmp 0x401632
cmp edi, 0xffffffff
je 0x401632
imul ebx, edi, 0x2c
mov dword [ebp - 0x10], ebx
test byte [ebx + esi + 0x14], 2
je 0x401553
push 0
mov edx, edi
lea ecx, [ebp - 0x20]
call fcn.00401fea
add esp, 4
test eax, eax
jne 0x401632
mov ecx, edi
call fcn.004020ab
lea ecx, [ebp - 0x20]
mov esi, eax
call fcn.0040205b
test esi, esi
jne 0x401632
mov edx, dword [0x406e68]
mov esi, dword [0x406e60]
mov eax, dword [ebx + esi + 8]
xor ebx, ebx
mov ecx, dword [0x406e5c]
mov dword [ebp - 0xc], eax
and eax, 0xfffff000
test ecx, ecx
je 0x4015c0
nop dword [eax + eax]
cmp ecx, eax
je 0x40157e
mov ebx, ecx
mov ecx, dword [ecx]
test ecx, ecx
jne 0x401570
jmp 0x4015c0
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 4]
mov dword [edx], eax
mov eax, edx
add dword [ecx + 8], 0xffffffff
mov edx, dword [0x406e68]
mov dword [ecx + 4], eax
jne 0x4015c0
mov eax, dword [ecx]
test ebx, ebx
je 0x4015a1
mov dword [ebx], eax
jmp 0x4015a6
mov dword [0x406e5c], eax
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov edx, dword [0x406e68]
mov esi, dword [0x406e60]
lea ecx, [edx - 1]
cmp edi, ecx
jae 0x4015fa
imul eax, edx, 0x2c
mov edx, dword [ebp - 0x10]
movups xmm0, xmmword [eax + esi - 0x2c]
movups xmmword [edx + esi], xmm0
movups xmm0, xmmword [eax + esi - 0x1c]
movups xmmword [edx + esi + 0x10], xmm0
movq xmm0, qword [eax + esi - 0xc]
movq qword [edx + esi + 0x20], xmm0
mov eax, dword [eax + esi - 4]
mov dword [edx + esi + 0x28], eax
mov esi, dword [0x406e60]
mov eax, dword [0x406e64]
shr eax, 1
mov dword [0x406e68], ecx
cmp eax, 0x20
jb 0x401632
cmp eax, ecx
jb 0x401632
imul eax, eax, 0x2c
push eax
push esi
push 0
push dword [0x406e24]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
test eax, eax
je 0x401632
shr dword [0x406e64], 1
mov dword [0x406e60], eax
xor eax, eax
mov ecx, 0x406e20
xchg dword [ecx], eax
mov edi, dword [ebp - 0x14]
pop esi
mov ecx, dword [ebp - 4]
mov dword [edi + 0xc], 0
xor ecx, ebp
mov dword [edi + 0x10], 0
mov eax, dword [edi]
mov dword [edi + 4], eax
pop edi
pop ebx
call fcn.004021c3
mov esp, ebp
pop ebp
ret