Function at 0x461a79
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
cmp dword [esp + 0x30], 0
mov dword [esp + 0x10], edx
mov dword [esp], ecx
js 0x461ffc
mov eax, dword [esp + 0x10]
mov esi, 0x8a
mov ecx, 7
mov edx, 4
movzx ebp, word [eax + 2]
xor eax, eax
test bp, bp
sete al
cmove ecx, esi
sub edx, eax
xor edi, edi
xor ebx, ebx
xor eax, eax
dec edi
jmp 0x461acf
add ebx, 3
jmp 0x461fb7
add ebx, 7
jmp 0x461fb7
mov esi, ebp
mov ebp, dword [esp + 0x10]
mov dword [esp + 4], eax
inc eax
mov dword [esp + 0x18], ebx
cmp eax, ecx
movzx ebp, word [ebp + ebx*4 + 6]
jge 0x461aef
cmp esi, ebp
je 0x461feb
cmp eax, edx
mov dword [esp + 8], esi
mov dword [esp + 0x14], ebp
jge 0x461baa
mov eax, dword [esp]
mov edx, dword [esp + 4]
mov ecx, dword [eax + 0x170c]
not edx
movzx edi, word [eax + esi*4 + 0xacc]
mov dword [esp + 4], edx
movzx edx, word [eax + esi*4 + 0xace]
mov ebp, 0x10
mov ebx, edi
sub ebp, edx
shl ebx, cl
or bx, word [eax + 0x1708]
cmp ecx, ebp
mov word [eax + 0x1708], bx
jle 0x461b92
mov ebp, dword [eax + 0x14]
mov esi, dword [esp]
mov ecx, dword [eax + 8]
lea eax, [ebp + 1]
mov dword [esi + 0x14], eax
mov esi, dword [esp]
mov byte [ecx + ebp], bl
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esi + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
mov esi, dword [esp]
lea ebp, [ebx + 1]
mov dword [esi + 0x14], ebp
mov byte [ecx + ebx], al
mov eax, dword [esp]
mov esi, dword [esp + 8]
mov cl, 0x10
mov ebx, dword [eax + 0x170c]
sub cl, bl
shr edi, cl
lea ecx, [edx + ebx - 0x10]
mov word [eax + 0x1708], di
jmp 0x461b94
add ecx, edx
mov edx, dword [esp + 4]
mov dword [eax + 0x170c], ecx
inc edx
jne 0x461b0e
jmp 0x461fc1
test esi, esi
je 0x461bca
cmp esi, edi
jne 0x461c69
mov ecx, dword [esp]
mov dword [esp + 4], eax
mov ebx, dword [ecx + 0x170c]
mov eax, ecx
jmp 0x461da9
cmp eax, 0xa
jg 0x461d07
mov esi, dword [esp]
mov eax, 0x10
mov ebx, dword [esi + 0x170c]
movzx edi, word [esi + 0xb10]
movzx ebp, word [esi + 0xb12]
mov edx, edi
mov ecx, ebx
sub eax, ebp
shl edx, cl
or dx, word [esi + 0x1708]
cmp ebx, eax
mov word [esi + 0x1708], dx
jle 0x461eb8
mov ecx, dword [esp]
mov eax, dword [esp]
mov esi, ebp
mov ebp, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebx, [ecx + 1]
mov dword [ebp + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebp, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea ebx, [edx + 1]
mov dword [ebp + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov edx, dword [eax + 0x170c]
sub cl, dl
lea ebx, [esi + edx - 0x10]
shr edi, cl
mov word [eax + 0x1708], di
mov edx, edi
jmp 0x461ebc
mov ecx, esi
mov esi, dword [esp]
mov eax, 0x10
movzx edx, word [esi + ecx*4 + 0xace]
mov ebx, dword [esi + 0x170c]
movzx edi, word [esi + ecx*4 + 0xacc]
mov dword [esp + 0xc], edx
sub eax, edx
mov edx, edi
mov ecx, ebx
shl edx, cl
or dx, word [esi + 0x1708]
cmp ebx, eax
mov word [esi + 0x1708], dx
jle 0x461d9d
mov ecx, dword [esp]
mov eax, dword [esp]
mov ebp, dword [esp]
mov esi, dword [esp + 0xc]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebx, [ecx + 1]
mov dword [ebp + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebp, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea ebx, [edx + 1]
mov dword [ebp + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov edx, dword [eax + 0x170c]
sub cl, dl
lea ebx, [esi + edx - 0x10]
shr edi, cl
mov word [eax + 0x1708], di
jmp 0x461da3
mov esi, dword [esp]
mov eax, 0x10
mov ebx, dword [esi + 0x170c]
movzx edi, word [esi + 0xb14]
movzx ebp, word [esi + 0xb16]
mov edx, edi
mov ecx, ebx
sub eax, ebp
shl edx, cl
or dx, word [esi + 0x1708]
cmp ebx, eax
mov word [esi + 0x1708], dx
jle 0x461f34
mov ecx, dword [esp]
mov eax, dword [esp]
mov esi, ebp
mov ebp, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebx, [ecx + 1]
mov dword [ebp + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebp, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea ebx, [edx + 1]
mov dword [ebp + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov edx, dword [eax + 0x170c]
sub cl, dl
lea ebx, [esi + edx - 0x10]
shr edi, cl
mov word [eax + 0x1708], di
mov edx, edi
jmp 0x461f38
add ebx, dword [esp + 0xc]
mov eax, esi
mov dword [eax + 0x170c], ebx
mov ecx, dword [esp]
movzx esi, word [eax + 0xb0e]
mov ebp, dword [esp]
mov eax, 0x10
movzx edi, word [ecx + 0xb0c]
mov ecx, ebx
sub eax, esi
mov edx, edi
shl edx, cl
or dx, word [ebp + 0x1708]
cmp ebx, eax
mov eax, dword [esp]
mov word [eax + 0x1708], dx
jle 0x461e36
mov ecx, dword [esp]
mov eax, dword [esp]
mov ebp, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea ebx, [ecx + 1]
mov dword [ebp + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebp, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea ebx, [edx + 1]
mov dword [ebp + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov edx, dword [eax + 0x170c]
sub cl, dl
lea ebx, [esi + edx - 0x10]
shr edi, cl
mov word [eax + 0x1708], di
mov edx, edi
jmp 0x461e38
add ebx, esi
mov ecx, dword [esp + 4]
mov dword [eax + 0x170c], ebx
add ecx, 0xfffd
movzx esi, cx
mov ecx, ebx
mov eax, esi
shl eax, cl
or edx, eax
mov eax, dword [esp]
cmp ebx, 0xf
mov word [eax + 0x1708], dx
jl 0x461eb0
mov ecx, dword [esp]
mov eax, dword [esp]
mov ebx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea edi, [ecx + 1]
mov dword [ebx + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea edi, [edx + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x170c]
sub cl, bl
add ebx, 0xfffffff2
jmp 0x461fae
add ebx, 2
jmp 0x461fb7
mov eax, esi
add ebx, ebp
mov dword [eax + 0x170c], ebx
mov eax, dword [esp + 4]
mov ecx, ebx
add eax, 0xfffe
movzx esi, ax
mov eax, esi
shl eax, cl
or edx, eax
mov eax, dword [esp]
cmp ebx, 0xe
mov word [eax + 0x1708], dx
jl 0x461abf
mov ecx, dword [esp]
mov eax, dword [esp]
mov ebx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea edi, [ecx + 1]
mov dword [ebx + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea edi, [edx + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x170c]
sub cl, bl
add ebx, 0xfffffff3
jmp 0x461fae
mov eax, esi
add ebx, ebp
mov dword [eax + 0x170c], ebx
mov eax, dword [esp + 4]
mov ecx, ebx
add eax, 0xfff6
movzx esi, ax
mov eax, esi
shl eax, cl
or edx, eax
mov eax, dword [esp]
cmp ebx, 0xa
mov word [eax + 0x1708], dx
jl 0x461ac7
mov ecx, dword [esp]
mov eax, dword [esp]
mov ebx, dword [esp]
mov ecx, dword [ecx + 0x14]
mov eax, dword [eax + 8]
lea edi, [ecx + 1]
mov dword [ebx + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esp]
mov eax, dword [esp]
mov ecx, dword [esp]
mov ebx, dword [esp]
mov edx, dword [edx + 0x14]
mov al, byte [eax + 0x1709]
mov ecx, dword [ecx + 8]
lea edi, [edx + 1]
mov dword [ebx + 0x14], edi
mov byte [ecx + edx], al
mov eax, dword [esp]
mov cl, 0x10
mov ebx, dword [eax + 0x170c]
sub cl, bl
add ebx, 0xfffffff7
shr esi, cl
mov word [eax + 0x1708], si
mov esi, dword [esp + 8]
mov dword [eax + 0x170c], ebx
mov ebp, dword [esp + 0x14]
xor eax, eax
test bp, bp
je 0x461fdf
xor ecx, ecx
cmp esi, ebp
mov edx, 4
sete cl
sub edx, ecx
xor ecx, 7
jmp 0x461fe9
mov ecx, 0x8a
mov edx, 3
mov edi, esi
mov ebx, dword [esp + 0x18]
cmp ebx, dword [esp + 0x30]
lea ebx, [ebx + 1]
jne 0x461acf
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret