Function at 0x579d83
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], edx
mov edx, dword [ebp + 0x1c]
movzx eax, byte [edx]
inc edx
mov dword [ebp - 0x24], eax
imul eax, dword [ebp + 0x20]
mov dword [ebp + 0x1c], edx
sub eax, 0xffffff80
mov edx, eax
sar edx, 8
add edx, eax
sar edx, 8
test edx, edx
je 0x579fd2
cmp dword [ebp - 0x18], 0
je 0x579e05
movzx edi, byte [ebx + esi]
mov dword [ebp - 4], edi
test edi, edi
jne 0x579e0d
cmp dword [ebp + 0x20], 0xff
jne 0x579e0a
xor eax, eax
cmp dword [ebp + 0xc], eax
setne al
add eax, esi
push eax
push ecx
push ebx
call fcn.006f6760
mov ecx, dword [ebp + 8]
add esp, 0xc
cmp dword [ebp + 0xc], edi
jne 0x579fd2
mov byte [ebx + esi + 1], 0xff
jmp 0x579fd2
mov edi, 0xff
mov dword [ebp - 4], edi
cmp dword [ebp + 0xc], 0
je 0x579e1c
movzx eax, byte [ecx + esi]
mov dword [ebp - 0x10], eax
jmp 0x579e23
mov dword [ebp - 0x10], 0xff
mov ecx, edi
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
mov ecx, edi
sar eax, 8
sub ecx, eax
add ecx, edx
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x14], ecx
je 0x579e47
mov byte [ebx + esi], cl
test ecx, ecx
je 0x579fcf
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x579e64
mov eax, 0xff00
xor edx, edx
div ecx
mov dword [ebp - 0xc], eax
jmp 0x579e68
and dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x579e7d
mov eax, 0xff00
xor edx, edx
div ecx
mov dword [ebp - 8], eax
jmp 0x579e81
and dword [ebp - 8], 0
test edi, edi
je 0x579e90
mov eax, 0xff00
xor edx, edx
div edi
jmp 0x579e92
xor eax, eax
movzx ecx, byte [ebx]
imul ecx, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 8]
sar ecx, 8
movzx edx, byte [eax]
imul edx, dword [ebp - 8]
mov eax, dword [ebp + 0x18]
sar edx, 8
sub edx, ecx
imul edx, dword [ebp - 0xc]
sar edx, 8
add edx, ecx
sub eax, 0xc
je 0x579ede
sub eax, 1
je 0x579ede
sub eax, 1
je 0x579ede
sub eax, 1
jne 0x579ede
mov eax, 0xff
cmp edx, eax
cmovl eax, edx
xor ecx, ecx
test edx, edx
cmovg ecx, eax
imul ecx, dword [ebp - 0x14]
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
sar eax, 8
mov byte [ebx], al
cmp esi, 1
jle 0x579fcf
mov eax, 0xff
lea ecx, [ebx + 1]
sub eax, edi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
sub eax, ebx
mov ebx, dword [ebp - 4]
dec esi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x24], esi
mov esi, 0x80
movzx edi, byte [ecx]
movzx ecx, byte [eax + ecx]
mov eax, 0xff
imul ecx, dword [ebp - 8]
imul edi, dword [ebp - 0x1c]
add ecx, esi
sar ecx, 8
add edi, esi
sar edi, 8
sub ecx, edi
imul ecx, dword [ebp - 0xc]
add ecx, esi
sar ecx, 8
add ecx, edi
cmp ecx, eax
cmovl eax, ecx
xor edx, edx
test ecx, ecx
mov ecx, dword [ebp - 0x2c]
cmovg edx, eax
imul ecx, edx
imul edx, ebx
add ecx, esi
add edx, esi
mov eax, ecx
sar eax, 8
mov esi, edx
add eax, ecx
sar esi, 8
add esi, edx
sar eax, 8
sar esi, 8
add esi, eax
mov eax, 0xff
sub esi, edi
imul esi, dword [ebp - 0x10]
sub esi, 0xffffff80
mov edx, esi
sar edx, 8
add edx, esi
mov esi, 0x80
sar edx, 8
add edx, edi
cmp edx, eax
cmovl eax, edx
xor ecx, ecx
test edx, edx
cmovg ecx, eax
imul ecx, dword [ebp - 0x14]
add ecx, esi
mov eax, ecx
sar eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x20]
sar eax, 8
mov byte [ecx], al
inc ecx
sub dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], ecx
jne 0x579f1e
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
add eax, esi
add ecx, eax
mov eax, dword [ebp - 0x18]
add eax, esi
mov dword [ebp + 8], ecx
add ebx, eax
sub dword [ebp + 0x14], 1
mov dword [ebp - 0x28], ebx
jne 0x579d9a
pop edi
pop esi
pop ebx
leave
ret