Function at 0x4769f6
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x20
cmp dword [ebp + 8], 0
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], ecx
js 0x476ee3
mov eax, dword [ebp - 0x28]
mov esi, 0x8a
movzx ecx, word [eax + 2]
xor eax, eax
test cx, cx
mov ebx, ecx
mov ecx, 7
cmove ecx, esi
sete al
mov dword [ebp - 0x14], ecx
mov ecx, 4
sub ecx, eax
mov eax, dword [ebp + 8]
xor edi, edi
xor edx, edx
xor esi, esi
dec edi
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x20], edx
movzx edx, word [ecx + edx*4 + 6]
lea ecx, [esi + 1]
cmp ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
jge 0x476a65
cmp ebx, edx
jne 0x476a65
mov ebx, edx
jmp 0x476ec2
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], edx
cmp eax, dword [ebp - 0x18]
jge 0x476b16
mov edx, dword [ebp - 0x24]
mov edi, dword [ebp - 0x14]
mov ecx, dword [edx + 0x170c]
movzx esi, word [edx + edi*4 + 0xace]
movzx edi, word [edx + edi*4 + 0xacc]
mov dword [ebp - 0x10], eax
mov eax, 0x10
mov ebx, edi
sub eax, esi
shl ebx, cl
or bx, word [edx + 0x1708]
cmp ecx, eax
mov word [edx + 0x1708], bx
jle 0x476afc
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0x14]
mov dword [ebp - 0x18], eax
lea eax, [ecx + 1]
mov dword [edx + 0x14], eax
mov eax, dword [ebp - 0x18]
mov byte [eax + ecx], bl
mov al, byte [edx + 0x1709]
mov ebx, dword [edx + 0x14]
mov ecx, dword [edx + 8]
mov byte [ebp - 0x18], al
lea eax, [ebx + 1]
mov dword [edx + 0x14], eax
mov ah, byte [ebp - 0x18]
mov byte [ecx + ebx], ah
mov cl, 0x10
mov ebx, dword [edx + 0x170c]
sub cl, bl
shr edi, cl
lea ecx, [esi + ebx - 0x10]
mov word [edx + 0x1708], di
jmp 0x476afe
add ecx, esi
mov eax, dword [ebp - 0x10]
mov edi, dword [ebp - 0x14]
mov dword [edx + 0x170c], ecx
dec eax
jne 0x476a83
jmp 0x476e85
mov edx, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x24]
test edx, edx
je 0x476b36
cmp edx, edi
jne 0x476bc5
mov ecx, dword [ebx + 0x170c]
mov dword [ebp - 0x1c], eax
jmp 0x476cd5
cmp esi, 9
mov dword [ebp - 0x1c], esi
jg 0x476c47
mov edx, dword [ebx + 0x170c]
movzx ecx, word [ebx + 0xb12]
movzx edi, word [ebx + 0xb10]
mov eax, 0x10
mov esi, ebx
mov ebx, edx
mov dword [ebp - 0x10], ecx
sub eax, ecx
mov edx, edi
mov ecx, ebx
shl edx, cl
or dx, word [esi + 0x1708]
cmp ebx, eax
mov word [esi + 0x1708], dx
jle 0x476db7
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea ebx, [ecx + 1]
mov dword [esi + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea ebx, [edx + 1]
mov dword [esi + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [ebp - 0x10]
mov cl, 0x10
mov edx, dword [esi + 0x170c]
sub cl, dl
lea ebx, [eax + edx - 0x10]
shr edi, cl
mov word [esi + 0x1708], di
mov edx, edi
jmp 0x476dba
mov dword [ebp - 0x1c], esi
movzx esi, word [ebx + edx*4 + 0xace]
mov eax, 0x10
mov ecx, dword [ebx + 0x170c]
mov edi, ebx
mov dword [ebp - 0x10], esi
sub eax, esi
movzx esi, word [ebx + edx*4 + 0xacc]
mov edx, esi
shl edx, cl
or dx, word [ebx + 0x1708]
cmp ecx, eax
mov word [ebx + 0x1708], dx
jle 0x476cca
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 8]
lea ebx, [ecx + 1]
mov dword [edi + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [edi + 0x14]
mov al, byte [edi + 0x1709]
mov ecx, dword [edi + 8]
lea ebx, [edx + 1]
mov dword [edi + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [ebp - 0x10]
mov cl, 0x10
mov edx, dword [edi + 0x170c]
sub cl, dl
shr esi, cl
lea ecx, [eax + edx - 0x10]
mov word [edi + 0x1708], si
jmp 0x476ccd
mov edx, dword [ebx + 0x170c]
movzx ecx, word [ebx + 0xb16]
movzx edi, word [ebx + 0xb14]
mov eax, 0x10
mov esi, ebx
mov ebx, edx
mov dword [ebp - 0x10], ecx
sub eax, ecx
mov edx, edi
mov ecx, ebx
shl edx, cl
or dx, word [esi + 0x1708]
cmp ebx, eax
mov word [esi + 0x1708], dx
jle 0x476e16
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea ebx, [ecx + 1]
mov dword [esi + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea ebx, [edx + 1]
mov dword [esi + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [ebp - 0x10]
mov cl, 0x10
mov edx, dword [esi + 0x170c]
sub cl, dl
lea ebx, [eax + edx - 0x10]
shr edi, cl
mov word [esi + 0x1708], di
mov edx, edi
jmp 0x476e19
add ecx, dword [ebp - 0x10]
mov ebx, edi
mov dword [edi + 0x170c], ecx
movzx edx, word [ebx + 0xb0e]
movzx edi, word [ebx + 0xb0c]
mov eax, 0x10
mov esi, ebx
mov dword [ebp - 0x10], edx
sub eax, edx
mov edx, edi
shl edx, cl
or dx, word [ebx + 0x1708]
cmp ecx, eax
mov word [ebx + 0x1708], dx
jle 0x476d4a
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea ebx, [ecx + 1]
mov dword [esi + 0x14], ebx
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea ebx, [edx + 1]
mov dword [esi + 0x14], ebx
mov byte [ecx + edx], al
mov eax, dword [ebp - 0x10]
mov cl, 0x10
mov edx, dword [esi + 0x170c]
sub cl, dl
lea eax, [eax + edx - 0x10]
shr edi, cl
mov dword [ebp - 0x10], eax
mov word [esi + 0x1708], di
mov edx, edi
jmp 0x476d50
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
add eax, 0xfffd
mov dword [esi + 0x170c], ecx
movzx ebx, ax
mov eax, ebx
shl eax, cl
or edx, eax
cmp ecx, 0xf
mov word [esi + 0x1708], dx
jl 0x476dac
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea edi, [ecx + 1]
mov dword [esi + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea edi, [edx + 1]
mov dword [esi + 0x14], edi
mov byte [ecx + edx], al
mov cl, 0x10
mov eax, dword [esi + 0x170c]
sub cl, al
add eax, 0xfffffff2
jmp 0x476e73
mov eax, dword [ebp - 0x10]
add eax, 2
jmp 0x476e7c
add ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
mov dword [esi + 0x170c], ecx
add eax, 0xfffe
movzx ebx, ax
mov eax, ebx
shl eax, cl
or edx, eax
cmp ecx, 0xe
mov word [esi + 0x1708], dx
jl 0x476ed5
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea edi, [ecx + 1]
mov dword [esi + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea edi, [edx + 1]
mov dword [esi + 0x14], edi
mov byte [ecx + edx], al
mov cl, 0x10
mov eax, dword [esi + 0x170c]
sub cl, al
add eax, 0xfffffff3
jmp 0x476e73
add ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov ecx, ebx
mov dword [esi + 0x170c], ecx
add eax, 0xfff6
movzx ebx, ax
mov eax, ebx
shl eax, cl
or edx, eax
cmp ecx, 0xa
mov word [esi + 0x1708], dx
jl 0x476edc
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 8]
lea edi, [ecx + 1]
mov dword [esi + 0x14], edi
mov byte [eax + ecx], dl
mov edx, dword [esi + 0x14]
mov al, byte [esi + 0x1709]
mov ecx, dword [esi + 8]
lea edi, [edx + 1]
mov dword [esi + 0x14], edi
mov byte [ecx + edx], al
mov cl, 0x10
mov eax, dword [esi + 0x170c]
sub cl, al
add eax, 0xfffffff7
shr ebx, cl
mov word [esi + 0x1708], bx
mov edi, dword [ebp - 0x14]
mov dword [esi + 0x170c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], 0
test ax, ax
je 0x476eaf
xor ecx, ecx
cmp edi, eax
mov ebx, eax
mov eax, 4
sete cl
sub eax, ecx
xor ecx, 7
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
jmp 0x476ebf
mov ebx, eax
mov dword [ebp - 0x14], 0x8a
mov dword [ebp - 0x18], 3
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x10]
cmp edx, eax
lea edx, [edx + 1]
jne 0x476a44
jmp 0x476ee3
mov eax, ecx
add eax, 3
jmp 0x476e7c
mov eax, ecx
add eax, 7
jmp 0x476e7c
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret