Function at 0x431020
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, ecx
push edi
xor edi, edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edi
mov ecx, dword [eax]
cmp dword [eax + 0x10], edi
jle 0x431489
push ebx
push esi
nop
mov eax, dword [eax + 0x18]
mov esi, ecx
lea ecx, [ecx + eax*4]
mov eax, dword [esi]
dec eax
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x14], eax
test eax, eax
jle 0x43146d
mov eax, dword [esi + 4]
add esi, 4
mov dword [ebp - 0x18], eax
xor ebx, ebx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], ebx
mov edx, dword [eax + 8]
add edx, edi
mov edi, dword [ebp + 8]
mov ecx, dword [edi]
mov eax, dword [ecx + 0xc]
imul eax, edx
sub edx, dword [edi + 0x10]
add eax, dword [ecx]
mov ecx, dword [edi + 4]
mov dword [edi + 0x14], eax
mov eax, edx
cdq
idiv dword [ecx + 0x18]
imul edx, dword [ecx + 0xc]
add edx, dword [ecx]
sub dword [ebp - 0x14], 1
mov ecx, dword [ebp - 0x18]
mov dword [edi + 0x18], edx
js 0x431387
mov eax, dword [esi + 4]
add esi, 8
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x28], esi
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
cdq
and edx, 0xff
lea esi, [edx + eax]
mov eax, ecx
cdq
and edx, 0xff
sar esi, 8
mov dword [ebp - 4], esi
lea ebx, [edx + eax]
sar ebx, 8
mov dword [ebp - 8], ebx
cmp esi, ebx
jne 0x4310ee
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
sub eax, ecx
imul eax, dword [ebp - 0x10]
add ebx, eax
mov eax, dword [ebp - 0x18]
jmp 0x431375
movzx eax, cl
mov ecx, 0x100
sub ecx, eax
imul ecx, dword [ebp - 0x10]
add ecx, dword [ebp - 0xc]
mov eax, ecx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [ebp - 0x24], eax
test eax, eax
jle 0x4311e2
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov eax, dword [eax + 0x10]
imul eax, ebx
add eax, dword [edi + 0x14]
mov dword [ebp - 0xc], eax
mov eax, ebx
sub eax, dword [edi + 0xc]
cdq
idiv dword [ecx + 0x14]
mov eax, dword [edi + 0x18]
imul edx, dword [ecx + 0x10]
mov cl, byte [edx + eax]
mov eax, dword [ebp - 0x24]
cmp eax, 0xff
jl 0x431156
movzx eax, cl
mov esi, eax
shl esi, 0x10
or esi, eax
imul esi, dword [edi + 8]
jmp 0x43116c
mov esi, dword [edi + 8]
imul esi, eax
movzx ecx, cl
mov eax, ecx
shl eax, 0x10
or eax, ecx
sar esi, 8
imul esi, eax
shr esi, 8
mov ecx, 0x100
and esi, 0xff00ff
mov eax, esi
shr eax, 0x10
sub ecx, eax
mov eax, dword [ebp - 0xc]
movzx edx, byte [eax + 2]
movzx ebx, byte [eax + 1]
movzx eax, byte [eax]
shl edx, 0x10
or edx, eax
imul ebx, ecx
imul edx, ecx
mov ecx, 0x100
shr ebx, 8
shr edx, 8
add ebx, esi
and edx, 0xff00ff
add edx, esi
mov esi, dword [ebp - 4]
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, ebx
shr eax, 8
or ecx, edx
mov edx, dword [ebp - 0xc]
neg al
or al, bl
and ecx, 0xff00ff
mov ebx, dword [ebp - 8]
mov byte [edx + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [edx], cl
mov byte [edx + 2], al
mov edx, dword [ebp - 0x10]
test edx, edx
jle 0x43136c
inc ebx
sub esi, ebx
mov dword [ebp - 4], esi
test esi, esi
jle 0x43136c
mov eax, dword [edi]
mov eax, dword [eax + 0x10]
mov ecx, eax
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 8]
imul ecx, ebx
sub ebx, dword [edi + 0xc]
imul eax, edx
add ecx, dword [edi + 0x14]
sar eax, 8
mov dword [ebp - 0x24], eax
cmp eax, 0xfe
jge 0x4312d1
mov esi, dword [edi + 4]
mov eax, ebx
cdq
inc ebx
mov dword [ebp - 8], ebx
movzx ebx, byte [ecx + 1]
idiv dword [esi + 0x14]
mov esi, dword [esi + 0x10]
mov eax, dword [edi + 0x18]
imul esi, edx
mov edx, 0x100
movzx eax, byte [esi + eax]
movzx esi, byte [ecx + 2]
mov edi, eax
shl edi, 0x10
or edi, eax
shl esi, 0x10
imul edi, dword [ebp - 0x24]
shr edi, 8
and edi, 0xff00ff
mov eax, edi
shr eax, 0x10
sub edx, eax
movzx eax, byte [ecx]
or esi, eax
imul ebx, edx
imul esi, edx
mov edx, 0x100
shr ebx, 8
shr esi, 8
add ebx, edi
and esi, 0xff00ff
add esi, edi
mov edi, dword [ebp + 8]
mov eax, esi
shr eax, 8
and eax, 0xff00ff
sub edx, eax
mov eax, ebx
shr eax, 8
or edx, esi
neg al
and edx, 0xff00ff
or al, bl
mov byte [ecx], dl
mov ebx, dword [ebp - 8]
mov byte [ecx + 1], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 2], al
mov eax, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x431225
jmp 0x431366
mov esi, dword [edi + 4]
mov eax, ebx
cdq
inc ebx
mov dword [ebp - 8], ebx
mov ebx, 0x100
idiv dword [esi + 0x14]
mov esi, dword [esi + 0x10]
mov eax, dword [edi + 0x18]
mov edi, 0x100
imul esi, edx
movzx edx, byte [ecx + 2]
shl edx, 0x10
movzx eax, byte [esi + eax]
mov esi, eax
sub edi, eax
shl esi, 0x10
or esi, eax
movzx eax, byte [ecx]
or edx, eax
imul edx, edi
shr edx, 8
and edx, 0xff00ff
add edx, esi
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ebx, eax
or ebx, edx
movzx edx, byte [ecx + 1]
imul edx, edi
and ebx, 0xff00ff
mov edi, dword [ebp + 8]
mov byte [ecx], bl
shr edx, 8
add edx, esi
mov eax, edx
shr eax, 8
neg al
or al, dl
mov byte [ecx + 1], al
mov eax, ebx
mov ebx, dword [ebp - 8]
shr eax, 0x10
mov byte [ecx + 2], al
mov eax, dword [ebp - 4]
add ecx, dword [ebp - 0xc]
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x4312d1
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
movzx ebx, al
imul ebx, edx
sub dword [ebp - 0x14], 1
mov ecx, eax
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0xc], ebx
jns 0x4310a1
mov eax, ebx
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [ebp - 0x28], eax
test eax, eax
jle 0x43146d
mov esi, dword [edi + 4]
mov eax, ecx
mov ecx, dword [edi]
cdq
and edx, 0xff
add eax, edx
mov ebx, dword [ecx + 0x10]
sar eax, 8
imul ebx, eax
sub eax, dword [edi + 0xc]
cdq
idiv dword [esi + 0x14]
mov eax, dword [edi + 0x18]
imul edx, dword [esi + 0x10]
add ebx, dword [edi + 0x14]
mov dword [ebp - 0x18], ebx
movzx ebx, byte [ebx + 1]
mov cl, byte [edx + eax]
mov eax, dword [ebp - 0x28]
cmp eax, 0xff
jl 0x4313ee
movzx eax, cl
mov esi, eax
shl esi, 0x10
or esi, eax
imul esi, dword [edi + 8]
jmp 0x431404
mov esi, dword [edi + 8]
imul esi, eax
movzx ecx, cl
mov eax, ecx
shl eax, 0x10
or eax, ecx
sar esi, 8
imul esi, eax
mov edi, dword [ebp - 0x18]
mov ecx, 0x100
shr esi, 8
and esi, 0xff00ff
mov eax, esi
movzx edx, byte [edi + 2]
shr eax, 0x10
sub ecx, eax
shl edx, 0x10
movzx eax, byte [edi]
or edx, eax
imul ebx, ecx
imul edx, ecx
mov ecx, 0x100
shr ebx, 8
shr edx, 8
add ebx, esi
and edx, 0xff00ff
add edx, esi
mov eax, edx
shr eax, 8
and eax, 0xff00ff
sub ecx, eax
mov eax, ebx
shr eax, 8
or ecx, edx
neg al
and ecx, 0xff00ff
or al, bl
mov byte [edi + 1], al
mov eax, ecx
shr eax, 0x10
mov byte [edi], cl
mov byte [edi + 2], al
mov ecx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
mov edi, eax
cmp eax, dword [ecx + 0x10]
mov eax, ecx
mov ecx, dword [ebp - 0x2c]
jl 0x431040
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret 4