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

Disassembly:
sub esp, 0x450
mov edx, ecx
push ebx
push ebp
xor ebp, ebp
mov cl, byte [edx + 0x22]
mov bl, byte [edx + 0x12]
xor eax, eax
push esi
test cl, cl
sete al
xor ecx, ecx
push edi
test bl, bl
sete cl
cmp ecx, eax
lea edi, [esp + 0x60]
setne byte [esp + 0x13]
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x24]
mov cx, word [edx + 0x26]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], ecx
xor eax, eax
xor ecx, ecx
mov ax, word [edx + 0x28]
mov cl, byte [edx + 0x2a]
mov dword [esp + 0x50], eax
mov dword [esp + 0x3c], ecx
xor eax, eax
xor ecx, ecx
mov al, byte [edx + 0x2b]
mov cl, byte [edx + 0x2c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov ecx, 0x100
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x468]
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x30], edx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebp
jle 0x41f525
jmp 0x41f376
mov ebp, dword [esp + 0x14]
mov esi, dword [esp + 0x464]
cmp ebp, esi
jge 0x41f525
mov eax, edi
xor ecx, ecx
sub eax, ebx
mov dword [esp + 0x24], ecx
test eax, eax
mov dword [esp + 0x38], eax
jle 0x41f4ef
mov eax, esi
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x34], eax
mov eax, ebx
imul eax, esi
mov dword [esp + 0x20], eax
jmp 0x41f3b9
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x34]
jge 0x41f4ef
mov edx, dword [edx + 0x197c]
add eax, ecx
mov ecx, dword [esp + 0x14]
lea edi, [eax + ecx]
mov cl, byte [esp + 0x13]
test cl, cl
mov ax, word [edx + edi*2]
je 0x41f3f3
mov ecx, eax
xor ebx, ebx
shl ecx, 8
mov bl, ah
xor bl, cl
and ebx, 0xff
xor ebx, ecx
mov eax, ebx
mov esi, eax
and esi, 0xffff
xor eax, eax
mov cl, byte [esp + eax + 0x3c]
mov ebp, dword [esp + eax + 0x48]
mov ebx, esi
add eax, 4
shr ebx, cl
and ebx, ebp
cmp eax, 0xc
mov dword [esp + eax + 0x50], ebx
jl 0x41f3fd
mov ecx, dword [esp + 0x28]
mov eax, 7
lea edx, [edx + edi*2 + 2]
add ecx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x1c]
mov bx, word [eax]
mov al, byte [esp + 0x13]
test al, al
je 0x41f456
mov eax, ebx
xor ecx, ecx
shl eax, 8
mov cl, bh
xor cl, al
and ecx, 0xff
xor ecx, eax
mov ebx, ecx
xor ebp, ebp
and ebx, 0xffff
xor edi, edi
mov cl, byte [esp + edi + 0x3c]
mov eax, dword [esp + edi + 0x48]
mov esi, ebx
mov edx, dword [esp + edi + 0x54]
shr esi, cl
add edi, 4
and esi, eax
mov eax, esi
mov dword [esp + edi + 0x50], esi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add ebp, eax
cmp edi, 0xc
jl 0x41f460
cmp ebp, 0xff
jle 0x41f496
mov ebp, 0xff
mov edx, dword [esp + ebp*4 + 0x60]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
lea ebp, [esp + ebp*4 + 0x60]
inc edx
add ecx, 2
dec eax
mov dword [ebp], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], eax
jne 0x41f432
mov edx, dword [esp + 0x464]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x468]
add esi, edx
inc eax
mov dword [esp + 0x20], esi
mov esi, edx
mov edx, dword [esp + 0x30]
cmp eax, ecx
mov dword [esp + 0x24], eax
jl 0x41f3b1
cmp esi, edi
jle 0x41f507
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], 0
add eax, edi
mov dword [esp + 0x14], eax
jmp 0x41f519
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], 0
add eax, esi
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x41f372
mov esi, dword [esp + 0x60]
mov eax, dword [esp + 0x64]
add eax, esi
mov edi, dword [esp + 0x28]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 2
cdq
idiv edi
cmp eax, 0x5a
jl 0x41f553
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8
xor eax, eax
mov ecx, 1
mov edx, dword [esp + ecx*4 + 0x60]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x41f544
mov ebx, dword [esp + ecx*4 + 0x5c]
add ebx, ebx
cmp edx, ebx
jg 0x41f544
inc ecx
cmp ecx, 8
jl 0x41f55a
cmp ecx, 0x100
jge 0x41f599
mov edx, dword [esp + ecx*4 + 0x60]
imul edx, ecx
imul edx, ecx
add eax, edx
inc ecx
cmp ecx, 0x100
jl 0x41f584
sub edi, esi
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 8