Function at 0x4646e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x4fa008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x10]
push esi
push edi
mov edi, dword [ebx + 0xc]
mov esi, ecx
movd xmm0, eax
pshufd xmm0, xmm0, 0
mov dword [ebp - 0x48], esi
cmp word [edi], 0x20
mov dword [ebp - 0x30], eax
movaps xmmword [ebp - 0x60], xmm0
jne 0x464748
cmp word [edi + 2], 0x18
jne 0x464748
mov ecx, 0xff
cmp word [edi + 4], cx
jne 0x464748
cmp word [edi + 6], cx
jne 0x464748
mov byte [ebp - 0x25], 1
cmp word [edi + 8], cx
je 0x46474c
mov byte [ebp - 0x25], 0
mov edx, dword [esi + 8]
mov dword [esi + 0x34], eax
mov eax, dword [ebx + 0x14]
mov dword [esi + 0x38], eax
cmp edx, dword [esi + 4]
je 0x46476f
push ecx
lea ecx, [esi + 0x18]
call fcn.0047b940
mov eax, dword [esi + 8]
add esp, 4
mov dword [esi + 4], eax
add esi, 0x18
mov dword [ebp - 0x50], esi
cmp dword [esi + 0x14], 0x64
je 0x464796
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0x58]
test eax, eax
je 0x4647a4
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x4647b2
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4647c0
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x64]
test eax, eax
je 0x4647ce
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x78]
test eax, eax
je 0x4647dc
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x88]
test eax, eax
je 0x4647ed
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x4647fb
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x46480c
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x80]
test eax, eax
je 0x46481d
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x90]
test eax, eax
je 0x46482e
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x84]
test eax, eax
je 0x46483f
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x94]
test eax, eax
je 0x464850
mov byte [eax + 0x111], 0
mov eax, dword [esi]
push esi
mov eax, dword [eax + 0x10]
call eax
mov eax, dword [esi + 0x18]
push esi
mov eax, dword [eax + 8]
call eax
mov ecx, esi
call fcn.0047ea90
mov eax, dword [esi + 0x178]
push esi
mov eax, dword [eax]
call eax
xor eax, eax
mov dword [esi + 0xf8], 0
cmp byte [esi + 0xd0], al
setne al
add eax, 0x65
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x30]
lea eax, [eax + eax*2]
shl eax, 3
push eax
call fcn.00497402
add esp, 0x10
mov dword [ebp - 0x3c], eax
xor ecx, ecx
cmp dword [0x4fe534], 2
movd xmm0, eax
pshufd xmm4, xmm0, 0
jl 0x464900
movaps xmm2, xmmword [0x4e1780]
movaps xmm3, xmmword [0x4e1790]
movaps xmm5, xmmword [ebp - 0x60]
nop dword [eax]
movd xmm0, ecx
movaps xmm1, xmm5
pshufd xmm0, xmm0, 0
paddd xmm0, xmm2
pmulld xmm1, xmm0
pmulld xmm1, xmm3
paddd xmm1, xmm4
movups xmmword [ebp + ecx*4 - 0x24], xmm1
add ecx, 4
cmp ecx, 8
jl 0x4648d0
mov edx, dword [ebp - 0x30]
jmp 0x46491d
mov edx, dword [ebp - 0x30]
lea eax, [edx + edx*2]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
nop dword [eax]
mov dword [ebp + ecx*4 - 0x24], eax
inc ecx
add eax, dword [ebp - 0x40]
cmp ecx, 8
jl 0x464910
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax + 0x110]
mov eax, dword [eax + 0x38]
cmp ecx, eax
jae 0x464bb0
sub eax, ecx
mov dword [ebp - 0x44], 0
mov ecx, eax
mov dword [ebp - 0x2c], eax
cmp ecx, 8
mov eax, 8
cmovg ecx, eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
jle 0x464ae6
mov ecx, dword [ebx + 8]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x2c]
nop
cmp byte [ebp - 0x25], 0
mov esi, dword [ebp + esi*4 - 0x24]
je 0x4649b1
mov eax, edx
test edx, edx
je 0x464ac8
mov edx, dword [ecx]
lea esi, [esi + 3]
dec eax
add ecx, 4
mov dword [ebp - 0x38], eax
mov eax, edx
mov dword [ebp - 0x34], ecx
movzx ecx, byte [edi + 0xa]
shr eax, cl
mov byte [esi - 3], al
mov eax, edx
movzx ecx, byte [edi + 0xc]
shr eax, cl
mov byte [esi - 2], al
movzx ecx, byte [edi + 0xe]
mov eax, dword [ebp - 0x38]
shr edx, cl
mov ecx, dword [ebp - 0x34]
mov byte [esi - 1], dl
test eax, eax
jne 0x464974
jmp 0x464ac5
cmp word [edi], 0x20
jne 0x464a3f
test edx, edx
jle 0x464acb
mov dword [ebp - 0x38], edx
mov eax, dword [ecx]
lea esi, [esi + 3]
movzx edi, word [edi + 4]
add ecx, 4
mov dword [ebp - 0x34], eax
xor edx, edx
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebx + 0xc]
movzx ecx, byte [ecx + 0xa]
shr eax, cl
and eax, edi
mov ecx, dword [ebx + 0xc]
imul eax, eax, 0xff
div edi
xor edx, edx
mov byte [esi - 3], al
movzx edi, word [ecx + 6]
movzx ecx, byte [ecx + 0xc]
mov eax, dword [ebp - 0x34]
shr eax, cl
and eax, edi
imul eax, eax, 0xff
div edi
xor edx, edx
mov byte [esi - 2], al
mov eax, dword [ebx + 0xc]
movzx edi, word [eax + 8]
movzx ecx, byte [eax + 0xe]
mov eax, dword [ebp - 0x34]
shr eax, cl
and eax, edi
mov ecx, dword [ebp - 0x4c]
imul eax, eax, 0xff
div edi
sub dword [ebp - 0x38], 1
mov edi, dword [ebx + 0xc]
mov byte [esi - 1], al
jne 0x4649c6
jmp 0x464ac5
test edx, edx
jle 0x464acb
mov dword [ebp - 0x34], edx
nop word [eax + eax]
movzx eax, word [ecx]
lea esi, [esi + 3]
movzx edi, word [edi + 4]
add ecx, 2
mov dword [ebp - 0x38], eax
xor edx, edx
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebx + 0xc]
movzx ecx, byte [ecx + 0xa]
shr eax, cl
and eax, edi
mov ecx, dword [ebx + 0xc]
imul eax, eax, 0xff
div edi
xor edx, edx
mov byte [esi - 3], al
movzx edi, word [ecx + 6]
movzx ecx, byte [ecx + 0xc]
mov eax, dword [ebp - 0x38]
shr eax, cl
and eax, edi
imul eax, eax, 0xff
div edi
xor edx, edx
mov byte [esi - 2], al
mov eax, dword [ebx + 0xc]
movzx edi, word [eax + 8]
movzx ecx, byte [eax + 0xe]
mov eax, dword [ebp - 0x38]
shr eax, cl
and eax, edi
mov ecx, dword [ebp - 0x4c]
imul eax, eax, 0xff
div edi
sub dword [ebp - 0x34], 1
mov edi, dword [ebx + 0xc]
mov byte [esi - 1], al
jne 0x464a50
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebx + 8]
inc esi
add ecx, dword [ebx + 0x18]
mov dword [ebx + 8], ecx
mov dword [ebp - 0x44], esi
cmp esi, eax
jl 0x464960
mov esi, dword [ebp - 0x50]
cmp dword [esi + 0x14], 0x65
je 0x464b07
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0xf8]
cmp eax, dword [esi + 0x20]
jb 0x464b2e
mov eax, dword [esi]
push 0xffffffffffffffff
push esi
mov dword [eax + 0x14], 0x7e
mov eax, dword [esi]
mov eax, dword [eax + 4]
call eax
mov eax, dword [esi + 0xf8]
add esp, 8
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x464b4c
mov dword [ecx + 4], eax
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0x20]
push esi
mov dword [ecx + 8], eax
mov eax, dword [esi + 8]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [esi + 0x178]
cmp byte [eax + 0xc], 0
je 0x464b61
mov eax, dword [eax + 4]
push esi
call eax
add esp, 4
mov eax, dword [esi + 0x20]
sub eax, dword [esi + 0xf8]
cmp dword [ebp - 0x2c], eax
mov ecx, dword [esi + 0x17c]
cmovbe eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ecx + 4]
push esi
call eax
mov eax, dword [ebp - 0x40]
add esp, 0x10
add dword [esi + 0xf8], eax
mov eax, dword [ebp - 0x48]
mov edx, dword [ebp - 0x30]
mov ecx, dword [eax + 0x110]
mov eax, dword [eax + 0x38]
cmp ecx, eax
jb 0x464931
push dword [ebp - 0x3c]
call fcn.004973fd
mov edi, dword [ebp - 0x48]
add esp, 4
mov eax, dword [edi + 0x2c]
cmp eax, 0x65
je 0x464be7
cmp eax, 0x66
je 0x464be7
cmp eax, 0x67
je 0x464c14
mov eax, dword [esi]
mov dword [eax + 0x14], 0x15
mov ecx, dword [esi]
mov eax, dword [edi + 0x2c]
mov dword [ecx + 0x18], eax
mov eax, dword [esi]
mov eax, dword [eax]
jmp 0x464c0e
mov eax, dword [edi + 0x110]
cmp eax, dword [edi + 0x38]
jae 0x464c05
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x45
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [edi + 0x190]
mov eax, dword [eax + 8]
push esi
call eax
add esp, 4
mov eax, dword [edi + 0x190]
cmp byte [eax + 0xd], 0
jne 0x464cb7
mov eax, dword [eax]
push esi
call eax
xor eax, eax
add esp, 4
mov dword [ebp - 0x3c], eax
cmp dword [edi + 0x128], eax
jbe 0x464c98
nop dword [eax]
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x464c61
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0x20]
mov eax, dword [edi + 0x128]
push esi
mov dword [ecx + 8], eax
mov eax, dword [edi + 0x20]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [edi + 0x19c]
push 0
push esi
mov eax, dword [eax + 4]
call eax
add esp, 8
test al, al
jne 0x464c89
mov eax, dword [esi]
push esi
mov dword [eax + 0x14], 0x19
mov eax, dword [esi]
mov eax, dword [eax]
call eax
add esp, 4
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x3c], eax
cmp eax, dword [edi + 0x128]
jb 0x464c40
mov eax, dword [edi + 0x190]
push esi
mov eax, dword [eax + 8]
call eax
mov eax, dword [edi + 0x190]
add esp, 4
cmp byte [eax + 0xd], 0
je 0x464c24
mov eax, dword [edi + 0x1a0]
push esi
mov eax, dword [eax + 0xc]
call eax
mov eax, dword [edi + 0x30]
push esi
mov eax, dword [eax + 0x10]
call eax
mov eax, dword [edi + 0x1c]
add esp, 8
test eax, eax
je 0x464d01
mov eax, dword [eax + 0x24]
push 1
push esi
call eax
add esp, 8
cmp byte [edi + 0x28], 0
je 0x464cfa
mov dword [edi + 0x2c], 0xc8
mov dword [edi + 0x12c], 0
jmp 0x464d01
mov dword [edi + 0x2c], 0x64
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00496cab
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14