Function at 0x5a25e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x20
push ebp
push esi
mov esi, ecx
push edi
push 0x212
mov dword [esp + 0x2c], esi
mov ecx, dword [esi]
call fcn.0059dcf0
test eax, eax
je 0x5a262c
movzx ecx, word [eax + 8]
mov edx, ecx
mov word [esi + 0x3a], cx
movzx eax, word [eax + 0xa]
mov word [esi + 0x38], ax
cmp edx, 1
je 0x5a261d
cmp edx, 2
je 0x5a261d
cmp edx, 4
jne 0x5a262c
cmp eax, 1
je 0x5a2633
cmp eax, 2
je 0x5a2633
cmp eax, 4
je 0x5a2633
mov dword [esi + 0x38], 0x20002
mov ecx, dword [esi]
push 0x103
call fcn.0059dcf0
mov ecx, dword [esi]
mov edi, 1
movzx eax, word [ecx + 0x3a]
cmp eax, 7
je 0x5a2654
cmp eax, 6
jne 0x5a265b
mov dword [esi + 0x38], 0x10001
push 0x213
call fcn.0059dcf0
test eax, eax
je 0x5a2681
mov ecx, eax
call fcn.0059d4e0
movzx eax, ax
mov word [esi + 0x3c], ax
cmp eax, 1
je 0x5a2685
cmp eax, 2
je 0x5a2685
mov word [esi + 0x3c], di
mov ecx, dword [esi]
push 0x211
call fcn.0059dcf0
lea edi, [esi + 0x18]
test eax, eax
je 0x5a26ab
mov ecx, dword [esi]
push dword [ecx + 0x60]
mov ecx, eax
push 3
push edi
call fcn.0059cca0
test eax, eax
jns 0x5a26c5
fld qword [0x6a7dd8]
fstp qword [edi]
fld qword [0x6a7de0]
fstp qword [esi + 0x20]
fld qword [0x6a7dd0]
fstp qword [esi + 0x28]
mov ebp, dword [esi + 0x30]
test ebp, ebp
jne 0x5a26ee
push 0x1300
call fcn.004463f0
mov ebp, eax
add esp, 4
mov dword [esi + 0x30], ebp
test ebp, ebp
jne 0x5a26ee
pop edi
pop esi
mov eax, 0x826603e8
pop ebp
add esp, 0x20
ret
fld qword [edi]
fstp qword [esp + 0x20]
fld qword [esi + 0x20]
push 0x100
fstp qword [esp + 0x10]
fld qword [esi + 0x28]
push 0
push ebp
fstp qword [esp + 0x24]
call fcn.004b40a0
add esp, 0xc
xor eax, eax
jmp 0x5a2720
mov byte [eax + ebp + 0x100], al
inc eax
cmp eax, 0x100
jl 0x5a2720
push ebx
push 0x100
lea eax, [ebp + 0x200]
push 0xff
push eax
call fcn.004b40a0
fld qword [esp + 0x30]
add esp, 0xc
fld st(0)
fadd st(1)
fld qword [0x64f400]
fld st(0)
fsubrp st(2)
fld qword [esp + 0x1c]
fld st(0)
fadd st(1)
fsubp st(2)
fld st(2)
fld qword [0x6ad208]
fmul st(1), st(0)
fld qword [0x65ba48]
fadd st(2), st(0)
fxch st(2)
call fcn.004b2570
fxch st(4)
mov esi, eax
fmulp st(5)
fld qword [esp + 0x10]
mov dword [esp + 0x18], esi
fdiv st(5), st(0)
fxch st(5)
fmul st(4)
fadd st(1)
call fcn.004b2570
fld st(2)
mov ebx, eax
fmul st(4)
neg ebx
mov dword [esp + 0x1c], ebx
fadd st(1)
call fcn.004b2570
fxch st(2)
mov dword [esp + 0x10], eax
fmulp st(1)
fdivrp st(3)
fxch st(2)
fmulp st(1)
faddp st(1)
call fcn.004b2570
mov edi, ebx
lea ecx, [ebp + 0x700]
mov edx, 0x100
neg eax
mov ebx, edx
mov dword [esp + 0x24], eax
mov ebp, edx
neg edi
sub ebp, dword [esp + 0x10]
sub ebx, eax
sub edx, esi
shl edi, 7
shl ebx, 7
mov esi, 0x100
shl ebp, 7
shl edx, 7
mov eax, edx
mov dword [ecx + 0x400], edi
add edx, dword [esp + 0x18]
lea ecx, [ecx + 4]
add edi, dword [esp + 0x1c]
sar eax, 0x10
mov dword [ecx - 0x404], eax
mov eax, ebp
add ebp, dword [esp + 0x10]
sar eax, 0x10
mov dword [ecx + 0x7fc], ebx
add ebx, dword [esp + 0x24]
mov dword [ecx - 4], eax
sub esi, 1
jne 0x5a27f3
mov esi, dword [esp + 0x2c]
pop ebx
mov edi, dword [esi]
cmp word [edi + 0x26], 8
jne case.0x5a286d.18
cmp word [edi + 0x24], 3
je 0x5a2851
cmp word [esi + 0x3a], 1
je 0x5a2851
cmp word [esi + 0x38], 1
jne case.0x5a286d.18
movzx ecx, word [esi + 0x3a]
movzx eax, word [esi + 0x38]
shl ecx, 4
or ecx, eax
add ecx, 0xffffffef
cmp ecx, 0x33
ja case.0x5a286d.18
movzx eax, byte [ecx + 0x5a28f0]
jmp dword [eax*4 + 0x5a28d8]
pop edi
mov dword [esi + 4], 0x5a39d0
mov eax, 0x2660000
pop esi
pop ebp
add esp, 0x20
ret
mov eax, 0x5a3e30
jmp 0x5a28a1
mov eax, 0x5a3ac0
jmp 0x5a28a1
mov eax, 0x5a3e20
jmp 0x5a28a1
mov eax, 0x5a3e20
mov dword [esi + 4], eax
movzx eax, word [esi + 0x3a]
movzx ecx, word [esi + 0x38]
imul ecx, eax
mov eax, 0x10
cdq
idiv ecx
add eax, 8
mov word [edi + 0x2a], ax
mov eax, 0x2660000
pop edi
pop esi
pop ebp
add esp, 0x20
ret
pop edi
pop esi
mov eax, 0x82660013
pop ebp
add esp, 0x20
ret