Function at 0x406050
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x46d190]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm1, xmmword [ebp + 8]
push ebx
movups xmm0, xmmword [ebp + 0x18]
push esi
psrldq xmm1, 0xc
mov eax, ecx
mov ecx, dword [ebp + 0x28]
movd esi, xmm1
push edi
mov edi, edx
mov dword [ebp - 0x10], eax
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], esi
push dword [esi + 0x54]
push eax
push edi
call fcn.00429560
xor eax, eax
add esp, 0xc
xor ebx, ebx
cmp ax, word [esi + 6]
jae 0x4060cb
mov esi, dword [ebp - 0x1c]
add esi, 0x14
push dword [esi - 4]
mov eax, dword [esi]
add eax, dword [ebp - 0x10]
push eax
mov eax, dword [esi - 8]
add eax, edi
push eax
call fcn.00429560
mov eax, dword [ebp - 0xc]
lea esi, [esi + 0x28]
inc ebx
add esp, 0xc
movzx eax, word [eax + 6]
cmp ebx, eax
jl 0x4060a5
mov edx, dword [ebp - 0x30]
xor ecx, ecx
mov dword [ebp - 0x10], ecx
cmp dword [edx + 4], ecx
jbe 0x40617e
nop dword [eax]
mov eax, dword [edx]
add eax, edi
mov ebx, dword [eax + ecx]
lea esi, [eax + ecx]
test ebx, ebx
jne 0x4060f7
cmp dword [esi + 0x10], ebx
je 0x40617e
mov eax, dword [eax + ecx + 0xc]
mov ecx, dword [esi + 0x10]
add eax, edi
push eax
mov dword [ebp - 0x14], ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edx, eax
mov dword [ebp - 8], edx
test edx, edx
je case.0x4061c9.4
test ebx, ebx
jne 0x40611e
mov ebx, dword [esi + 0x10]
mov ecx, dword [ebp - 0x14]
lea eax, [edi + ebx]
add ecx, edi
mov dword [ebp - 0x18], ecx
cmp dword [ecx], 0
je 0x406169
sub ebx, dword [ebp - 0x14]
mov esi, ecx
mov eax, dword [eax]
test eax, eax
jns 0x40613e
movzx eax, ax
jmp 0x406143
add eax, 2
add eax, edi
push eax
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je case.0x4061c9.4
mov ecx, dword [ebp - 0x18]
add esi, 4
mov edx, dword [ebp - 8]
mov dword [ebp - 0x18], esi
mov dword [ecx], eax
lea eax, [ebx + esi]
cmp dword [esi], 0
jne 0x406133
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x30]
add ecx, 0x14
mov dword [ebp - 0x10], ecx
cmp ecx, dword [edx + 4]
jb 0x4060e0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x34]
cmp edi, ecx
je 0x40620e
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
test eax, eax
je case.0x4061c9.4
mov ebx, edi
lea esi, [eax + edi]
sub ebx, ecx
cmp dword [esi], 0
je 0x40620e
mov eax, dword [esi + 4]
lea edx, [esi + 8]
add eax, esi
cmp edx, eax
je 0x406207
movzx eax, word [edx]
mov ecx, eax
shr ecx, 0xc
cmp ecx, 0xa
ja case.0x4061c9.4
movzx ecx, byte [ecx + 0x406328]
jmp dword [ecx*4 + 0x406314]
and eax, 0xfff
add eax, dword [esi]
add dword [eax + edi], ebx
jmp case.0x4061c9.0
and eax, 0xfff
add eax, dword [esi]
lea ecx, [eax + edi]
mov eax, ebx
shr eax, 0x10
add word [ecx], ax
jmp case.0x4061c9.0
and eax, 0xfff
add eax, dword [esi]
add word [eax + edi], bx
mov eax, dword [esi + 4]
add edx, 2
add eax, esi
cmp edx, eax
jne 0x4061b1
cmp dword [edx], 0
mov esi, edx
jne 0x4061a5
mov ecx, dword [ebp - 0xc]
xor eax, eax
xor ebx, ebx
cmp ax, word [ecx + 6]
jae 0x4062c2
mov esi, dword [ebp - 0x1c]
add esi, 0x10
mov ecx, dword [esi + 0x14]
mov eax, 2
mov edx, ecx
sar edx, 0x1f
and edx, 8
test ecx, 0x40000000
cmovne edx, eax
mov eax, ecx
and eax, 0xc0000000
cmp eax, 0xc0000000
mov eax, 4
cmove edx, eax
test ecx, 0x20000000
mov eax, 0x10
cmovne edx, eax
mov eax, ecx
and eax, 0xa0000000
cmp eax, 0xa0000000
mov eax, 0x80
cmove edx, eax
mov eax, ecx
and eax, 0x60000000
cmp eax, 0x60000000
mov eax, 0x20
cmove edx, eax
and ecx, 0xe0000000
cmp ecx, 0xe0000000
mov eax, 0x40
cmove edx, eax
lea eax, [ebp - 8]
push eax
mov eax, dword [esi - 4]
push edx
push dword [esi]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [ebp - 0xc]
lea esi, [esi + 0x28]
inc ebx
movzx eax, word [eax + 6]
cmp ebx, eax
jb 0x406225
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 4], 0
je 0x4062e8
mov eax, dword [eax]
mov esi, dword [eax + edi + 0xc]
mov eax, dword [esi]
test eax, eax
je 0x4062e8
push 0
push 1
push edi
call eax
mov eax, dword [esi + 4]
lea esi, [esi + 4]
test eax, eax
jne 0x4062d7
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
add eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00427c87
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00427c87
mov esp, ebp
pop ebp
ret