Function at 0x46764d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov esi, ecx
test edx, edx
je 0x46764e5
push esi
call fcn.04676800
jmp 0x46764eb
push esi
call fcn.04676c90
add esp, 4
lea ebp, [esi + 0x9272]
cmp ebp, dword [esi + 0x28]
jae 0x467678d
mov edi, 1
jmp 0x467651b
shr edi, 1
cmp ebp, dword [esi + 0x28]
jae 0x4676793
cmp edi, 1
jne 0x467652b
movzx edi, byte [ebp]
inc ebp
or edi, 0x100
mov eax, edi
xor eax, 0xfffffffe
mov ecx, edi
or ecx, 1
test ecx, eax
je 0x4676640
movzx edx, byte [ebp]
movzx eax, word [edx + edx + 0x46aebea]
movzx ebx, word [esi + eax*2 + 0x8852]
mov ecx, dword [esi + 0x44]
shl ebx, cl
movzx eax, byte [esi + eax + 0x8f12]
add eax, ecx
movzx ecx, byte [ebp + 1]
mov dword [esp + 8], ecx
or ebx, dword [esi + 0x48]
movzx ecx, byte [ebp + 2]
mov dword [esi + 0x48], ebx
mov dword [esi + 0x44], eax
cmp eax, 8
mov dword [esp], ecx
jae 0x46765f1
mov dword [esp + 4], edi
mov edi, edx
movzx edx, byte [edx + 0x46aee44]
and edi, dword [edx*4 + 0x46aee00]
mov ecx, eax
shl edi, cl
or edi, ebx
mov ecx, edi
mov dword [esi + 0x48], edi
add eax, edx
mov dword [esi + 0x44], eax
mov edx, edi
cmp eax, 8
jae 0x4676621
mov ecx, dword [esp]
mov ebx, ecx
shl ebx, 8
add ebx, dword [esp + 8]
cmp ebx, 0x200
mov dword [esp + 0xc], ebp
mov edi, edx
jb 0x46766b0
mov edx, ecx
lea ecx, [ecx + 0x46aeb6a]
lea edx, [edx + 0x46af144]
jmp 0x46766bc
shr ebx, 8
mov dword [esi + 0x48], ebx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x467657d
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x46765e0
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], bl
mov eax, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x46765e0
shr edx, 8
mov dword [esi + 0x48], edx
add eax, 0xfffffff8
mov dword [esi + 0x44], eax
cmp eax, 7
jbe 0x46765a8
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x4676610
lea eax, [ecx + 1]
mov dword [esi + 0x30], eax
mov byte [ecx], dl
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x4676610
movzx edx, byte [ebp]
movzx ebx, word [esi + edx*2 + 0x8852]
mov eax, dword [esi + 0x44]
mov ecx, eax
shl ebx, cl
inc ebp
movzx ecx, byte [esi + edx + 0x8f12]
or ebx, dword [esi + 0x48]
mov dword [esi + 0x48], ebx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x4676695
jmp 0x4676510
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4676510
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x4676680
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x4676680
lea ecx, [ebx + 0x46ae96a]
lea edx, [ebx + 0x46aef44]
mov dword [esp], edx
movzx ebp, byte [ecx]
movzx edx, word [esi + ebp*2 + 0x8a92]
mov ecx, eax
shl edx, cl
or edx, edi
movzx ecx, byte [esi + ebp + 0x9032]
add ecx, eax
mov eax, dword [esp]
movzx eax, byte [eax]
mov dword [esi + 0x48], edx
mov dword [esi + 0x44], ecx
cmp ecx, 8
jb 0x4676730
mov edi, dword [esp + 4]
jmp 0x4676711
shr edx, 8
mov dword [esi + 0x48], edx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4676734
mov ebp, dword [esi + 0x30]
cmp ebp, dword [esi + 0x34]
jae 0x4676700
lea ecx, [ebp + 1]
mov dword [esi + 0x30], ecx
mov byte [ebp], dl
mov ecx, dword [esi + 0x44]
mov edx, dword [esi + 0x48]
jmp 0x4676700
mov edi, dword [esp + 4]
mov ebp, dword [esp + 0xc]
add ebp, 3
and ebx, dword [eax*4 + 0x46aee00]
shl ebx, cl
or ebx, edx
mov dword [esi + 0x48], ebx
add ecx, eax
mov dword [esi + 0x44], ecx
cmp ecx, 8
jae 0x4676775
jmp 0x4676510
shr ebx, 8
mov dword [esi + 0x48], ebx
add ecx, 0xfffffff8
mov dword [esi + 0x44], ecx
cmp ecx, 7
jbe 0x4676510
mov eax, dword [esi + 0x30]
cmp eax, dword [esi + 0x34]
jae 0x4676760
lea ecx, [eax + 1]
mov dword [esi + 0x30], ecx
mov byte [eax], bl
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
jmp 0x4676760
mov ecx, dword [esi + 0x44]
mov ebx, dword [esi + 0x48]
movzx eax, word [esi + 0x8a52]
movzx edx, byte [esi + 0x9012]
shl eax, cl
or eax, ebx
mov dword [esi + 0x48], eax
add edx, ecx
mov dword [esi + 0x44], edx
cmp edx, 8
jae 0x46767e1
mov ecx, dword [esi + 0x30]
xor eax, eax
cmp ecx, dword [esi + 0x34]
setb al
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
shr eax, 8
mov dword [esi + 0x48], eax
add edx, 0xfffffff8
mov dword [esi + 0x44], edx
cmp edx, 7
jbe 0x46767b2
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x46767d0
lea edx, [ecx + 1]
mov dword [esi + 0x30], edx
mov byte [ecx], al
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x48]
jmp 0x46767d0