Function at 0x840ab0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
fld qword [0x89a578]
fld qword [0x89a578]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x8c96c8]
fsub st(1)
fxch st(1)
fmul qword [0x8aa5a0]
fadd qword [0x8c96c0]
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x8c96b8]
fnstsw ax
test ah, 0x41
jne 0x840b08
fld st(0)
fmul qword [0x8c96b0]
fsubp st(2)
fadd qword [0x8a1410]
fcom qword [0x8c96a8]
fnstsw ax
test ah, 1
jne 0x840acf
fxch st(1)
fst qword [ebp - 0x44]
fxch st(1)
fstp st(0)
fcomp qword [0x89a578]
fnstsw ax
test ah, 1
je 0x840b7e
push 0x2348543e
push esp
imul edi, dword [edi], 0x31
sub al, 0x27
cmp eax, 0x5c596d30
and eax, 0x6a764076
jbe 0x840b7f
jne 0x840bae
push ebp
out dx, al
pop ebp
int1
pushal
out dx, al
invalid
mov dword [ebp - 0x34], 0x840b49
mov dword [ebp - 0x2c], 0x840b31
xor eax, eax
inc ebp
int3
mov byte [ebp + eax - 0x15c], al
inc eax
cmp eax, 0x100
jb 0x840b8e
fld qword [ebp - 0x44]
mov byte [ebp - 8], 0
mov eax, 0xff
mov esi, dword [ebp - 8]
push ebx
mov dword [ebp - 0x14], eax
inc ebp
in al, dx
mov ebx, 1
mov dword [ebp - 0x40], 0
cmp eax, ebx
jbe 0x840bc8
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x840bc0
cmp edi, 3
ja case.default.0x840bcd
jmp dword [edi*4 + 0x841204]
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x15c]
jmp 0x840c49
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x15c]
shr eax, 8
jmp 0x840c49
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x15c]
shr eax, 0x10
jmp 0x840c49
fld st(0)
and esi, 0xff
call fcn.00848444
mov cl, byte [ebp + esi - 0x15c]
shr eax, 0x18
jmp 0x840c49
mov eax, dword [ebp - 0x2c]
and esi, 0xff
mov cl, byte [eax + edi - 4]
mov al, byte [ebp + esi - 0x15c]
add cl, al
inc edi
cmp edi, 0x1c
mov byte [ebp - 8], cl
jb 0x840c5c
xor edi, edi
add cl, 0x1c
mov byte [ebp - 8], cl
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x40]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x40], eax
jbe 0x840c7c
mov eax, edx
xor edx, edx
div dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, edx
jb 0x840bc8
je 0x840cb4
mov bl, byte [ebp + eax - 0x15c]
lea edx, [ebp + edx - 0x15c]
lea ecx, [ebp + eax - 0x15c]
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 - 0x14]
dec eax
mov dword [ebp - 0x14], eax
jne 0x840bb0
mov dl, byte [ebp - 0x155]
and esi, 0xff
mov byte [ebp - 0x1c], dl
mov bl, byte [ebp - 0x159]
mov al, byte [ebp + esi - 0x15c]
mov esi, dword [ebp - 0x34]
mov byte [ebp - 0x18], al
xor eax, eax
mov al, byte [esi]
mov dl, byte [esi + 1]
add al, 0xb
add dl, 0x17
shl al, 4
or al, dl
mov cl, byte [ebp - 0x157]
mov byte [ebp - 1], al
mov eax, dword [ebp - 0x18]
and eax, 0xff
mov dword [ebp - 0x14], 1
fstp st(0)
mov dl, byte [ebp + eax - 0x15c]
lea esi, [ebp + eax - 0x15c]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x15b]
mov eax, edx
and eax, 0xff
mov al, byte [ebp + eax - 0x15c]
add al, bl
inc dl
mov byte [ebp - 0x28], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea edi, [ebp + edx - 0x15c]
mov dl, byte [ebp + edx - 0x15c]
mov byte [esi], dl
mov edx, dword [ebp - 0x1c]
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
lea edx, [ebp + edx - 0x15c]
mov byte [edi], bl
mov ebx, dword [ebp - 0xc]
and ebx, 0xff
mov dword [ebp - 0x20], edx
lea ebx, [ebp + ebx - 0x15c]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x30], edx
mov bl, byte [ebp + edx - 0x15c]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x20]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov dl, byte [ebp + edx - 0x15c]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
mov dl, byte [edi]
mov edi, dword [ebp - 0x30]
mov bl, byte [ebp + ebx - 0x15c]
add edx, edi
and edx, 0xff
xor bl, byte [ebp + edx - 0x15c]
mov dl, byte [ebp - 1]
mov byte [ebp - 0x18], dl
xor bl, dl
mov edx, dword [ebp - 0x34]
mov byte [ebp - 0x1c], bl
lea esi, [edx + 2]
mov dl, byte [edx + 2]
mov bl, byte [esi + 1]
add dl, 0xb
shl dl, 4
add bl, 0x17
mov dword [ebp - 0x2c], 0xb
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x18]
and edx, 0xff
lea edi, [ebp + edx - 0x15c]
mov dl, byte [ebp + edx - 0x15c]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x10]
mov bl, byte [edx]
add al, bl
mov bl, byte [ebp - 0xc]
mov byte [ebp - 0x28], al
inc bl
mov edx, dword [ebp - 0x28]
mov byte [ebp - 0xc], bl
and edx, 0xff
lea esi, [ebp + edx - 0x15c]
mov dword [ebp - 0x40], esi
mov dl, byte [esi]
mov byte [edi], dl
mov edx, dword [ebp - 0x1c]
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
lea edx, [ebp + edx - 0x15c]
mov byte [esi], bl
mov esi, dword [ebp - 0xc]
and esi, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + esi - 0x15c]
lea esi, [ebp + esi - 0x15c]
mov byte [edx], bl
mov dl, byte [ebp - 8]
mov byte [esi], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x30], edx
mov bl, byte [ebp + edx - 0x15c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x20]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov dl, byte [ebp + edx - 0x15c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
mov edx, dword [ebp - 0x40]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x30]
add ebx, edx
mov dl, byte [ebp + edi - 0x15c]
and ebx, 0xff
mov edi, dword [ebp - 0x14]
xor dl, byte [ebp + ebx - 0x15c]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x18], bl
xor dl, bl
mov byte [ebp - 0x1c], dl
mov byte [ebp - 0x5c], dl
mov edx, dword [ebp - 0x34]
add edx, 2
jmp 0x840f15
mov edx, dword [ebp - 0x10]
add edx, 2
inc edi
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x10]
mov dl, byte [edx]
add dl, 0xb
mov bl, byte [edi + 1]
shl dl, 4
add bl, 0x17
or dl, bl
mov bl, byte [ebp - 0xc]
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x18]
and edx, 0xff
lea edi, [ebp + edx - 0x15c]
mov dl, byte [ebp + edx - 0x15c]
mov byte [ebp - 8], dl
mov dl, byte [esi]
add al, dl
inc bl
mov byte [ebp - 0x28], al
mov byte [ebp - 0xc], bl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea esi, [ebp + edx - 0x15c]
mov dword [ebp - 0x40], esi
mov dl, byte [esi]
mov byte [edi], dl
mov edx, dword [ebp - 0x1c]
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
lea edx, [ebp + edx - 0x15c]
mov byte [esi], bl
mov esi, dword [ebp - 0xc]
and esi, 0xff
mov dword [ebp - 0x20], edx
mov bl, byte [ebp + esi - 0x15c]
lea esi, [ebp + esi - 0x15c]
mov byte [edx], bl
mov dl, byte [ebp - 8]
mov byte [esi], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x30], edx
mov bl, byte [ebp + edx - 0x15c]
add cl, bl
mov bl, byte [edi]
mov edi, dword [ebp - 0x20]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov dl, byte [ebp + edx - 0x15c]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
mov edx, dword [ebp - 0x40]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x30]
add ebx, edx
mov dl, byte [ebp + edi - 0x15c]
mov edi, dword [ebp - 0x14]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x15c]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x18], bl
xor dl, bl
test edi, edi
mov byte [ebp - 0x1c], dl
jbe 0x841027
mov byte [ebp + edi - 0x5d], dl
mov edx, dword [ebp - 0x2c]
dec edx
mov dword [ebp - 0x2c], edx
jne 0x840f12
lea ebx, [edi + 1]
cmp ebx, 0x19
jge 0x841186
mov edx, dword [ebp - 0xc]
and edx, 0xff
lea edx, [ebp + edx - 0x15c]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x34]
lea esi, [edx + edi*2]
mov edx, 0x19
sub edx, ebx
mov dword [ebp - 0x2c], edx
jmp 0x841068
mov esi, dword [ebp - 0x34]
mov dl, byte [esi + 2]
mov bl, byte [esi + 3]
add esi, 2
add dl, 0xb
shl dl, 4
add bl, 0x17
mov dword [ebp - 0x34], esi
or dl, bl
inc edi
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x18]
and edx, 0xff
lea esi, [ebp + edx - 0x15c]
mov dl, byte [ebp + edx - 0x15c]
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x10]
mov bl, byte [edx]
mov dl, byte [ebp - 0xc]
add al, bl
inc dl
mov byte [ebp - 0x28], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
lea edx, [ebp + edx - 0x15c]
mov byte [esi], bl
mov ebx, dword [ebp - 0x1c]
and ebx, 0xff
mov dword [ebp - 0x40], edx
lea ebx, [ebp + ebx - 0x15c]
mov dword [ebp - 0x20], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x20]
and edx, 0xff
lea edx, [ebp + edx - 0x15c]
mov dword [ebp - 0x10], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 8]
mov byte [ebx], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov dword [ebp - 0x30], edx
mov bl, byte [ebp + edx - 0x15c]
add cl, bl
mov bl, byte [esi]
mov esi, dword [ebp - 0x20]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov dl, byte [ebp + edx - 0x15c]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x15c]
mov edx, dword [ebp - 0x40]
mov esi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x30]
add ebx, edx
mov dl, byte [ebp + esi - 0x15c]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x15c]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x18], bl
xor dl, bl
test edi, edi
mov byte [ebp - 0x1c], dl
jbe 0x841179
mov byte [ebp + edi - 0x5d], dl
mov edx, dword [ebp - 0x2c]
dec edx
mov dword [ebp - 0x2c], edx
jne 0x841065
mov byte [ebp - 0x45], 0
pop ebx
call fcn.00851590
mov esi, eax
mov eax, dword [ebp + 8]
push eax
push 0x2712
push esi
call fcn.00854f50
push 0x841220
push 0x4e2b
push esi
call fcn.00854f50
lea ecx, [ebp - 0x3c]
push ecx
push 0x2711
push esi
call fcn.00854f50
push 0
push 0x40
push esi
call fcn.00854f50
lea edx, [ebp - 0x5c]
push edx
push 0x2722
push esi
call fcn.00854f50
push 1
push 0x34
push esi
call fcn.00854f50
add esp, 0x48
push esi
call fcn.008515d0
push esi
call fcn.00851740
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
add esp, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret