Function at 0x46b790
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x18
movzx ebx, byte [edx + 0x1e]
mov bh, byte [edx + 0x1c]
mov esi, edx
call 0x46b7a7
pop edx
mov dword [ebp - 0x24], ecx
mov edi, 0
mov dword [ebp - 0x20], edx
mov edx, 0
test bl, bl
setne al
xor ecx, ecx
cmp bh, 1
ja 0x46b8bf
mov byte [ebp - 0x1c], al
xor edi, edi
test bl, bl
mov eax, 0
jne 0x46b85a
movzx ecx, byte [esi + 8]
xor eax, eax
mov ch, cl
add ch, 0xfb
cmp ch, 1
ja 0x46b85a
mov dword [ebp - 0x14], esi
test bh, bh
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 4]
jne 0x46b812
cmp cl, 6
je 0x46b812
mov eax, 2
cmp edx, 2
jb 0x46b9ed
cmp eax, edx
jne 0x46b81a
xor eax, eax
jmp 0x46b85a
mov ecx, dword [ebp - 0x18]
add edx, dword [ebp - 0x18]
lea ecx, [ecx + eax + 1]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x14], edx
movzx eax, byte [ecx + eax]
sete dl
test dl, 1
jne 0x46b851
cmp al, 0x2e
jne 0x46b851
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax]
cmp al, 0x5c
sete cl
cmp al, 0x2f
sete al
or al, cl
jmp 0x46b85a
cmp al, 0x2e
sete al
and dl, al
mov eax, edx
mov edx, eax
test bh, bh
je 0x46b868
movzx eax, byte [ebp - 0x1c]
mov ecx, eax
jmp 0x46b8bf
movzx ecx, byte [esi + 8]
movzx ebx, byte [ebp - 0x1c]
cmp ecx, 6
je 0x46b8bd
mov eax, dword [ebp - 0x20]
mov edi, 6
add eax, dword [ecx*4 + 0x46b9fc]
mov ecx, ebx
jmp eax
mov ecx, ebx
movzx eax, dl
mov edx, dword [esi + 4]
movzx ecx, cl
mov dword [ebp - 0x18], ecx
add ecx, eax
mov dword [ebp - 0x14], eax
add ecx, edi
cmp ecx, edx
ja 0x46b9d7
mov eax, dword [esi]
cmp ecx, edx
mov ebx, eax
lea ebx, [eax + ecx]
mov dword [ebp - 0x1c], eax
mov eax, edx
mov dword [ebp - 0x20], ebx
mov ebx, ecx
jne 0x46b8fa
movzx edx, byte [esi + 8]
xor edi, edi
jmp 0x46b983
movzx edx, byte [esi + 8]
cmp dl, 3
jae 0x46b92b
add edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add edi, dword [ebp - 0x14]
lea ecx, [eax + ecx - 1]
sub edi, eax
nop word cs:[eax + eax]
nop dword [eax]
cmp byte [ecx], 0x5c
je 0x46b961
dec ecx
inc edi
jne 0x46b920
jmp 0x46b8f3
add edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 0xd], dl
mov edx, ebx
add edi, dword [ebp - 0x14]
lea ecx, [eax + ecx - 1]
sub edi, eax
nop
movzx ebx, byte [ecx]
cmp ebx, 0x2f
je 0x46b95b
cmp ebx, 0x5c
je 0x46b95b
dec ecx
inc edi
jne 0x46b940
mov ebx, edx
movzx edx, byte [ebp - 0xd]
xor edi, edi
jmp 0x46b983
not edi
mov ebx, edx
jmp 0x46b966
mov byte [ebp - 0xd], dl
not edi
lea ebx, [ebx + edi + 1]
mov edx, eax
cmp ebx, eax
ja 0x46b9e1
mov eax, dword [ebp - 0x1c]
mov edi, 1
add eax, ebx
mov dword [ebp - 0x20], eax
mov eax, edx
movzx edx, byte [ebp - 0xd]
sub eax, ebx
je 0x46b9a9
mov esi, dword [ebp - 0x20]
mov bl, 9
cmp eax, 2
je 0x46b9b0
cmp eax, 1
jne 0x46b9bf
cmp byte [esi], 0x2e
jne 0x46b9bf
xor ecx, ecx
cmp dl, 3
setae cl
lea ebx, [ecx + ecx*2 + 7]
jmp 0x46b9bf
mov esi, dword [ebp - 0x20]
mov bl, 0xa
jmp 0x46b9bf
cmp byte [esi], 0x2e
jne 0x46b9bf
cmp byte [esi + 1], 0x2e
sete bl
xor bl, 9
mov ecx, dword [ebp - 0x24]
add edi, eax
mov dword [ecx], edi
mov byte [ecx + 4], bl
mov dword [ecx + 8], esi
mov dword [ecx + 0xc], eax
add esp, 0x18
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x5037d4
call fcn.0040cec0
mov ecx, ebx
push 0x5037c4
call fcn.0040cec0
mov ecx, 2
push 0x5037b4
call fcn.0040cec0
loope 0x46b9fe
add byte [eax], al
jmp 0x1846ba05