Function at 0x660fe5d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x30
movzx ebx, word [ebx]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x24], edx
mov word [esp + 0x20], bx
movzx ebx, word [edx]
lea edx, [ecx*4]
xor edx, ecx
mov word [esp + 0x22], bx
cmp edx, 3
ja 0x660fe7a0
movzx ecx, byte [eax]
movzx edx, byte [eax + 4]
movzx ebx, byte [eax + 1]
movzx esi, byte [eax + 2]
lea edx, [ecx + edx + 8]
movzx ecx, byte [eax + 5]
lea ebx, [ebx + ecx + 8]
movzx ecx, byte [eax + 6]
lea ecx, [esi + ecx + 8]
movzx esi, byte [eax + 8]
add edx, esi
movzx esi, byte [eax + 9]
add ebx, esi
movzx esi, byte [eax + 0xa]
add ecx, esi
movzx esi, byte [eax + 0xc]
add edx, esi
movzx esi, byte [eax + 0xd]
add ebx, esi
movzx esi, byte [eax + 0xe]
add ecx, esi
movzx esi, byte [eax + 0x10]
add edx, esi
movzx esi, byte [eax + 0x11]
add ebx, esi
movzx esi, byte [eax + 0x12]
add ecx, esi
movzx esi, byte [eax + 0x14]
add edx, esi
movzx esi, byte [eax + 0x15]
add ebx, esi
movzx esi, byte [eax + 0x16]
add ecx, esi
movzx esi, byte [eax + 0x18]
add edx, esi
movzx esi, byte [eax + 0x19]
add ebx, esi
movzx esi, byte [eax + 0x1a]
add ecx, esi
movzx esi, byte [eax + 0x1c]
add edx, esi
movzx esi, byte [eax + 0x1d]
add ebx, esi
movzx esi, byte [eax + 0x1e]
add ecx, esi
movzx esi, byte [eax + 0x20]
add edx, esi
movzx esi, byte [eax + 0x21]
add ebx, esi
movzx esi, byte [eax + 0x22]
add ecx, esi
movzx esi, byte [eax + 0x24]
add edx, esi
movzx esi, byte [eax + 0x25]
add ebx, esi
movzx esi, byte [eax + 0x26]
add ecx, esi
movzx esi, byte [eax + 0x28]
add edx, esi
movzx esi, byte [eax + 0x29]
add ebx, esi
movzx esi, byte [eax + 0x2a]
add ecx, esi
movzx esi, byte [eax + 0x2c]
add edx, esi
movzx esi, byte [eax + 0x2d]
add ebx, esi
movzx esi, byte [eax + 0x2e]
add ecx, esi
movzx esi, byte [eax + 0x30]
add edx, esi
movzx esi, byte [eax + 0x31]
add ebx, esi
movzx esi, byte [eax + 0x32]
add ecx, esi
movzx esi, byte [eax + 0x34]
add edx, esi
movzx esi, byte [eax + 0x35]
add ebx, esi
movzx esi, byte [eax + 0x36]
add ecx, esi
movzx esi, byte [eax + 0x38]
add edx, esi
movzx esi, byte [eax + 0x39]
add ebx, esi
movzx esi, byte [eax + 0x3a]
add ecx, esi
movzx esi, byte [eax + 0x3c]
add edx, esi
movzx esi, byte [eax + 0x3d]
sar edx, 4
add ebx, esi
movzx esi, byte [eax + 0x3e]
movzx eax, byte [edx + edx + 0x66238840]
movzx edx, byte [edx + edx + 0x66238841]
sar ebx, 4
add esi, ecx
shl eax, 0xb
movzx edi, byte [ebx + ebx + 0x66238640]
sar esi, 4
shl edx, 0xb
movzx ecx, byte [esi + esi + 0x66238840]
shl edi, 5
or eax, ecx
movzx ecx, byte [esi + esi + 0x66238841]
or eax, edi
or ecx, edx
movzx edx, byte [ebx + ebx + 0x66238641]
shl edx, 5
or ecx, edx
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
cmp cx, word [esp + 0x20]
setne dl
cmp ax, word [esp + 0x22]
mov word [ebx], cx
mov word [esi], ax
setne al
add esp, 0x30
or eax, edx
pop ebx
pop esi
movzx eax, al
pop edi
pop ebp
ret
lea esi, [eax + 0x40]
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0xc], 0
nop
mov ebp, ecx
movzx edi, byte [eax]
movzx esi, byte [eax + 1]
shr ecx, 2
and ebp, 3
movzx ebx, byte [eax + 2]
add dword [esp + 0x10], edi
add eax, 4
mov edx, dword [ebp*4 + 0x661e29d0]
mov ebp, dword [ebp*4 + 0x661e29c0]
add dword [esp + 0xc], ebp
mov ebp, edx
add dword [esp + 0x14], esi
imul ebp, edi
add dword [esp], ebp
mov ebp, edx
imul ebp, esi
add dword [esp + 0x18], ebx
imul edx, ebx
add dword [esp + 4], ebp
add dword [esp + 8], edx
cmp dword [esp + 0x1c], eax
jne 0x660fe7e0
fnstcw word [esp + 0x2e]
mov eax, dword [esp + 0x10]
mov ebp, dword [esp]
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x14]
mov edi, edx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x18]
sub edx, dword [esp + 4]
sub edi, ebp
mov dword [esp + 0x10], edx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0xc]
sub ecx, dword [esp + 8]
mov dword [esp + 0x14], ecx
mov ebx, eax
movzx esi, al
movzx edx, ah
sar ebx, 0x10
mov eax, esi
mov ecx, ebx
imul eax, esi
mov dword [esp + 0xc], ebx
mov ebx, 0
imul ecx, edx
sub ecx, eax
mov eax, ebp
mov dword [esp], ecx
fild dword [esp]
imul eax, edx
fdivr dword [0x661e29ec]
mov dword [esp], ebp
mov ebp, 0x1f
mov ecx, eax
mov eax, edi
imul eax, esi
sub ecx, eax
movzx eax, word [esp + 0x2e]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x14]
or ah, 0xc
mov word [esp + 0x2c], ax
fld dword [0x661e29f0]
fmul st(1)
fdiv dword [0x661e29f4]
fild dword [esp + 0x18]
fmul st(2)
fld dword [0x661e29f8]
fadd st(1), st(0)
fxch st(1)
fldcw word [esp + 0x2c]
fistp dword [esp + 0x18]
fldcw word [esp + 0x2e]
mov eax, dword [esp + 0x18]
cmp eax, 0x1f
cmovg eax, ebp
test eax, eax
cmovs eax, ebx
mov ebx, dword [esp + 8]
imul ecx, esi
imul ebx, edx
shl eax, 0xb
sub ebx, ecx
mov dword [esp + 0x18], ebx
fild dword [esp + 0x18]
mov ebx, 0
fmul st(3)
fadd st(1)
fldcw word [esp + 0x2c]
fistp dword [esp + 0x18]
fldcw word [esp + 0x2e]
mov ecx, dword [esp + 0x18]
cmp ecx, 0x1f
cmovg ecx, ebp
test ecx, ecx
cmovs ecx, ebx
imul edx, dword [esp + 4]
mov ebx, 0x3f
or eax, ecx
mov ecx, dword [esp + 0x10]
imul ecx, esi
sub edx, ecx
mov dword [esp + 0x18], edx
fild dword [esp + 0x18]
mov edx, 0
fmul st(2)
fadd st(1)
fldcw word [esp + 0x2c]
fistp dword [esp + 0x18]
fldcw word [esp + 0x2e]
mov ecx, dword [esp + 0x18]
cmp ecx, 0x3f
cmovg ecx, ebx
test ecx, ecx
cmovs ecx, edx
mov edx, dword [esp + 0xc]
imul edx, edi
mov edi, dword [esp]
shl ecx, 5
or eax, ecx
imul edi, esi
sub edx, edi
mov edi, 0
mov dword [esp], edx
fild dword [esp]
fmul st(3)
fadd st(1)
fldcw word [esp + 0x2c]
fistp dword [esp]
fldcw word [esp + 0x2e]
mov edx, dword [esp]
cmp edx, 0x1f
cmovg edx, ebp
test edx, edx
cmovs edx, edi
mov edi, dword [esp + 0x14]
imul edi, dword [esp + 0xc]
shl edx, 0xb
mov ecx, edi
mov edi, dword [esp + 8]
imul edi, esi
sub ecx, edi
mov edi, 0
mov dword [esp], ecx
fild dword [esp]
fmulp st(3)
fadd st(2), st(0)
fxch st(2)
fldcw word [esp + 0x2c]
fistp dword [esp]
fldcw word [esp + 0x2e]
mov ecx, dword [esp]
cmp ecx, 0x1f
cmovg ecx, ebp
test ecx, ecx
cmovs ecx, edi
imul esi, dword [esp + 4]
or ecx, edx
mov edx, dword [esp + 0x10]
imul edx, dword [esp + 0xc]
sub edx, esi
mov dword [esp], edx
fild dword [esp]
fmulp st(1)
faddp st(1)
fldcw word [esp + 0x2c]
fistp dword [esp]
fldcw word [esp + 0x2e]
mov edx, dword [esp]
cmp edx, 0x3f
cmovg edx, ebx
test edx, edx
cmovs edx, edi
shl edx, 5
or ecx, edx
jmp 0x660fe773