Function at 0x579ff5
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp + 0x20]
movzx eax, byte [ecx]
inc ecx
mov dword [ebp - 0x54], eax
imul eax, dword [ebp + 0x24]
mov dword [ebp + 0x20], ecx
sub eax, 0xffffff80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
mov dword [ebp - 0x50], ecx
test ecx, ecx
je 0x57a5f5
cmp dword [ebp + 0xc], 0
je 0x57a047
movzx eax, byte [edx + edi]
mov dword [ebp - 0x2c], eax
jmp 0x57a04e
mov dword [ebp - 0x2c], 0xff
cmp dword [ebp - 0x3c], 0
je 0x57a09b
lea eax, [ebx + edi]
movzx esi, byte [eax]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], esi
test esi, esi
jne 0x57a0a9
cmp dword [ebp + 0x24], 0xff
mov dword [ebp - 0x30], esi
jne 0x57a0a9
mov esi, dword [ebp + 0xc]
xor eax, eax
test esi, esi
setne al
add eax, edi
push eax
push edx
push ebx
call fcn.006f6760
mov edx, dword [ebp + 8]
add esp, 0xc
test esi, esi
jne 0x57a5f5
mov byte [ebx + edi], 0xff
jmp 0x57a5f5
mov esi, 0xff
lea eax, [edi + ebx]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], eax
mov eax, esi
imul eax, ecx
sub eax, 0xffffff80
mov edx, eax
sar edx, 8
add edx, eax
mov eax, esi
sar edx, 8
sub eax, edx
mov dword [ebp - 0x4c], edx
add ecx, eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], ecx
je 0x57a0d5
mov eax, dword [ebp - 0x34]
mov byte [eax], cl
test ecx, ecx
je 0x57a5ef
mov ecx, dword [ebp - 0x54]
test ecx, ecx
je 0x57a0f2
mov eax, 0xff00
xor edx, edx
div ecx
mov dword [ebp - 0x24], eax
jmp 0x57a0f6
and dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x57a10d
mov eax, 0xff00
xor edx, edx
div ecx
mov edi, eax
mov dword [ebp - 0x34], eax
jmp 0x57a112
xor edi, edi
mov dword [ebp - 0x34], edi
test esi, esi
je 0x57a124
mov eax, 0xff00
xor edx, edx
div esi
mov dword [ebp - 0x20], eax
jmp 0x57a128
and dword [ebp - 0x20], 0
mov edx, dword [ebp + 8]
movzx ecx, byte [edx + 1]
movzx eax, byte [edx]
imul ecx, edi
imul eax, edi
sar ecx, 8
mov dword [ebp - 0xc], ecx
movzx ecx, byte [edx + 2]
movzx edx, byte [ebx + 2]
imul edx, dword [ebp - 0x20]
imul ecx, edi
movzx edi, byte [ebx]
imul edi, dword [ebp - 0x20]
sar eax, 8
sar edx, 8
sar ecx, 8
mov dword [ebp - 8], ecx
movzx ecx, byte [ebx + 1]
imul ecx, dword [ebp - 0x20]
sar edi, 8
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x48], edx
sar ecx, 8
cmp dword [ebp + 0x1c], 0
mov dword [ebp - 0x44], ecx
je 0x57a1c2
mov eax, 0xff
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov eax, 0xff
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, 0xff
sub eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov eax, 0xff
sub eax, edi
mov edi, eax
mov eax, 0xff
sub eax, ecx
mov ecx, eax
mov eax, 0xff
sub eax, edx
mov dword [ebp - 0x44], ecx
mov edx, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x48], edx
sub eax, edi
mov ebx, 0xff
imul eax, dword [ebp - 0x24]
sar eax, 8
add eax, edi
mov dword [ebp - 0x10], eax
mov eax, ebx
cmp dword [ebp - 0x10], ebx
cmovl eax, dword [ebp - 0x10]
xor ebx, ebx
cmp dword [ebp - 0x10], ebx
cmovg ebx, eax
mov eax, dword [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0x14], ebx
imul eax, dword [ebp - 0x24]
mov ebx, 0xff
sar eax, 8
add eax, ecx
mov dword [ebp - 0xc], eax
mov eax, ebx
cmp dword [ebp - 0xc], ebx
cmovl eax, dword [ebp - 0xc]
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
cmovg ebx, eax
mov eax, dword [ebp - 8]
sub eax, edx
mov dword [ebp - 0x18], ebx
imul eax, dword [ebp - 0x24]
mov ebx, 0xff
sar eax, 8
add eax, edx
mov dword [ebp - 8], eax
mov eax, ebx
cmp dword [ebp - 8], ebx
cmovl eax, dword [ebp - 8]
xor ebx, ebx
cmp dword [ebp - 8], ebx
cmovg ebx, eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x40]
sub eax, 0xc
je 0x57a29f
sub eax, 1
je 0x57a282
sub eax, 1
je 0x57a274
sub eax, 1
jne 0x57a29f
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push edx
push ecx
push edi
lea eax, [ebp - 3]
push eax
lea edx, [ebp - 2]
lea ecx, [ebp - 1]
call fcn.00578945
jmp 0x57a2ba
push edx
push ecx
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
jmp 0x57a263
push dword [ebp - 0x1c]
lea eax, [ebp - 3]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push edx
push ecx
push edi
push eax
lea edx, [ebp - 2]
lea ecx, [ebp - 1]
call fcn.00578aa9
jmp 0x57a2ba
push dword [ebp - 0x1c]
lea eax, [ebp - 3]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
push edx
push ecx
push edi
push eax
lea edx, [ebp - 2]
lea ecx, [ebp - 1]
call fcn.00578cd7
mov edx, dword [ebp - 0x4c]
add esp, 0x1c
cmp edx, 0xff
je 0x57a318
movzx eax, byte [ebp - 1]
imul eax, edx
sub eax, 0xffffff80
mov ecx, eax
sar ecx, 8
add ecx, eax
movzx eax, byte [ebp - 2]
sar ecx, 8
imul eax, edx
mov dword [ebp - 0xc], ecx
mov byte [ebp - 1], cl
sub eax, 0xffffff80
mov ecx, eax
sar ecx, 8
add ecx, eax
movzx eax, byte [ebp - 3]
imul eax, edx
sar ecx, 8
mov dword [ebp - 0x10], ecx
mov byte [ebp - 2], cl
sub eax, 0xffffff80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
mov dword [ebp - 8], ecx
mov byte [ebp - 3], cl
jmp 0x57a32a
mov al, byte [ebp - 3]
mov dword [ebp - 8], eax
mov al, byte [ebp - 2]
mov dword [ebp - 0x10], eax
mov al, byte [ebp - 1]
mov dword [ebp - 0xc], eax
mov eax, 0xff
cmp esi, eax
je 0x57a39e
sub eax, esi
imul eax, dword [ebp - 0x50]
sub eax, 0xffffff80
mov edx, eax
sar edx, 8
add edx, eax
sar edx, 8
mov ecx, edx
imul ecx, dword [ebp - 0x14]
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xc]
sar eax, 8
add cl, al
mov dword [ebp - 0xc], ecx
mov byte [ebp - 1], cl
mov ecx, edx
imul ecx, dword [ebp - 0x18]
imul edx, dword [ebp - 0x1c]
sub ecx, 0xffffff80
mov eax, ecx
sub edx, 0xffffff80
sar eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x10]
sar eax, 8
add cl, al
mov eax, edx
sar eax, 8
add eax, edx
mov dword [ebp - 0x10], ecx
mov byte [ebp - 2], cl
mov ecx, dword [ebp - 8]
sar eax, 8
add cl, al
mov dword [ebp - 8], ecx
mov byte [ebp - 3], cl
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0xc]
test eax, eax
je 0x57a3fe
mov edx, dword [ebp - 0x44]
imul edx, dword [ebp - 0x28]
imul edi, eax
sub edx, 0xffffff80
sub edi, 0xffffff80
mov eax, edi
sar eax, 8
add eax, edi
mov edi, dword [ebp - 0x48]
imul edi, dword [ebp - 0x28]
sar eax, 8
add cl, al
mov eax, edx
sar eax, 8
add eax, edx
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0x10]
sub edi, 0xffffff80
sar eax, 8
add dl, al
mov byte [ebp - 1], cl
mov eax, edi
mov dword [ebp - 0x10], edx
sar eax, 8
add eax, edi
mov byte [ebp - 2], dl
sar eax, 8
add byte [ebp - 8], al
mov eax, dword [ebp - 8]
mov byte [ebp - 3], al
jmp 0x57a401
mov edx, dword [ebp - 0x10]
cmp dword [ebp + 0x1c], 0
je 0x57a4f3
mov al, byte [ebp - 0x38]
sub al, cl
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0xc], eax
mov byte [ebp - 1], al
mov al, cl
sub al, dl
mov dword [ebp - 0x10], eax
mov byte [ebp - 2], al
mov al, cl
sub al, byte [ebp - 8]
cmp dword [ebp - 0x2c], 0
mov dword [ebp - 8], eax
mov byte [ebp - 3], al
je 0x57a444
mov eax, dword [ebp + 8]
movzx edx, byte [eax + 3]
imul edx, dword [ebp - 0x34]
sar edx, 8
jmp 0x57a449
mov edx, 0xff
test esi, esi
je 0x57a45a
movzx ecx, byte [ebx + 3]
imul ecx, dword [ebp - 0x20]
sar ecx, 8
jmp 0x57a45f
mov ecx, 0xff
mov eax, 0xff
cmp ecx, eax
cmovl eax, ecx
xor edi, edi
test ecx, ecx
mov ecx, 0xff
cmovg edi, eax
cmp edx, ecx
mov eax, ecx
cmovl eax, edx
xor ecx, ecx
test edx, edx
mov edx, edi
cmovg ecx, eax
cmp dword [ebp + 0x18], 0xf
mov eax, dword [ebp - 0x4c]
cmove edx, ecx
mov dword [ebp - 0x48], ecx
mov ecx, 0xff
cmp eax, ecx
je 0x57a4ab
imul eax, edx
sub eax, 0xffffff80
mov edx, eax
sar edx, 8
add edx, eax
sar edx, 8
cmp esi, ecx
je 0x57a4d7
mov eax, ecx
sub eax, esi
imul eax, dword [ebp - 0x50]
sub eax, 0xffffff80
mov ecx, eax
sar ecx, 8
add ecx, eax
sar ecx, 8
imul ecx, dword [ebp - 0x48]
sub ecx, 0xffffff80
mov eax, ecx
sar eax, 8
add eax, ecx
sar eax, 8
add edx, eax
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x57a4f0
imul edi, eax
sub edi, 0xffffff80
mov eax, edi
sar eax, 8
add eax, edi
sar eax, 8
add edx, eax
mov byte [ebx + 3], dl
mov eax, dword [ebp - 0xc]
mov edi, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x28]
mov byte [ebx], al
mov eax, dword [ebp - 0x10]
mov byte [ebx + 1], al
mov eax, dword [ebp - 8]
mov byte [ebx + 2], al
cmp ecx, edi
jge 0x57a5ef
mov eax, 0xff
lea edx, [ebx + ecx]
mov ecx, dword [ebp + 8]
sub eax, esi
mov dword [ebp - 0x48], eax
sub ecx, ebx
mov ebx, dword [ebp - 0x30]
mov eax, edi
sub eax, dword [ebp + 0x28]
mov esi, 0x80
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x4c], eax
movzx ecx, byte [ecx + edx]
imul ecx, dword [ebp - 0x34]
movzx edi, byte [edx]
mov edx, 0xff
imul edi, dword [ebp - 0x20]
mov eax, edx
add ecx, esi
sar ecx, 8
add edi, esi
sar edi, 8
sub ecx, edi
imul ecx, dword [ebp - 0x24]
add ecx, esi
sar ecx, 8
add ecx, edi
cmp ecx, edx
cmovl eax, ecx
xor edx, edx
test ecx, ecx
mov ecx, dword [ebp - 0x48]
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
mov ecx, 0xff
add esi, eax
mov eax, ecx
sub esi, edi
imul esi, dword [ebp - 0x54]
sub esi, 0xffffff80
mov edx, esi
sar edx, 8
add edx, esi
mov esi, 0x80
sar edx, 8
add edx, edi
cmp edx, ecx
cmovl eax, edx
xor ecx, ecx
test edx, edx
mov edx, dword [ebp - 0x50]
cmovg ecx, eax
imul ecx, dword [ebp - 0x38]
add ecx, esi
mov eax, ecx
sar eax, 8
add eax, ecx
mov ecx, dword [ebp - 0x44]
sar eax, 8
mov byte [edx], al
inc edx
sub dword [ebp - 0x4c], 1
mov dword [ebp - 0x50], edx
jne 0x57a53a
mov ebx, dword [ebp - 0x40]
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
lea eax, [esi + edi]
add edx, eax
mov eax, dword [ebp - 0x3c]
add eax, edi
mov dword [ebp + 8], edx
add ebx, eax
sub dword [ebp + 0x14], 1
mov dword [ebp - 0x40], ebx
jne 0x57a00f
pop edi
pop esi
pop ebx
leave
ret