Function at 0x497850
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 8], 0
js 0x497dbb
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + 2]
xor ebx, ebx
test ecx, ecx
mov eax, 0x8a
mov edx, 7
cmove edx, eax
mov dword [ebp - 0x14], edx
setne bl
add ebx, 3
mov dword [ebp - 0x1c], ebx
mov esi, 0xffffffff
xor eax, eax
xor edx, edx
jmp 0x4978cc
xor eax, eax
mov ecx, esi
cmp ebx, esi
sete al
mov esi, 4
sub esi, eax
mov dword [ebp - 0x1c], esi
xor eax, 7
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
mov esi, ebx
lea ebx, [eax + 1]
cmp eax, dword [ebp + 8]
mov eax, ebx
je 0x497dbb
mov ebx, ecx
mov ecx, dword [ebp - 0x24]
movzx ecx, word [ecx + eax*4 + 6]
mov dword [ebp - 0x18], edx
inc edx
cmp edx, dword [ebp - 0x14]
jge 0x4978e3
cmp ebx, ecx
je 0x4978be
mov dword [ebp - 0x2c], ecx
mov edi, edx
cmp edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ebx
jge 0x4979b0
mov edx, dword [ebp - 0x10]
mov ecx, dword [edx + 0x170c]
jmp 0x497923
add ecx, dword [ebp - 0x14]
mov dword [edx + 0x170c], ecx
dec edi
mov ebx, dword [ebp - 0x28]
je 0x497d99
movzx esi, word [edx + ebx*4 + 0xace]
mov eax, 0x10
mov dword [ebp - 0x14], esi
sub eax, esi
movzx esi, word [edx + ebx*4 + 0xacc]
mov ebx, esi
shl ebx, cl
or bx, word [edx + 0x1708]
mov word [edx + 0x1708], bx
cmp ecx, eax
jle 0x497910
mov eax, dword [edx + 8]
mov dword [ebp - 0x18], eax
mov ecx, dword [edx + 0x14]
lea eax, [ecx + 1]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x18]
mov byte [eax + ecx], bl
movzx eax, byte [edx + 0x1709]
mov byte [ebp - 0x18], al
mov ecx, dword [edx + 8]
mov ebx, dword [edx + 0x14]
lea eax, [ebx + 1]
mov dword [edx + 0x14], eax
movzx eax, byte [ebp - 0x18]
mov byte [ecx + ebx], al
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
shr esi, cl
mov word [edx + 0x1708], si
mov eax, dword [ebp - 0x14]
lea ecx, [eax + ebx]
add ecx, 0xfffffff0
jmp 0x497913
test ebx, ebx
mov edx, dword [ebp - 0x10]
je 0x4979cd
cmp ebx, esi
jne 0x497a57
mov ebx, dword [edx + 0x170c]
mov dword [ebp - 0x18], edi
jmp 0x497b58
mov ebx, dword [edx + 0x170c]
movzx edi, word [edx + 0x1708]
cmp dword [ebp - 0x18], 9
jg 0x497adb
movzx esi, word [edx + 0xb12]
movzx eax, word [edx + 0xb10]
mov dword [ebp - 0x14], eax
mov ecx, ebx
shl eax, cl
mov ecx, edi
mov edi, esi
or ecx, eax
mov eax, 0x10
sub eax, esi
cmp ebx, eax
jle 0x497c47
mov word [edx + 0x1708], cx
mov eax, dword [edx + 8]
mov ebx, ecx
mov ecx, dword [edx + 0x14]
lea esi, [ecx + 1]
mov dword [edx + 0x14], esi
mov byte [eax + ecx], bl
movzx eax, byte [edx + 0x1709]
mov ecx, dword [edx + 8]
mov esi, dword [edx + 0x14]
lea ebx, [esi + 1]
mov dword [edx + 0x14], ebx
mov byte [ecx + esi], al
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
add ebx, edi
add ebx, 0xfffffff0
mov eax, dword [ebp - 0x14]
shr eax, cl
mov ecx, eax
jmp 0x497c49
movzx esi, word [edx + ebx*4 + 0xace]
mov ecx, ebx
mov ebx, dword [edx + 0x170c]
mov eax, 0x10
sub eax, esi
movzx ecx, word [edx + ecx*4 + 0xacc]
mov edi, edx
mov dword [ebp - 0x14], ecx
mov edx, ecx
mov ecx, ebx
shl edx, cl
or dx, word [edi + 0x1708]
mov word [edi + 0x1708], dx
cmp ebx, eax
jle 0x497b4e
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x14]
mov ebx, esi
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], dl
movzx eax, byte [edi + 0x1709]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x14]
lea esi, [edx + 1]
mov dword [edi + 0x14], esi
mov byte [ecx + edx], al
mov edx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, dl
mov eax, dword [ebp - 0x14]
shr eax, cl
mov word [edi + 0x1708], ax
add ebx, edx
add ebx, 0xfffffff0
jmp 0x497b50
movzx esi, word [edx + 0xb16]
movzx eax, word [edx + 0xb14]
mov dword [ebp - 0x14], eax
mov ecx, ebx
shl eax, cl
mov ecx, edi
mov edi, esi
or ecx, eax
mov eax, 0x10
sub eax, esi
cmp ebx, eax
jle 0x497cd5
mov word [edx + 0x1708], cx
mov eax, dword [edx + 8]
mov ebx, ecx
mov ecx, dword [edx + 0x14]
lea esi, [ecx + 1]
mov dword [edx + 0x14], esi
mov byte [eax + ecx], bl
movzx eax, byte [edx + 0x1709]
mov ecx, dword [edx + 8]
mov esi, dword [edx + 0x14]
lea ebx, [esi + 1]
mov dword [edx + 0x14], ebx
mov byte [ecx + esi], al
mov ebx, dword [edx + 0x170c]
mov cl, 0x10
sub cl, bl
add ebx, edi
add ebx, 0xfffffff0
mov eax, dword [ebp - 0x14]
shr eax, cl
mov ecx, eax
jmp 0x497cd7
add ebx, esi
mov dword [edi + 0x170c], ebx
mov edx, edi
movzx esi, word [edx + 0xb0e]
mov eax, 0x10
movzx ecx, word [edx + 0xb0c]
mov edi, edx
mov dword [ebp - 0x14], ecx
mov edx, ecx
mov ecx, ebx
shl edx, cl
sub eax, esi
or dx, word [edi + 0x1708]
cmp ebx, eax
jle 0x497bc7
mov word [edi + 0x1708], dx
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x14]
mov ebx, esi
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], dl
movzx eax, byte [edi + 0x1709]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x14]
lea esi, [edx + 1]
mov dword [edi + 0x14], esi
mov byte [ecx + edx], al
mov edx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, dl
add ebx, edx
add ebx, 0xfffffff0
mov edx, dword [ebp - 0x14]
shr edx, cl
jmp 0x497bc9
add ebx, esi
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x170c], ebx
add eax, 0xfffd
cmp ebx, 0xf
jl 0x497c32
movzx ecx, ax
mov dword [ebp - 0x14], ecx
mov ecx, ebx
shl eax, cl
or edx, eax
mov word [edi + 0x1708], dx
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0x14]
lea esi, [ecx + 1]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], dl
movzx eax, byte [edi + 0x1709]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x14]
lea esi, [edx + 1]
mov dword [edi + 0x14], esi
mov byte [ecx + edx], al
mov ebx, dword [edi + 0x170c]
mov cl, 0x10
sub cl, bl
mov eax, dword [ebp - 0x14]
shr eax, cl
mov word [edi + 0x1708], ax
add ebx, 0xfffffff2
jmp 0x497d90
mov ecx, ebx
shl eax, cl
or edx, eax
mov word [edi + 0x1708], dx
add ebx, 2
jmp 0x497d90
add ebx, edi
mov esi, ecx
mov dword [edx + 0x170c], ebx
mov eax, dword [ebp - 0x18]
add eax, 0xfffe
cmp ebx, 0xe
jl 0x497d60
movzx edx, ax
mov ecx, ebx
shl eax, cl
mov ebx, esi
or ebx, eax
mov eax, dword [ebp - 0x10]
mov word [eax + 0x1708], bx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x14]
lea esi, [ecx + 1]
mov edi, dword [ebp - 0x10]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], bl
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x1709]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 8]
mov esi, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, bl
shr edx, cl
mov eax, dword [ebp - 0x10]
mov word [eax + 0x1708], dx
mov edi, dword [ebp - 0x10]
add ebx, 0xfffffff3
jmp 0x497d90
add ebx, edi
mov esi, ecx
mov dword [edx + 0x170c], ebx
mov eax, dword [ebp - 0x18]
add eax, 0xfff6
cmp ebx, 0xa
jl 0x497d74
movzx edx, ax
mov ecx, ebx
shl eax, cl
mov ebx, esi
or ebx, eax
mov eax, dword [ebp - 0x10]
mov word [eax + 0x1708], bx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0x14]
lea esi, [ecx + 1]
mov edi, dword [ebp - 0x10]
mov dword [edi + 0x14], esi
mov byte [eax + ecx], bl
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x1709]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 8]
mov esi, dword [ebp - 0x10]
mov esi, dword [esi + 0x14]
lea edi, [esi + 1]
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x14], edi
mov byte [ecx + esi], al
mov eax, dword [ebp - 0x10]
mov ebx, dword [eax + 0x170c]
mov cl, 0x10
sub cl, bl
shr edx, cl
mov eax, dword [ebp - 0x10]
mov word [eax + 0x1708], dx
mov edi, dword [ebp - 0x10]
add ebx, 0xfffffff7
jmp 0x497d90
mov edi, edx
mov ecx, ebx
shl eax, cl
or esi, eax
mov word [edx + 0x1708], si
add ebx, 3
jmp 0x497d90
mov edi, edx
mov ecx, ebx
shl eax, cl
or esi, eax
mov word [edx + 0x1708], si
add ebx, 7
nop word cs:[eax + eax]
mov dword [edi + 0x170c], ebx
mov ebx, dword [ebp - 0x28]
xor edx, edx
mov esi, dword [ebp - 0x2c]
test esi, esi
jne 0x4978a0
mov ecx, esi
mov dword [ebp - 0x14], 0x8a
mov dword [ebp - 0x1c], 3
jmp 0x4978b9
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret