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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x592830]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
mov ebx, edx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x34], edi
cmp edi, 0x18
jae 0x46d59a
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret
test ebx, ebx
jne 0x46d5b2
lea eax, [edi - 0x10]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret
mov eax, dword [str.J_y]
mov dword [ecx + 0x20], eax
mov eax, dword [0x558a30]
push 8
mov dword [ecx + 0x24], eax
push esi
lea eax, [ebp - 0xc]
push eax
push ecx
call fcn.0046cf60
add esp, 0x10
cmp ebx, esi
jne 0x46d5ea
lea eax, [edi - 8]
push eax
lea eax, [ebx + 8]
push eax
push ebx
call fcn.004ebce0
add esp, 0xc
sub esi, 8
lea eax, [edi - 0x10]
push eax
mov dword [ebp - 0x30], eax
lea eax, [esi + 8]
push eax
push ebx
push dword [ebp - 0x2c]
call fcn.0046cf60
push 8
lea eax, [edi - 8]
add eax, esi
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x2c]
call fcn.0046cf60
movzx eax, byte [ebp - 0xc]
mov cl, byte [ebp - 5]
mov byte [ebp - 5], al
movzx eax, byte [ebp - 0xb]
mov byte [ebp - 0xc], cl
mov cl, byte [ebp - 6]
mov byte [ebp - 6], al
movzx eax, byte [ebp - 0xa]
mov byte [ebp - 0xb], cl
mov cl, byte [ebp - 7]
mov byte [ebp - 7], al
movzx eax, byte [ebp - 9]
mov byte [ebp - 0xa], cl
mov cl, byte [ebp - 8]
mov byte [ebp - 8], al
lea eax, [edi - 0x10]
lea esi, [ebx - 1]
mov edi, eax
add esp, 0x20
add esi, eax
shr edi, 1
mov byte [ebp - 9], cl
mov edx, ebx
je 0x46d671
lea esp, [esp]
mov al, byte [edx]
mov cl, byte [esi]
mov byte [esi], al
mov byte [edx], cl
lea esi, [esi - 1]
lea edx, [edx + 1]
dec edi
jne 0x46d660
mov edi, dword [ebp - 0x2c]
movzx eax, byte [ebp - 0x14]
lea esi, [edi + 0x20]
push dword [ebp - 0x30]
mov byte [esi + 7], al
movzx eax, byte [ebp - 0x13]
mov byte [esi + 6], al
movzx eax, byte [ebp - 0x12]
mov byte [esi + 5], al
movzx eax, byte [ebp - 0x11]
mov byte [esi + 4], al
movzx eax, byte [ebp - 0x10]
mov byte [esi + 3], al
movzx eax, byte [ebp - 0xf]
mov byte [esi + 2], al
movzx eax, byte [ebp - 0xe]
mov byte [esi + 1], al
movzx eax, byte [ebp - 0xd]
push ebx
push ebx
push edi
mov byte [esi], al
call fcn.0046cf60
push 8
lea eax, [ebp - 0xc]
push eax
push eax
push edi
call fcn.0046cf60
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x28]
push eax
mov ecx, ebx
call fcn.004b6a50
add esp, 0x24
xor dl, dl
xor ecx, ecx
jmp 0x46d6e0
mov al, byte [ebp + ecx - 0x28]
xor al, byte [ebp + ecx - 0xc]
inc ecx
or dl, al
cmp ecx, 8
jb 0x46d6e0
test dl, dl
jne 0x46d6fc
mov edi, dword [ebp - 0x34]
add edi, 0xfffffff0
jmp 0x46d6ff
or edi, 0xffffffff
push 8
lea eax, [ebp - 0xc]
push 0
push eax
mov eax, dword [fcn.004f2670]
call eax
push 0x14
lea eax, [ebp - 0x28]
push 0
push eax
mov eax, dword [fcn.004f2670]
call eax
push 8
lea eax, [ebp - 0x14]
push 0
push eax
mov eax, dword [fcn.004f2670]
call eax
mov eax, dword [fcn.004f2670]
push 8
push 0
push esi
call eax
add esp, 0x30
cmp edi, 0xffffffff
jne 0x46d751
push dword [ebp - 0x30]
mov ecx, dword [fcn.004f2670]
push 0
push ebx
call ecx
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ebb9e
mov esp, ebp
pop ebp
ret