Function at 0x40cace
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov esi, 0x42e014
mov dword [ebp - 0x24], 0x3ada80b6
lea edi, [ebp - 0x2c]
mov dword [ebp - 0x20], 0x5d33e822
xor ecx, ecx
mov dword [ebp - 0x1c], 0xa4ac2e58
mov dword [ebp - 0x18], 0xc71e4fce
mov eax, ecx
movsd dword es:[edi], dword [esi]
mov dword [ebp - 0x14], 0xbbc63db1
mov dword [ebp - 0x10], 0xc6fc51da
mov dword [ebp - 4], ecx
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov byte [ebp + eax - 0x148], al
inc eax
cmp eax, 0x100
jb 0x40cb16
mov esi, dword [0x4354dc]
mov edi, ecx
xor edx, edx
mov dword [ebp - 0xc], 6
mov eax, edi
mov cl, byte [ebp + edi - 0x148]
div dword [ebp - 0xc]
mov byte [ebp - 5], cl
and esi, 0xc91a6d3c
movzx ecx, cl
movzx eax, byte [ebp + edx - 0x2c]
add eax, dword [ebp - 4]
add ecx, eax
movzx ecx, cl
mov dword [ebp - 4], ecx
mov al, byte [ebp + ecx - 0x148]
mov byte [ebp + edi - 0x148], al
inc edi
mov al, byte [ebp - 5]
mov byte [ebp + ecx - 0x148], al
cmp edi, 0x100
jb 0x40cb2d
xor ecx, ecx
mov dword [ebp - 0xc], ecx
mov eax, ecx
mov edi, ecx
add esi, 0xab62b4a9
inc eax
movzx eax, al
mov dword [ebp - 4], eax
mov dword [ebp - 0x2c], esi
mov dword [0x4354dc], esi
mov cl, byte [ebp + eax - 0x148]
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 4]
movzx edx, cl
add eax, edx
movzx eax, al
mov dword [ebp - 0xc], eax
mov al, byte [ebp + eax - 0x148]
mov byte [ebp + esi - 0x148], al
mov eax, dword [ebp - 0xc]
mov byte [ebp + eax - 0x148], cl
mov eax, esi
mov esi, dword [ebp - 0x2c]
movzx eax, byte [ebp + eax - 0x148]
add eax, edx
movzx eax, al
mov al, byte [ebp + eax - 0x148]
xor al, byte [ebp + edi - 0x24]
mov byte [ebp + edi - 0x48], al
inc edi
mov eax, dword [ebp - 4]
cmp edi, 0x18
jb 0x40cb88
xor eax, eax
xor ecx, ecx
inc ecx
mov byte [ebp - 0x30], al
mov edi, eax
mov dword [ebp - 4], eax
cmp dword [ebp + 8], eax
jne 0x40cc13
mov dword [ebp - 4], 0xe8
jmp 0x40cc1f
cmp dword [ebp + 8], ecx
jne 0x40cc22
mov dword [ebp - 4], 0xba
push 5
pop edi
and esi, 0xd9b0b78b
lea edx, [ebp - 0x48]
mov dword [0x4354dc], esi
call fcn.0040a2e6
call eax
add eax, dword [0x4343a0]
mov esi, dword [ebp - 4]
mov dword [ebp + 8], eax
mov edx, dword [0x4343a0]
lea eax, [ebp + 8]
push eax
call fcn.0040cab0
pop ecx
mov eax, dword [eax*8 + 0x4343a8]
add eax, edi
add eax, dword [0x435c44]
mov dword [ebp - 0x2c], eax
movzx eax, byte [eax]
cmp eax, esi
jne 0x40cc44
push 5
pop ecx
mov esi, str.SrchPHSts
lea edi, [ebp - 0x20]
rep movsd dword es:[edi], dword [esi]
xor eax, eax
push 0x63
pop ecx
mov edx, eax
mov dword [ebp + 8], edx
cmp cx, word [ebp - 0x20]
jne 0x40ccb5
xor esi, esi
test cx, cx
je 0x40ccb5
cmp word [ebp + eax - 0x20], si
je 0x40ccb5
call fcn.0040c6c9
mov edx, dword [ebp + 8]
inc edx
mov dword [ebp + 8], edx
lea eax, [edx + edx]
movzx ecx, word [eax + 0x42f390]
cmp cx, word [ebp + eax - 0x20]
je 0x40cc8c
movzx eax, byte [ebp + edx*2 - 0x20]
movzx ecx, byte [edx*2 + 0x42f390]
sub ecx, eax
mov eax, dword [0x4354dc]
pop edi
pop esi
cmp ecx, 0x1390
jae 0x40ccda
add eax, 0x12150ace
jmp 0x40ccdf
add eax, 0x525a70bc
mov dword [0x4354dc], eax
mov eax, dword [ebp - 0x2c]
leave
ret