Function at 0x46ccac
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x20], 0
je 0x46d268
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x20]
imul dword [edx + 0xc]
test eax, eax
je 0x46d268
cmp dword [ebp - 0x24], 0
je 0x46d268
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 8]
mov edx, dword [ebp - 0x24]
imul dword [edx + 0xc]
test eax, eax
je 0x46d268
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x46d27c
call fcn.00404e60
jne 0x46cd43
mov eax, dword [0x4e1fb8]
mov eax, dword [eax + 8]
call fcn.00403518
mov edx, eax
mov eax, dword [0x4e1fb8]
call fcn.00419e70
mov edx, dword [eax + 0xc]
mov eax, dword [0x4e1fb8]
call fcn.0046d6d4
mov dword [ebp - 0x10], eax
jmp 0x46cd56
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x40]
mov eax, dword [0x4e1fb8]
call fcn.0046d6d4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x46d2a4
call fcn.00404e60
je 0x46cd7f
cmp dword [ebp - 0x10], 0
je 0x46d268
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
je 0x46d268
mov dword [ebp - 0x18], 0x3c23d70a
mov dl, 1
mov eax, dword [0x468030]
call fcn.0046878c
mov dword [ebp - 0x1c], eax
xor edi, edi
push ebp
push 0x46d25e
push dword fs:[edi]
mov dword fs:[edi], esp
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0xc]
mov eax, dword [ebp - 0x20]
mov edx, dword [eax + 8]
mov eax, dword [ebp - 0x1c]
call fcn.00468b94
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x38]
cdq
idiv ecx
mov edx, dword [ebp + 8]
mov ebx, dword [edx + 0x3c]
cdq
idiv ebx
inc eax
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0xc]
cdq
idiv ecx
cdq
idiv ebx
inc eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x46d2a4
call fcn.00404e60
je 0x46ce65
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 4]
sub al, 1
jb 0x46ce06
je 0x46ce41
jmp 0x46cfb8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
mov dword [0x4fb5ec], eax
mov eax, dword [0x4fb5ec]
call fcn.00402acc
mov dword [0x4fb5f0], eax
mov eax, dword [ebp + 8]
cmp byte [eax + 0x44], 0
je 0x46cfb8
mov eax, dword [0x4fb5ec]
call fcn.00402acc
mov dword [0x4fb5f4], eax
jmp 0x46cfb8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
add eax, eax
lea eax, [eax + eax*2]
mov dword [0x4fb5ec], eax
mov eax, dword [0x4fb5ec]
call fcn.00402acc
mov dword [0x4fb5f8], eax
jmp 0x46cfb8
mov eax, dword [ebp - 0x28]
imul dword [ebp - 0x2c]
mov dword [0x4fb5ec], eax
mov eax, dword [0x4fb5ec]
call fcn.00402acc
mov dword [0x4fb5f0], eax
mov eax, dword [0x4fb5ec]
call fcn.00402acc
mov dword [0x4fb5f4], eax
mov dl, 1
mov eax, dword [0x426824]
call fcn.0042c9dc
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 8]
mov al, byte [eax + 0x44]
sub al, 1
je 0x46ceab
sub al, 2
jne 0x46ceef
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x2c]
xor edx, edx
xor eax, eax
call fcn.00418790
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x30]
call fcn.0042cfac
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.004285b0
jmp 0x46cf31
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x40]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp - 0x28]
xor edx, edx
xor eax, eax
call fcn.00418790
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x30]
call fcn.0042cfac
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x48]
pop edx
call fcn.004285b0
mov dl, 1
mov eax, dword [0x468030]
call fcn.0046878c
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x28]
dec eax
test eax, eax
jl 0x46cfa8
inc eax
mov dword [ebp - 0x38], eax
xor edx, edx
mov ecx, dword [ebp - 0x2c]
dec ecx
test ecx, ecx
jl 0x46cfa2
inc ecx
xor eax, eax
mov esi, eax
imul esi, dword [ebp - 0x28]
add esi, edx
mov ebx, dword [ebp - 0x34]
mov ebx, dword [ebx + 4]
mov bl, byte [ebx + esi*4]
and bl, 0xff
push ebx
mov ebx, dword [0x4fb5f0]
lea edi, [ebx + esi]
pop ebx
mov byte [edi], bl
mov ebx, dword [ebp - 0x34]
mov ebx, dword [ebx + 4]
mov bl, byte [ebx + esi*4]
and bl, 0xff
push ebx
mov ebx, dword [0x4fb5f4]
lea esi, [ebx + esi]
pop ebx
mov byte [esi], bl
inc eax
dec ecx
jne 0x46cf64
inc edx
dec dword [ebp - 0x38]
jne 0x46cf59
mov eax, dword [ebp - 0x34]
call fcn.00403c6c
mov eax, dword [ebp - 0x30]
call fcn.00403c6c
mov dl, 1
mov eax, dword [0x46c32c]
call fcn.004717b4
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x46d11b
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x46d0f3
lea eax, [ebp - 0x14]
call fcn.00471898
xor eax, eax
push ebp
push 0x46d0c5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
fild dword [eax + 0x34]
fdivr dword [ebp - 0x18]
fmul dword [0x46d2c4]
call fcn.00402f84
mov ebx, eax
cmp ebx, 0x64
jle 0x46d010
mov ebx, 0x64
push 0
xor ecx, ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
call fcn.004694b4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x40]
mov edx, 0x46d2a4
call fcn.00404e60
je 0x46d09b
mov eax, dword [ebp - 0x10]
mov al, byte [eax + 4]
sub al, 1
jb 0x46d043
je 0x46d063
dec al
je 0x46d083
jmp 0x46d0b2
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.0046c384
jmp 0x46d0b2
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.0046c5fc
jmp 0x46d0b2
mov eax, dword [ebp + 8]
push eax
push ebx
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x1c]
call fcn.0046cc6c
jmp 0x46d0b2
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push eax
push ebx
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
call fcn.0046ca68
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46d0cc
call fcn.00467f40
ret
mov eax, dword [ebp + 8]
fild dword [eax + 0x34]
fcomp dword [ebp - 0x18]
fnstsw ax
sahf
ja 0x46cfda
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46d122
mov eax, dword [ebp - 0x14]
call fcn.00403c6c
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc