Function at 0x414cf0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x450
mov edx, ecx
mov cl, byte [edx + 0x22]
xor eax, eax
push ebx
mov bl, byte [edx + 0x12]
push ebp
xor ebp, ebp
test cl, cl
sete al
xor ecx, ecx
test bl, bl
sete cl
push esi
push edi
lea edi, [esp + 0x60]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x14], ebp
cmp ecx, eax
movzx eax, word [edx + 0x24]
movzx ecx, word [edx + 0x26]
mov dword [esp + 0x44], ecx
movzx ecx, byte [edx + 0x2a]
mov dword [esp + 0x40], eax
movzx eax, word [edx + 0x28]
mov dword [esp + 0x30], ecx
movzx ecx, byte [edx + 0x2c]
mov dword [esp + 0x48], eax
movzx eax, byte [edx + 0x2b]
setne byte [esp + 0x13]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
xor eax, eax
mov ecx, 0x100
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x468]
xor ebx, ebx
cmp edi, ebp
mov dword [esp + 0x18], ebx
jle 0x414f7b
jmp 0x414d80
mov ebp, dword [esp + 0x14]
lea ecx, [ecx]
mov esi, dword [esp + 0x464]
cmp ebp, esi
jge 0x414f7b
mov eax, edi
sub eax, ebx
xor ecx, ecx
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x4c], eax
jle 0x414f4b
mov eax, esi
sub eax, ebp
add eax, 0xfffffff9
mov dword [esp + 0x5c], eax
mov eax, ebx
imul eax, esi
mov dword [esp + 0x20], eax
jmp 0x414dc3
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
cmp ecx, dword [esp + 0x5c]
jge 0x414f4b
mov esi, dword [esp + 0x14]
add eax, ecx
mov ecx, dword [edx + 0x1974]
add eax, esi
lea esi, [ecx + eax*4]
mov cl, byte [esp + 0x13]
test cl, cl
mov eax, dword [esi]
je 0x414e0d
mov edx, eax
mov ecx, eax
shr ecx, 0x10
and edx, 0xff0000
or edx, ecx
mov ecx, eax
shl ecx, 0x10
and eax, 0xff00
or ecx, eax
shr edx, 8
shl ecx, 8
or edx, ecx
mov eax, edx
mov ecx, dword [esp + 0x30]
mov ebp, dword [esp + 0x40]
mov ebx, eax
shr ebx, cl
mov ecx, dword [esp + 0x34]
mov edx, eax
shr edx, cl
mov ecx, dword [esp + 0x38]
and ebx, ebp
mov ebp, dword [esp + 0x44]
shr eax, cl
mov ecx, dword [esp + 0x28]
and edx, ebp
mov dword [esp + 0x54], edx
and eax, dword [esp + 0x48]
mov dword [esp + 0x58], eax
mov eax, 7
add esi, 4
add ecx, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], ecx
mov al, byte [esp + 0x13]
test al, al
mov edx, dword [esp + 0x1c]
mov edi, dword [edx]
je 0x414e88
mov eax, edi
mov ecx, edi
mov edx, edi
and eax, 0xff0000
shl edx, 0x10
and edi, 0xff00
shr ecx, 0x10
or edx, edi
or eax, ecx
shr eax, 8
shl edx, 8
or eax, edx
mov edi, eax
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x40]
mov ebp, edi
shr ebp, cl
mov ecx, dword [esp + 0x34]
and ebp, edx
mov eax, ebp
sub eax, ebx
cdq
mov esi, eax
mov eax, dword [esp + 0x44]
mov ebx, ebp
xor esi, edx
mov ebp, edi
shr ebp, cl
mov ecx, dword [esp + 0x38]
sub esi, edx
mov edx, dword [esp + 0x54]
and ebp, eax
mov eax, ebp
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x58]
shr edi, cl
add esi, eax
mov dword [esp + 0x54], ebp
and edi, dword [esp + 0x48]
mov eax, edi
sub eax, edx
cdq
xor eax, edx
sub eax, edx
add esi, eax
cmp esi, 0xff
mov dword [esp + 0x58], edi
jle 0x414eee
mov esi, 0xff
mov edx, dword [esp + esi*4 + 0x60]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
lea esi, [esp + esi*4 + 0x60]
inc edx
add ecx, 4
dec eax
mov dword [esi], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x2c], eax
jne 0x414e55
mov ecx, dword [esp + 0x464]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x464]
mov edi, dword [esp + 0x468]
add edx, ecx
mov ecx, dword [esp + 0x4c]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
jl 0x414dbb
cmp esi, edi
jle 0x414f5d
add dword [esp + 0x14], edi
mov dword [esp + 0x18], 0
jmp 0x414f6f
mov eax, dword [esp + 0x18]
add eax, esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x18]
cmp ebx, edi
jl 0x414d79
mov edx, dword [esp + 0x64]
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x28]
lea eax, [edx + esi]
imul eax, eax, 0x64
cdq
idiv edi
cmp eax, 0x5a
jge 0x414ff8
xor eax, eax
mov ecx, 1
lea esp, [esp]
mov edx, dword [esp + ecx*4 + 0x60]
mov ebx, edx
imul ebx, ecx
imul ebx, ecx
add eax, ebx
test edx, edx
je 0x414ff8
mov ebx, dword [esp + ecx*4 + 0x5c]
shl ebx, 1
cmp edx, ebx
jg 0x414ff8
inc ecx
cmp ecx, 8
jl 0x414fa0
cmp ecx, 0x100
jge 0x414fe5
lea ebx, [ebx]
mov edx, dword [esp + ecx*4 + 0x60]
imul edx, ecx
imul edx, ecx
add eax, edx
inc ecx
cmp ecx, 0x100
jl 0x414fd0
sub edi, esi
xor edx, edx
div edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 8