Function at 0x663080
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x3c
push ebx
push esi
push edi
call fcn.00532790
mov edi, eax
mov eax, dword [0xeebb38]
sub eax, 0
je 0x663484
dec eax
je 0x663241
dec eax
jne 0x6635db
push 0x10
mov ebx, 1
push ebx
call fcn.00505a10
add esp, 8
test eax, eax
je 0x6635db
push ebx
call fcn.0066e660
push ebx
call fcn.00639310
add esp, 8
mov eax, 0xd927c7
mov edx, 0x16
lea ebx, [ebx]
movzx ecx, byte [eax + 1]
movzx esi, byte [eax]
lea ecx, [ecx + ecx*4]
lea ecx, [esi + ecx*8]
imul ecx, ecx, 0x110
cmp byte [ecx + 0xeb65d4], 0
je 0x663102
mov byte [eax - 0xd6], bl
add eax, 0x4c0
dec edx
jne 0x6630e0
mov edx, dword [0x91d3f0]
fld dword [edx + 0x10]
call fcn.0043bd30
mov word [edi + 0x26], ax
mov eax, dword [0x91d3f0]
fld dword [eax + 0x18]
call fcn.0043bd30
mov word [edi + 0x28], ax
mov ecx, dword [0x91cfa4]
push 2
push 2
mov byte [ecx + 0xb8], 0
call fcn.0042a8c0
mov edx, dword [0x91cfa4]
mov byte [edx + 0x1b], bl
mov esi, dword [0x91d3f0]
fld dword [esi + 0x18]
add esp, 8
call fcn.0043bd30
test eax, eax
jg 0x663163
neg eax
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fcomp dword [0x8cb958]
fnstsw ax
test ah, 5
jp 0x6635db
fld dword [esi + 0x10]
fcomp dword [0x8cb954]
fnstsw ax
test ah, 0x41
jne 0x6635db
mov esi, 0xd929b4
mov edi, 0x16
mov ebx, 0x4000
nop
lea eax, [esp + 0x2c]
push eax
call fcn.00511030
mov eax, dword [esp + 0x48]
add esp, 4
test eax, eax
je 0x6631cb
push 0
lea ecx, [esi - 0x2c4]
push 0x3e6
push ecx
call fcn.0061e910
add esp, 0xc
lea edx, [esi - 0x2c4]
push edx
mov word [esi - 0x1da], bx
call fcn.00662dc0
fstp dword [esi]
lea eax, [esp + 0x14]
push eax
call fcn.00511030
mov al, byte [esi - 0x1eb]
add esp, 8
test al, al
je 0x6631fd
fld dword [esp + 0x24]
jmp 0x663201
fld dword [esp + 0x18]
fstp dword [esi + 8]
mov byte [esi - 0x1ea], 0xff
mov word [esi - 0x1e8], 0
add esi, 0x4c0
dec edi
jne 0x6631a0
mov ecx, dword [0x91cfa4]
push 3
push 3
mov byte [ecx + 0xb8], 3
call fcn.0042a8c0
add esp, 8
pop edi
pop esi
pop ebx
add esp, 0x3c
jmp fcn.00831100
push 0x15
call fcn.00830ce0
push 0x10
push 0
call fcn.00505a10
add esp, 0xc
test eax, eax
je 0x6635db
mov edx, dword [0x91d3f0]
fld dword [edx + 0x10]
call fcn.0043bd30
mov word [edi + 0x2a], ax
mov eax, dword [0x91d3f0]
fld dword [eax + 0x18]
call fcn.0043bd30
mov word [edi + 0x2c], ax
mov eax, 0xeb648d
mov byte [eax], 0xff
add eax, 0x1a
cmp eax, 0xeb655d
jl 0x663284
or dl, 0xff
xor ecx, ecx
mov eax, 0xeb6480
jmp 0x6632a0
cmp byte [eax], 7
jbe 0x6632b2
add eax, 0x1a
inc ecx
cmp eax, 0xeb6550
jl 0x6632a0
jmp 0x6632b4
mov dl, cl
mov ecx, dword [0x91cfa8]
mov al, byte [ecx + 0x74]
cmp al, 7
ja 0x6632d5
movzx ecx, al
imul ecx, ecx, 0x38
mov eax, dword [ecx + 0xe73ec8]
mov esi, dword [ecx + 0xe73ecc]
jmp 0x663323
cmp dl, 0xff
je 0x663318
mov al, byte [0xd926f0]
mov bl, byte [0xd927d8]
movzx edx, dl
imul edx, edx, 0x1a
push 0xd926f0
mov byte [edx + 0xeb648d], al
mov byte [0xd927d8], 0
call fcn.006c9570
mov eax, dword [0xd928a0]
mov esi, dword [0xd928a4]
add esp, 4
mov byte [0xd927d8], bl
jmp 0x663323
mov eax, dword [0xe73ec8]
mov esi, dword [0xe73ecc]
cmp word [0xee8be6], 0
jne 0x663336
push eax
call fcn.006c9310
add esp, 4
test al, 8
mov edx, 0xffffffc0
je 0x663343
add word [edi + 0x2a], dx
movzx ecx, byte [edi + 0x2e]
dec ecx
je 0x66334d
dec ecx
jne 0x663367
mov ecx, dword [0x91cfa4]
dec dword [ecx + 8]
mov ecx, dword [0x91cfa4]
mov ebx, dword [ecx + 8]
test ebx, ebx
jne 0x663367
mov byte [edi + 0x2e], 0
test al, 2
mov ecx, 0x40
je 0x663374
add word [edi + 0x2a], cx
test al, 1
je 0x66337c
add word [edi + 0x2c], dx
test al, 4
je 0x663384
add word [edi + 0x2c], cx
test esi, 0xb0000
je 0x663396
push 3
call fcn.0042a910
add esp, 4
movsx edx, word [edi + 0x2a]
mov dword [esp + 0xc], edx
fild dword [esp + 0xc]
fcomp dword [0x8cb644]
fnstsw ax
test ah, 5
jp 0x6633b5
mov word [edi + 0x2a], 0xd0fa
movsx eax, word [edi + 0x2c]
test eax, eax
jg 0x6633bf
neg eax
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fcomp dword [0x8d3694]
fnstsw ax
test ah, 0x41
je 0x66343b
movsx eax, word [edi + 0x2a]
mov dword [esp + 0xc], eax
fild dword [esp + 0xc]
fst dword [esp + 0xc]
fcomp dword [0x8d3690]
fnstsw ax
test ah, 0x41
je 0x66343b
fld dword [esp + 0xc]
fcomp dword [0x8cb644]
fnstsw ax
test ah, 0x41
jnp 0x66343b
mov ecx, dword [0x91d3f0]
fld dword [esp + 0xc]
fstp dword [ecx + 0x10]
movsx edx, word [edi + 0x2c]
mov eax, dword [0x91d3f0]
mov dword [esp + 0xc], edx
push 0xd926f0
fild dword [esp + 0x10]
fstp dword [eax + 0x18]
call fcn.0065e990
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x3c
jmp fcn.00831100
mov ecx, dword [0xeebb14]
movzx ecx, byte [ecx + 0x87158c]
shl ecx, 1
mov eax, 0x55555556
imul ecx
mov ecx, dword [0x91cfa4]
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [ecx + 8], edx
mov al, byte [edi + 0x2e]
test al, al
jne 0x663475
push 0x6c008561
call fcn.005617c0
add esp, 4
mov byte [edi + 0x2e], 2
pop edi
pop esi
pop ebx
add esp, 0x3c
jmp fcn.00831100
mov edx, dword [0x91d3f0]
push 0x10
mov ebx, 1
mov byte [0x91cfe0], 0
push ebx
mov dword [edx + 0x58], 0
call fcn.00505a10
add esp, 8
test eax, eax
je 0x6635db
push 0
push 0
call fcn.00643a80
call fcn.0061f5b0
push 0
call fcn.00830ce0
mov ecx, dword [0x91cfa4]
mov al, byte [ecx + 0x1b]
add esp, 0xc
cmp al, 0xff
je 0x6634e2
movzx eax, al
cdq
mov esi, 0x17
idiv esi
jmp 0x6634e4
mov edx, ebx
imul edx, edx, 0x4c0
add edx, 0xd92230
movzx eax, byte [edx + 0xd8]
mov byte [eax + ecx + 0x35], 0
movzx ecx, byte [edx + 0xd8]
mov edx, dword [0x91cfa4]
xor ecx, ebx
mov byte [ecx + edx + 0x35], bl
mov esi, 0xd926f0
mov eax, 0x16
lea esp, [esp]
mov byte [esi + 1], 0
add esi, 0x4c0
dec eax
jne 0x663520
mov eax, dword [0x91d3f0]
mov byte [eax + 0x6a], 0
movsx ecx, word [edi + 0x26]
mov edx, dword [0x91d3f0]
mov dword [esp + 0xc], ecx
push 3
fild dword [esp + 0x10]
fstp dword [edx + 0x1c]
mov eax, dword [0x91d3f0]
mov ecx, dword [eax + 0x1c]
mov dword [eax + 0x10], ecx
movsx edx, word [edi + 0x28]
mov eax, dword [0x91d3f0]
mov dword [esp + 0x10], edx
fild dword [esp + 0x10]
fstp dword [eax + 0x24]
mov eax, dword [0x91d3f0]
mov ecx, dword [eax + 0x24]
mov dword [eax + 0x18], ecx
mov edx, dword [0x91d3f0]
mov eax, 0xc1e00000
mov dword [edx + 0x20], eax
mov ecx, dword [0x91d3f0]
mov dword [ecx + 0x14], eax
mov edx, dword [0x91cfa4]
mov dword [edx + 0xd0], 0x7fff
call fcn.0042a910
call fcn.00663cc0
push esi
call fcn.0065e990
add esp, 8
mov byte [edi + 0x2e], 0
call fcn.00635940
test eax, eax
je 0x6635b5
push 0
push esi
call fcn.006439c0
mov eax, dword [0x91cfa8]
xor ecx, ecx
mov cl, byte [eax + 0x76]
and cl, bl
push ecx
call fcn.006525d0
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x3c
jmp fcn.00831100