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

Disassembly:
sub esp, 0x428
mov dl, byte [ecx + 0x22]
xor eax, eax
test dl, dl
setne al
push ebx
push esi
mov esi, dword [esp + 0x438]
push edi
mov dword [esp + 0x30], ecx
mov ecx, 0x100
mov dword [esp + 0x24], eax
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
xor edi, edi
xor ebx, ebx
test esi, esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], ebx
jle 0x414979
push ebp
jmp 0x414830
mov ebx, dword [esp + 0x10]
jmp 0x414830
mov edx, dword [esp + 0x43c]
cmp ebx, edx
jge 0x414978
mov eax, esi
sub eax, edi
xor ecx, ecx
test eax, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x30], eax
jle 0x414948
mov eax, edx
sub eax, ebx
add eax, 0xfffffff9
mov dword [esp + 0x2c], eax
mov eax, edi
imul eax, edx
mov dword [esp + 0x1c], eax
jmp 0x414873
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x2c]
jge 0x414948
mov esi, dword [esp + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x1974]
mov ecx, dword [esp + 0x28]
add eax, esi
lea eax, [edx + eax*4]
movzx edi, byte [eax + ecx]
movzx ebx, byte [eax + ecx + 1]
movzx ebp, byte [eax + ecx + 2]
mov edx, dword [esp + 0x20]
add eax, ecx
lea ecx, [eax + 6]
mov eax, 7
add edx, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x20], edx
lea esp, [esp]
movzx esi, byte [ecx - 2]
mov eax, esi
sub eax, edi
cdq
xor eax, edx
sub eax, edx
mov edi, dword [esp + eax*4 + 0x38]
lea eax, [esp + eax*4 + 0x38]
inc edi
mov dword [eax], edi
mov edi, esi
movzx esi, byte [ecx - 1]
mov eax, esi
sub eax, ebx
cdq
xor eax, edx
sub eax, edx
mov ebx, dword [esp + eax*4 + 0x38]
lea eax, [esp + eax*4 + 0x38]
inc ebx
mov dword [eax], ebx
mov ebx, esi
movzx esi, byte [ecx]
mov eax, esi
sub eax, ebp
cdq
xor eax, edx
sub eax, edx
mov ebp, dword [esp + eax*4 + 0x38]
lea eax, [esp + eax*4 + 0x38]
inc ebp
mov dword [eax], ebp
mov eax, dword [esp + 0x24]
add ecx, 4
dec eax
mov ebp, esi
mov dword [esp + 0x24], eax
jne 0x4148c0
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x43c]
mov ecx, dword [esp + 0x30]
add esi, edx
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x440]
mov dword [esp + 0x18], eax
jl 0x41486b
cmp edx, esi
jle 0x41495a
add dword [esp + 0x10], esi
mov dword [esp + 0x14], 0
jmp 0x41496c
mov eax, dword [esp + 0x14]
add eax, edx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov edi, dword [esp + 0x14]
cmp edi, esi
jl 0x41481e
pop ebp
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x1c]
mov eax, esi
imul eax, eax, 0x21
cdq
idiv edi
cmp eax, 0x5f
jge 0x4149ea
xor eax, eax
mov ecx, 1
mov edx, dword [esp + ecx*4 + 0x34]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x4149ea
mov ebx, dword [esp + ecx*4 + 0x30]
shl ebx, 1
cmp edx, ebx
jg 0x4149ea
inc ecx
cmp ecx, 8
jl 0x414995
cmp ecx, 0x100
jge 0x4149d5
nop
mov edx, dword [esp + ecx*4 + 0x34]
imul edx, ecx
imul edx, ecx
add eax, edx
inc ecx
cmp ecx, 0x100
jl 0x4149c0
lea ecx, [edi + edi*2]
pop edi
sub ecx, esi
xor edx, edx
pop esi
div ecx
pop ebx
add esp, 0x428
ret 8
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x428
ret 8