Function at 0x4645f0
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 0x464658
cmp word [edi + 2], 0x18
jne 0x464658
mov ecx, 0xff
cmp word [edi + 4], cx
jne 0x464658
cmp word [edi + 6], cx
jne 0x464658
mov byte [ebp - 0x25], 1
cmp word [edi + 8], cx
je 0x46465c
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 0x46467f
push ecx
lea ecx, [esi + 0x18]
call fcn.0047b860
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 0x4646a6
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 0x4646b4
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x4646c2
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4646d0
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x64]
test eax, eax
je 0x4646de
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x78]
test eax, eax
je 0x4646ec
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x88]
test eax, eax
je 0x4646fd
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x46470b
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x46471c
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x80]
test eax, eax
je 0x46472d
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x90]
test eax, eax
je 0x46473e
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x84]
test eax, eax
je 0x46474f
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x94]
test eax, eax
je 0x464760
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.0047e9b0
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.00497312
add esp, 0x10
mov dword [ebp - 0x3c], eax
xor ecx, ecx
cmp dword [0x4fe534], 2
movd xmm0, eax
pshufd xmm4, xmm0, 0
jl 0x464810
movaps xmm2, xmmword [0x4e1700]
movaps xmm3, xmmword [0x4e1710]
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 0x4647e0
mov edx, dword [ebp - 0x30]
jmp 0x46482d
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 0x464820
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax + 0x110]
mov eax, dword [eax + 0x38]
cmp ecx, eax
jae 0x464ac0
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 0x4649f6
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 0x4648c1
mov eax, edx
test edx, edx
je 0x4649d8
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 0x464884
jmp 0x4649d5
cmp word [edi], 0x20
jne 0x46494f
test edx, edx
jle 0x4649db
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 0x4648d6
jmp 0x4649d5
test edx, edx
jle 0x4649db
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 0x464960
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 0x464870
mov esi, dword [ebp - 0x50]
cmp dword [esi + 0x14], 0x65
je 0x464a17
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 0x464a3e
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 0x464a5c
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 0x464a71
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 0x464841
push dword [ebp - 0x3c]
call fcn.0049730d
mov edi, dword [ebp - 0x48]
add esp, 4
mov eax, dword [edi + 0x2c]
cmp eax, 0x65
je 0x464af7
cmp eax, 0x66
je 0x464af7
cmp eax, 0x67
je 0x464b24
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 0x464b1e
mov eax, dword [edi + 0x110]
cmp eax, dword [edi + 0x38]
jae 0x464b15
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 0x464bc7
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 0x464ba8
nop dword [eax]
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x464b71
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 0x464b99
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 0x464b50
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 0x464b34
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 0x464c11
mov eax, dword [eax + 0x24]
push 1
push esi
call eax
add esp, 8
cmp byte [edi + 0x28], 0
je 0x464c0a
mov dword [edi + 0x2c], 0xc8
mov dword [edi + 0x12c], 0
jmp 0x464c11
mov dword [edi + 0x2c], 0x64
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00496bbb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14