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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x444d78
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4574b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp + 0x14]
lea edx, [ebp - 0x34]
mov dword [ebp - 4], 0
call fcn.0040a010
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
jne 0x40cf91
mov ebx, dword [ebp + 0xc]
xor edi, edi
cmp byte [ebp + 0x20], 0
jne 0x40cdab
mov eax, dword [ebx]
test eax, eax
cmovne edi, eax
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40cda9
push 0x40
push 0x3000
push 0x1000
push 0
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebx], eax
cmp dword [ebx], 0
jne 0x40ce39
sub esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp + 0x1c]
call fcn.004035d0
add esp, 0xc
push eax
mov edx, 0x45a8cc
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x20]
call fcn.0040dd70
add esp, 4
push 0x30
push dword [0x45a890]
push dword [eax]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov edx, dword [ebp + 0x20]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x40ce10
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
mov edx, dword [ebp + 0x1c]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x40cfa4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor bl, bl
jmp 0x40cffe
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.0040a010
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x30]
push ecx
mov ecx, dword [ebx]
add ecx, dword [ebp - 0x28]
push eax
push 5
lea edx, [edx + esi]
call fcn.0040a610
mov edx, dword [ebx]
lea eax, [ebp - 0x24]
add esp, 8
mov ecx, esi
push eax
push dword [ebp - 0x30]
call fcn.0040a610
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x2c]
add esp, 0xc
add eax, 0x2c
mov dword [ebp + 8], eax
push ecx
push dword [ebx]
mov ecx, eax
call fcn.00410c10
mov ecx, dword [ebx]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
mov byte [ebp + 0x23], al
lea eax, [ebp - 0x1c]
push eax
push ecx
mov ecx, dword [ebp + 8]
call fcn.00410c10
and byte [ebp + 0x23], al
lea eax, [ebp - 0x24]
push eax
push esi
mov esi, dword [ebp + 8]
mov ecx, esi
call fcn.00410c10
mov cl, byte [ebp + 0x23]
and cl, al
mov byte [ebp + 0x23], cl
test edi, edi
je 0x40cf07
mov eax, dword [esi]
test eax, eax
je 0x40cf07
push 0x8000
push 0
push edi
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov cl, byte [ebp + 0x23]
mov eax, dword [ebp - 0x1c]
test cl, cl
jne 0x40cf52
test eax, eax
je 0x40cf21
cmp dword [ebp - 0x18], 0
jle 0x40cf21
push eax
call fcn.0042bcc4
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40cf37
cmp dword [ebp - 0x20], 0
jle 0x40cf37
push eax
call fcn.0042bcc4
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40cfa4
test ebx, ebx
jle 0x40cfa4
push eax
call fcn.0042bcc4
add esp, 4
xor bl, bl
jmp 0x40cffe
test eax, eax
je 0x40cf65
cmp dword [ebp - 0x18], 0
jle 0x40cf65
push eax
call fcn.0042bcc4
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40cf7b
cmp dword [ebp - 0x20], 0
jle 0x40cf7b
push eax
call fcn.0042bcc4
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40cfca
test ebx, ebx
jle 0x40cfca
push eax
call fcn.0042bcc4
add esp, 4
jmp 0x40cfca
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea ecx, [esi + 0x2c]
call fcn.00410c10
test al, al
jne 0x40cfa8
xor bl, bl
jmp 0x40cffe
mov eax, dword [esi + 0x2c]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x40cfc4
push 0x8000
push 0
push dword [esi]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [esi], 0
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
sete bl
cmp byte [ebp + 0x1c], 0
mov byte [eax], bl
je 0x40cffc
push 0x40005
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
xor eax, eax
test bl, bl
setne al
add eax, 0x95
push eax
call dword [sym.imp.WINMM.dll_PlaySoundW]
mov bl, 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40d015
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jle 0x40d015
push eax
call fcn.0042bcc4
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c