Function at 0x829740
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x954
push ebx
push esi
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0x953]
mov byte [ebp - 0x954], 0
rep stosd dword es:[edi], eax
fld qword [0x893578]
fld qword [0x893578]
stosw word es:[edi], ax
stosb byte es:[edi], al
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x8ad6b8]
fsub st(1)
fxch st(1)
fmul qword [0x8a2e80]
fadd qword [0x8a2d78]
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x8ad6b0]
fnstsw ax
test ah, 0x41
jne 0x8297aa
fld st(0)
fmul qword [0x8ad6a8]
fsubp st(2)
fadd qword [0x89a4c0]
fcom qword [0x8ad6a0]
fnstsw ax
test ah, 1
jne 0x829771
fxch st(1)
fst qword [ebp - 0x3c]
fxch st(1)
fstp st(0)
fcomp qword [0x893578]
fnstsw ax
test ah, 1
je 0x82981c
add al, dh
add eax, 0xfc70ac2
ror byte [edi], 0xca
add al, 0xc4
push cs
ret
mov dword [ebp - 0x34], 0x8297d3
mov dword [ebp - 0x20], 0x8297fd
xor eax, eax
mov byte [ebp + eax - 0x154], al
inc eax
cmp eax, 0x100
jb 0x82982c
fld qword [ebp - 0x3c]
mov byte [ebp - 4], 0
mov eax, 0xff
mov esi, dword [ebp - 4]
xor edi, edi
mov dword [ebp - 0x18], eax
mov ebx, 1
mov dword [ebp - 0x24], 0
cmp eax, ebx
jbe 0x829867
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x82985f
cmp edi, 3
ja case.default.0x82986c
jmp dword [edi*4 + 0x829fb0]
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x154]
jmp 0x8298e8
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x154]
shr eax, 8
jmp 0x8298e8
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x154]
shr eax, 0x10
jmp 0x8298e8
fld st(0)
and esi, 0xff
call fcn.008416e4
mov cl, byte [ebp + esi - 0x154]
shr eax, 0x18
jmp 0x8298e8
mov eax, dword [ebp - 0x20]
and esi, 0xff
mov cl, byte [eax + edi - 4]
mov al, byte [ebp + esi - 0x154]
add cl, al
inc edi
cmp edi, 0x1e
mov byte [ebp - 4], cl
jb 0x8298fb
xor edi, edi
add cl, 0x1e
mov byte [ebp - 4], cl
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0x24]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x24], eax
jbe 0x82991b
mov eax, edx
xor edx, edx
div dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, edx
jb 0x829867
je 0x829953
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 - 0x18]
dec eax
mov dword [ebp - 0x18], eax
jne 0x82984f
mov edi, dword [ebp - 0x34]
mov dl, byte [ebp - 0x14d]
and esi, 0xff
mov byte [ebp - 4], dl
mov dl, byte [edi + 1]
mov bl, byte [ebp - 0x151]
mov al, byte [ebp + esi - 0x154]
add dl, 0x42
mov byte [ebp - 0x30], al
mov al, byte [edi]
add al, 0xf
xor esi, esi
shl al, 4
or al, dl
mov cl, byte [ebp - 0x14f]
mov byte [ebp - 0x2c], al
mov eax, dword [ebp - 0x30]
and eax, 0xff
fstp st(0)
mov dl, byte [ebp + eax - 0x154]
lea edi, [ebp + eax - 0x154]
mov byte [ebp - 0xc], 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 - 0x28], al
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0x10], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x154]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
mov edi, 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, edi
mov edi, dword [ebp - 0x34]
and edx, 0xff
xor bl, byte [ebp + edx - 0x154]
mov dl, byte [ebp - 0x2c]
mov byte [ebp - 0x30], dl
xor bl, dl
mov byte [ebp - 4], bl
mov dword [ebp - 0x20], 9
jmp 0x829aa4
mov edi, dword [ebp - 0x38]
mov bl, byte [edi + 2]
mov dl, byte [edi + 3]
add edi, 2
add bl, 0xf
add dl, 0x42
mov dword [ebp - 0x38], edi
shl bl, 4
or dl, bl
inc esi
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x30]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x10]
mov bl, byte [edx]
mov dl, byte [ebp - 8]
add al, bl
inc dl
mov byte [ebp - 0x28], al
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0x10], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
mov bl, byte [ebx]
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 - 0x30], bl
xor dl, bl
test esi, esi
mov byte [ebp - 4], dl
jbe 0x829bb5
mov byte [ebp + esi - 0x55], dl
mov edx, dword [ebp - 0x20]
dec edx
mov dword [ebp - 0x20], edx
jne 0x829aa1
lea ebx, [esi + 1]
cmp ebx, 0x14
jge 0x829d14
mov edx, dword [ebp - 8]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0x10], edx
mov edx, dword [ebp - 0x34]
lea edi, [edx + esi*2]
mov edx, 0x14
sub edx, ebx
mov dword [ebp - 0x20], edx
jmp 0x829bf6
mov edi, dword [ebp - 0x38]
mov bl, byte [edi + 2]
mov dl, byte [edi + 3]
add edi, 2
add bl, 0xf
add dl, 0x42
mov dword [ebp - 0x38], edi
shl bl, 4
or dl, bl
inc esi
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x30]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x10]
mov bl, byte [edx]
mov dl, byte [ebp - 8]
add al, bl
inc dl
mov byte [ebp - 0x28], al
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0x10], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
mov bl, byte [ebx]
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 - 0x30], bl
xor dl, bl
test esi, esi
mov byte [ebp - 4], dl
jbe 0x829d07
mov byte [ebp + esi - 0x55], dl
mov edx, dword [ebp - 0x20]
dec edx
mov dword [ebp - 0x20], edx
jne 0x829bf3
mov edi, dword [ebp - 0x34]
inc esi
mov dl, byte [edi + esi*2]
mov bl, byte [edi + esi*2 + 1]
add dl, 0xf
add bl, 0x42
shl dl, 4
or dl, bl
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp - 0x30]
and edx, 0xff
lea edi, [ebp + edx - 0x154]
mov dl, byte [ebp + edx - 0x154]
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 8]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
mov dl, byte [ebp - 8]
add al, bl
inc dl
mov byte [ebp - 0x28], al
mov byte [ebp - 8], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [edi], bl
mov ebx, dword [ebp - 4]
and ebx, 0xff
mov dword [ebp - 0x18], edx
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 8]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x154]
mov dword [ebp - 0x10], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x154]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x24], cl
mov edx, dword [ebp - 0x24]
mov bl, byte [ebx]
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 - 4], dl
jbe 0x829e2b
mov byte [ebp + esi - 0x55], 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 - 0xc], dl
mov edx, dword [ebp - 0x10]
mov bl, byte [edx]
add al, bl
mov bl, byte [ebp - 8]
mov byte [ebp - 0x28], al
inc bl
mov eax, dword [ebp - 0x28]
mov byte [ebp - 8], bl
and eax, 0xff
mov dl, byte [ebp + eax - 0x154]
lea eax, [ebp + eax - 0x154]
mov byte [edi], dl
mov edx, dword [ebp - 4]
and edx, 0xff
mov bl, byte [ebp + edx - 0x154]
lea edx, [ebp + edx - 0x154]
mov byte [eax], bl
mov ebx, dword [ebp - 8]
and ebx, 0xff
mov dword [ebp - 0x14], edx
test esi, esi
lea ebx, [ebp + ebx - 0x154]
mov dword [ebp - 0x10], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov ebx, dword [ebp - 0x10]
mov dl, byte [ebp - 0xc]
mov byte [ebx], dl
jbe 0x829f25
mov edx, dword [ebp - 0xc]
mov al, byte [eax]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x34]
mov bl, byte [edx + esi*2]
mov dl, byte [edx + esi*2 + 1]
shl bl, 4
sub bl, 0x10
add dl, 0x42
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 edx, dword [ebp - 0x14]
mov dl, byte [edx]
add ecx, edx
mov dl, byte [edi]
mov edi, dword [ebp - 0x1c]
add ecx, edx
and ecx, 0xff
xor edx, edx
add eax, edi
mov dl, byte [ebp + ecx - 0x154]
and eax, 0xff
mov cl, byte [ebp + edx - 0x154]
xor bl, cl
mov cl, byte [ebp + eax - 0x154]
xor bl, cl
mov byte [ebp + esi - 0x55], bl
mov byte [ebp - 0x40], 0
mov eax, dword [0x8d5090]
test eax, eax
jle 0x829f73
mov edx, 0x8d4fd8
mov dword [ebp - 0x20], eax
mov edi, dword [edx]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp - 0x954]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
add edx, 4
mov esi, edi
mov edi, ebx
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x20]
mov ecx, ebx
and ecx, 3
dec eax
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x20], eax
jne 0x829f3a
lea ecx, [ebp - 0x54]
lea edx, [ebp - 0x954]
push ecx
push edx
call fcn.008363a0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, 0x8d5018
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret