Function at 0x847700
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + edi + 8]
push eax
call fcn.00848368
fld qword [0x89a578]
fld qword [0x89a578]
mov edx, eax
add esp, 4
mov dword [ebp - 0x54], edx
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x8c97e0]
fsub st(1)
fxch st(1)
fmul qword [0x8ad1d0]
fadd qword [0x8c97d8]
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x8c97d0]
fnstsw ax
test ah, 0x41
jne 0x847766
fld st(0)
fmul qword [0x8c97c8]
fsubp st(2)
fadd qword [0x8a1410]
fcom qword [0x8c97c0]
fnstsw ax
test ah, 1
jne 0x84772d
fxch st(1)
fst qword [ebp - 0x3c]
fxch st(1)
fstp st(0)
fcomp qword [0x89a578]
fnstsw ax
test ah, 1
je 0x8477cf
invalid
mov dword [ebp - 0x34], 0x84778f
mov dword [ebp - 0x24], 0x8477b1
xor eax, eax
mov byte [ebp + eax - 0x154], al
inc eax
cmp eax, 0x100
jb 0x8477df
fld qword [ebp - 0x3c]
mov byte [ebp - 0x14], 0
mov eax, 0xff
mov esi, dword [ebp - 0x14]
xor edi, edi
mov dword [ebp - 0x2c], eax
mov ebx, 1
mov dword [ebp - 0x18], 0
cmp eax, ebx
jbe 0x84781a
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x847812
cmp edi, 3
ja case.default.0x84781f
jmp dword [edi*4 + 0x848150]
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x154]
jmp 0x84789b
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x154]
shr eax, 8
jmp 0x84789b
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x154]
shr eax, 0x10
jmp 0x84789b
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x154]
shr eax, 0x18
jmp 0x84789b
mov ecx, dword [ebp - 0x24]
and esi, 0xff
mov cl, byte [ecx + edi - 4]
mov al, byte [ebp + esi - 0x154]
add cl, al
inc edi
cmp edi, 0x1d
mov byte [ebp - 0x14], cl
jb 0x8478ae
xor edi, edi
add cl, 0x1d
mov byte [ebp - 0x14], cl
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x18], eax
jbe 0x8478ce
mov eax, edx
xor edx, edx
div dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
cmp eax, edx
jb 0x84781a
je 0x847906
mov bl, byte [ebp + eax - 0x154]
lea edx, [ebp + edx - 0x154]
lea ecx, [ebp + eax - 0x154]
mov al, byte [edx]
xor bl, al
mov byte [ecx], bl
mov al, bl
mov bl, byte [edx]
xor bl, al
mov byte [edx], bl
mov al, byte [ecx]
mov dl, bl
xor al, dl
mov byte [ecx], al
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x2c], eax
jne 0x847802
mov dl, byte [ebp - 0x14d]
mov edi, dword [ebp - 0x34]
and esi, 0xff
mov byte [ebp - 0x28], dl
xor edx, edx
mov bl, byte [ebp - 0x151]
mov al, byte [ebp + esi - 0x154]
mov dl, byte [edi]
mov byte [ebp - 0x14], al
xor eax, eax
mov al, byte [edi + 1]
sub edx, 0xb5
sub eax, 0xeb
mov cl, byte [ebp - 0x14f]
shl edx, 4
or edx, eax
mov eax, dword [ebp - 0x14]
and eax, 0xff
mov dword [ebp - 0x24], edx
fstp st(0)
mov dl, byte [ebp + eax - 0x154]
lea esi, [ebp + eax - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x153]
mov eax, edx
and eax, 0xff
mov al, byte [ebp + eax - 0x154]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [esi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
mov esi, dword [ebp - 0x1c]
and edx, 0xff
xor ebx, ebx
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov dl, byte [edx]
mov bl, byte [ebp + ebx - 0x154]
add edx, esi
and edx, 0xff
xor bl, byte [ebp + edx - 0x154]
mov dl, byte [ebp - 0x24]
mov byte [ebp - 0x14], dl
xor bl, dl
mov byte [ebp - 0x28], bl
xor edx, edx
mov dl, byte [edi + 3]
add edi, 4
mov esi, edx
xor edx, edx
mov dl, byte [edi - 2]
add esi, 0xffffff15
sub edx, 0xb5
shl edx, 4
or edx, esi
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x14]
and edx, 0xff
lea esi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0xc]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [esi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov esi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + esi - 0x154]
and ebx, 0xff
mov esi, 2
xor dl, byte [ebp + ebx - 0x154]
mov bl, byte [ebp - 0x24]
xor dl, bl
mov bl, byte [edi + 1]
mov byte [ebp - 0x28], dl
mov byte [ebp - 0x50], dl
mov dl, byte [edi]
add bl, 0x15
add dl, 0xb
shl dl, 4
or dl, bl
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov dword [ebp - 0x24], 6
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0xc]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x154]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x154]
mov bl, byte [ebp - 0x2c]
mov byte [ebp - 0x14], bl
xor dl, bl
mov byte [ebp - 0x28], dl
mov byte [ebp - 0x4f], dl
mov edx, dword [ebp - 0x34]
lea edi, [edx + 4]
jmp 0x847c7c
mov edi, dword [ebp - 0x38]
mov bl, byte [edi + 2]
mov dl, byte [edi + 3]
add edi, 2
add bl, 0xb
add dl, 0x15
mov dword [ebp - 0x38], edi
shl bl, 4
or dl, bl
inc esi
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x14]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0xc]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x154]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x154]
mov bl, byte [ebp - 0x2c]
mov byte [ebp - 0x14], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x847d8d
mov byte [ebp + esi - 0x51], dl
mov edx, dword [ebp - 0x24]
dec edx
mov dword [ebp - 0x24], edx
jne 0x847c79
lea ebx, [esi + 1]
cmp ebx, 0x10
jge 0x847eec
mov edx, dword [ebp - 4]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 0x34]
lea edi, [edx + esi*2]
mov edx, 0x10
sub edx, ebx
mov dword [ebp - 0x24], edx
jmp 0x847dce
mov edi, dword [ebp - 0x38]
mov bl, byte [edi + 2]
mov dl, byte [edi + 3]
add edi, 2
add bl, 0xb
add dl, 0x15
mov dword [ebp - 0x38], edi
shl bl, 4
or dl, bl
inc esi
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x14]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0xc]
mov bl, byte [edx]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x154]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x154]
mov bl, byte [ebp - 0x2c]
mov byte [ebp - 0x14], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x847edf
mov byte [ebp + esi - 0x51], dl
mov edx, dword [ebp - 0x24]
dec edx
mov dword [ebp - 0x24], edx
jne 0x847dcb
mov edi, dword [ebp - 0x34]
inc esi
mov bl, byte [edi + esi*2]
mov dl, byte [edi + esi*2 + 1]
add bl, 0xb
add dl, 0x15
shl bl, 4
or dl, bl
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x14]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 4]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov dl, byte [ebp - 4]
add al, bl
inc dl
mov byte [ebp - 0x20], al
mov byte [ebp - 4], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 0x28]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0xc], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x10]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov edx, dword [ebp - 0x18]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x154]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x154]
mov bl, byte [ebp - 0x2c]
xor dl, bl
test esi, esi
mov byte [ebp - 0x28], dl
jbe 0x848003
mov byte [ebp + esi - 0x51], dl
mov edx, dword [ebp - 0x2c]
inc esi
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0xc]
mov bl, byte [edx]
add al, bl
mov bl, byte [ebp - 4]
mov byte [ebp - 0x20], al
inc bl
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], bl
and eax, 0xff
mov dl, byte [ebp + eax - 0x154]
lea eax, [ebp + eax - 0x154]
mov byte [edi], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [eax], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x10], edx
test esi, esi
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0xc], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov ebx, dword [ebp - 0xc]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
jbe 0x8480fd
mov edx, dword [ebp - 8]
mov al, byte [eax]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x34]
mov bl, byte [edx + esi*2 + 1]
mov dl, byte [edx + esi*2]
sub dl, 5
add bl, 0x15
shl dl, 4
or bl, dl
mov edx, dword [ebp - 0x1c]
mov dl, byte [ebp + edx - 0x154]
add dl, cl
and edx, 0xff
mov cl, byte [ebp + edx - 0x154]
mov dl, byte [edi]
add ecx, edx
mov edx, dword [ebp - 0x10]
mov edi, dword [ebp - 0x1c]
mov dl, byte [edx]
add eax, edi
add ecx, edx
xor edx, edx
and ecx, 0xff
and eax, 0xff
mov dl, byte [ebp + ecx - 0x154]
mov cl, byte [ebp + edx - 0x154]
xor bl, cl
mov cl, byte [ebp + eax - 0x154]
xor bl, cl
mov byte [ebp + esi - 0x51], bl
mov edx, dword [ebp - 0x54]
mov edi, dword [ebp + 0xc]
mov byte [ebp - 0x40], 0
test edx, edx
jne 0x848114
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
test edi, edi
jbe 0x848143
mov esi, dword [ebp + 8]
mov ecx, edx
xor ebx, ebx
add ecx, 2
mov bl, byte [eax + esi]
shr ebx, 4
mov bl, byte [ebp + ebx - 0x50]
mov byte [ecx - 2], bl
mov bl, byte [eax + esi]
and ebx, 0xf
inc eax
cmp eax, edi
mov bl, byte [ebp + ebx - 0x50]
mov byte [ecx - 1], bl
jb 0x84811f
pop edi
mov byte [edx + eax*2], 0
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret