Function at 0x46e670
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [edi + 0x164]
push ebp
xor al, al
cmp dword [ebx + 0x9c], 0
push esi
mov dword [esp + 0xc], ebx
je 0x46e4aa
mov eax, dword [edi + 0x1ac]
cmp eax, dword [edi + 0x1a8]
jne 0x46e430
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov ecx, dword [edi + 0x1ac]
mov byte [ecx], 0x3d
add dword [edi + 0x1ac], 1
cmp byte [edi + 0x1d8], 0
mov edx, dword [ebx + 0x9c]
mov eax, dword [edi + 0x1ac]
mov ebp, dword [edx + 0x14]
je 0x46e45b
sub ebp, 1
xor ebx, ebx
test ebp, ebp
jle 0x46e4a8
cmp eax, dword [edi + 0x1a8]
jne 0x46e47c
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 0x9c]
mov edx, dword [ecx + 0x10]
mov eax, dword [edi + 0x1ac]
mov cl, byte [ebx + edx]
mov byte [eax], cl
add dword [edi + 0x1ac], 1
mov eax, dword [edi + 0x1ac]
add ebx, 1
cmp ebx, ebp
jl 0x46e461
mov al, 1
mov edx, dword [esp + 0xc]
mov ecx, dword [edx + 0x3c]
mov edx, dword [edx + 0x44]
lea edx, [ecx + edx*4]
mov dword [esp + 0x18], edx
jmp 0x46e4c0
cmp ecx, edx
je 0x46e4d5
mov ebx, dword [ecx]
add ecx, 4
test ebx, ebx
mov dword [esp + 0x14], ecx
jne 0x46e53f
cmp ecx, edx
jne 0x46e4c4
mov ecx, dword [esp + 0xc]
mov ebx, dword [ecx]
mov edx, ecx
mov ecx, dword [edx + 8]
lea ecx, [ebx + ecx*4]
mov dword [esp + 0x18], ecx
cmp ebx, ecx
je 0x46e501
jmp 0x46e4f0
mov ebp, dword [ebx]
add ebx, 4
test ebp, ebp
jne 0x46e676
cmp ebx, ecx
jne 0x46e4f0
mov ecx, dword [edi + 0x1ac]
cmp ecx, dword [edi + 0x1a8]
jne 0x46e522
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov edx, dword [edi + 0x1ac]
pop esi
mov byte [edx], 0
add dword [edi + 0x1ac], 1
mov eax, dword [edi + 0x1b0]
pop ebp
pop ebx
add esp, 0x10
ret
cmp dword [ebx + 4], 0
je 0x46e4c0
test al, al
je 0x46e57e
mov eax, dword [edi + 0x1ac]
cmp eax, dword [edi + 0x1a8]
jne 0x46e56e
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov ecx, dword [edi + 0x1ac]
mov byte [ecx], 0xc
add dword [edi + 0x1ac], 1
mov ebp, dword [ebx]
cmp byte [ebp], 0
je 0x46e5cc
jmp 0x46e590
mov edx, dword [edi + 0x1ac]
cmp edx, dword [edi + 0x1a8]
jne 0x46e5b1
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov cl, byte [ebp]
mov eax, dword [edi + 0x1ac]
mov byte [eax], cl
add dword [edi + 0x1ac], 1
add ebp, 1
cmp byte [ebp], 0
jne 0x46e590
mov edx, dword [edi + 0x1ac]
cmp edx, dword [edi + 0x1a8]
jne 0x46e5ed
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov eax, dword [edi + 0x1ac]
mov byte [eax], 0x3d
add dword [edi + 0x1ac], 1
cmp byte [edi + 0x1d8], 0
mov ecx, dword [ebx + 4]
mov ecx, dword [ecx + 0x14]
mov eax, dword [edi + 0x1ac]
mov dword [esp + 0x10], ecx
je 0x46e61d
sub ecx, 1
mov dword [esp + 0x10], ecx
xor ebp, ebp
test ecx, ecx
jle 0x46e667
cmp eax, dword [edi + 0x1a8]
jne 0x46e642
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 4]
mov eax, dword [edx + 0x10]
mov al, byte [eax + ebp]
mov edx, dword [edi + 0x1ac]
mov byte [edx], al
add dword [edi + 0x1ac], 1
mov eax, dword [edi + 0x1ac]
add ebp, 1
cmp ebp, ecx
jl 0x46e623
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov al, 1
jmp 0x46e4c0
cmp byte [ebp + 0x20], 0
je 0x46e4e7
test al, al
je 0x46e6b5
mov edx, dword [edi + 0x1ac]
cmp edx, dword [edi + 0x1a8]
jne 0x46e6a1
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov eax, dword [edi + 0x1ac]
mov ecx, dword [esp + 0x18]
mov byte [eax], 0xc
add dword [edi + 0x1ac], 1
mov ebp, dword [ebp]
cmp byte [ebp], 0
je 0x46e6fc
mov edi, edi
mov ecx, dword [edi + 0x1ac]
cmp ecx, dword [edi + 0x1a8]
jne 0x46e6dd
lea esi, [edi + 0x1a0]
call fcn.0046d9d0
test al, al
je 0x46e703
mov al, byte [ebp]
mov edx, dword [edi + 0x1ac]
mov byte [edx], al
add dword [edi + 0x1ac], 1
add ebp, 1
cmp byte [ebp], 0
jne 0x46e6c0
mov ecx, dword [esp + 0x18]
mov al, 1
jmp 0x46e4e7
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret