Function at 0x4651f0
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 0x465258
cmp word [edi + 2], 0x18
jne 0x465258
mov ecx, 0xff
cmp word [edi + 4], cx
jne 0x465258
cmp word [edi + 6], cx
jne 0x465258
mov byte [ebp - 0x25], 1
cmp word [edi + 8], cx
je 0x46525c
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 0x46527f
push ecx
lea ecx, [esi + 0x18]
call fcn.0047c430
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 0x4652a6
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 0x4652b4
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x4652c2
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4652d0
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x64]
test eax, eax
je 0x4652de
mov byte [eax + 0x80], 0
mov eax, dword [esi + 0x78]
test eax, eax
je 0x4652ec
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x88]
test eax, eax
je 0x4652fd
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x7c]
test eax, eax
je 0x46530b
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x46531c
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x80]
test eax, eax
je 0x46532d
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x90]
test eax, eax
je 0x46533e
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x84]
test eax, eax
je 0x46534f
mov byte [eax + 0x111], 0
mov eax, dword [esi + 0x94]
test eax, eax
je 0x465360
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.0047f580
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.00497f12
add esp, 0x10
mov dword [ebp - 0x3c], eax
xor ecx, ecx
cmp dword [0x4fe53c], 2
movd xmm0, eax
pshufd xmm4, xmm0, 0
jl 0x465410
movaps xmm2, xmmword [0x4e1e40]
movaps xmm3, xmmword [0x4e1e50]
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 0x4653e0
mov edx, dword [ebp - 0x30]
jmp 0x46542d
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 0x465420
mov eax, dword [ebp - 0x48]
mov ecx, dword [eax + 0x110]
mov eax, dword [eax + 0x38]
cmp ecx, eax
jae 0x4656c0
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 0x4655f6
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 0x4654c1
mov eax, edx
test edx, edx
je 0x4655d8
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 0x465484
jmp 0x4655d5
cmp word [edi], 0x20
jne 0x46554f
test edx, edx
jle 0x4655db
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 0x4654d6
jmp 0x4655d5
test edx, edx
jle 0x4655db
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 0x465560
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 0x465470
mov esi, dword [ebp - 0x50]
cmp dword [esi + 0x14], 0x65
je 0x465617
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 0x46563e
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 0x46565c
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 0x465671
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 0x465441
push dword [ebp - 0x3c]
call fcn.00497f0d
mov edi, dword [ebp - 0x48]
add esp, 4
mov eax, dword [edi + 0x2c]
cmp eax, 0x65
je 0x4656f7
cmp eax, 0x66
je 0x4656f7
cmp eax, 0x67
je 0x465724
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 0x46571e
mov eax, dword [edi + 0x110]
cmp eax, dword [edi + 0x38]
jae 0x465715
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 0x4657c7
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 0x4657a8
nop dword [eax]
mov ecx, dword [edi + 0x20]
test ecx, ecx
je 0x465771
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 0x465799
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 0x465750
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 0x465734
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 0x465811
mov eax, dword [eax + 0x24]
push 1
push esi
call eax
add esp, 8
cmp byte [edi + 0x28], 0
je 0x46580a
mov dword [edi + 0x2c], 0xc8
mov dword [edi + 0x12c], 0
jmp 0x465811
mov dword [edi + 0x2c], 0x64
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004977bb
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x14