Function at 0x4069b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov esi, ecx
test edx, edx
je 0x4069c5
push esi
call fcn.00406cb0
jmp 0x4069cb
push esi
call fcn.00407170
add esp, 4
lea edi, [esi + 0x9272]
cmp edi, dword [esi + 0x28]
jae 0x406c3d
mov eax, 1
jmp 0x4069ff
mov eax, dword [esp + 4]
shr eax, 1
cmp edi, dword [esi + 0x28]
jae 0x406c43
cmp eax, 1
jne 0x406a0d
movzx eax, byte [edi]
inc edi
or eax, 0x100
mov dword [esp + 4], eax
test al, 1
jne 0x406a80
movzx ebx, byte [edi]
movzx edx, word [esi + ebx*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl edx, cl
inc edi
movzx ecx, byte [esi + ebx + 0x8f12]
or edx, dword [esi + 0x48]
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406a61
jmp 0x4069f0
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4069f0
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x406a50
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x406a50
movzx edx, byte [edi]
movzx ebp, word [edx + edx + 0x43fbea]
movzx ebx, word [esi + ebp*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl ebx, cl
movzx ecx, byte [esi + ebp + 0x8f12]
add ecx, eax
movzx eax, byte [edi + 1]
mov dword [esp], eax
or ebx, dword [esi + 0x48]
movzx ebp, byte [edi + 2]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406b11
movzx eax, byte [edx + 0x43fe44]
and edx, dword [eax*4 + 0x43fe00]
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406b41
mov eax, ebp
shl eax, 8
add eax, dword [esp]
cmp eax, 0x200
jb 0x406b60
mov ebx, ebp
lea ebp, [ebp + 0x43fb6a]
lea ebx, [ebx + 0x440144]
jmp 0x406b6c
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x406abd
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x406b00
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x406b00
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x406adc
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x406b30
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x406b30
lea ebx, [eax + 0x43ff44]
lea ebp, [eax + 0x43f96a]
movzx ebp, byte [ebp]
movzx ebx, byte [ebx]
mov dword [esp], ebx
movzx ebx, word [esi + ebp*2 + 0x8a92]
movzx ebp, byte [esi + ebp + 0x9032]
shl ebx, cl
or ebx, edx
mov dword [esi + 0x48], ebx
mov edx, ecx
and edx, ebp
xor ecx, ebp
lea ecx, [ecx + edx*2]
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406bea
add edi, 3
mov edx, eax
not edx
mov ebp, dword [esp]
or edx, dword [ebp*4 + 0x43fe00]
add edx, eax
inc edx
shl edx, cl
or edx, ebx
mov dword [esi + 0x48], edx
add ecx, ebp
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x406c25
jmp 0x4069f0
shr ebx, 8
mov dword [esi + 0x48], ebx
mov edx, ecx
not edx
and edx, 8
and ecx, 0xfffffff7
sub ecx, edx
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x406b9e
mov edx, dword [esi + 0x30]
cmp edx, dword [esi + 0x34]
jae 0x406bd0
lea ecx, [edx + 1]
mov dword [esi + 0x30], ecx
mov byte [edx], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x406bd0
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4069f0
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x406c10
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x406c10
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
movzx eax, word [esi + 0x8a52]
movzx edi, byte [esi + 0x9012]
shl eax, cl
or eax, edx
mov dword [esi + 0x48], eax
add edi, ecx
mov dword [esi + 0x44], edi
cmp edi, 8
jae 0x406c91
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp ecx, dword [esi + 0x34]
setb al
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [esi + 0x48], eax
add edi, 0xfffffff8
mov dword [esi + 0x44], edi
cmp edi, 7
jbe 0x406c62
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x406c80
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edi, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x406c80