Function at 0x821350
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfb4
push ebx
push esi
push edi
xor ebx, ebx
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x5aa]
mov word [ebp - 0x5ac], bx
rep stosd dword es:[edi], eax
fld qword [0x882578]
fld qword [0x882578]
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x3a2]
mov word [ebp - 0x3a4], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
fld st(0)
fmul st(1)
fld st(0)
fmul qword [0x8a3970]
fsub st(1)
fxch st(1)
fmul qword [0x8936c0]
fadd qword [0x891bf8]
fdivp st(1)
faddp st(2)
fld st(1)
fcomp qword [0x8a3968]
fnstsw ax
test ah, 0x41
jne 0x8213d3
fld st(0)
fmul qword [0x8a3960]
fsubp st(2)
fadd qword [0x8894a0]
fcom qword [0x8a3958]
fnstsw ax
test ah, 1
jne 0x82139a
fxch st(1)
fst qword [ebp - 0x40]
fxch st(1)
fstp st(0)
fcomp qword [0x882578]
fnstsw ax
test ah, 1
je 0x821424
dec edx
and dword ds:[eax + 0x37], edx
and al, 0x4b
pop ecx
dec edi
cmp eax, 0x456f6f37
outsb dx, byte [esi]
dec esi
dec edi
outsb dx, byte [esi]
sbb dh, byte [ebx - 0x46f03fe9]
adc byte [ebx - 0x40e842f4], dh
pop ss
ror byte [esi], 0xb3
jmp 0x821c75
mov dword [ebp - 0x38], 0x82140f
mov dword [ebp - 0x34], 0x8213fc
xor eax, eax
mov byte [ebp + eax - 0x148], al
inc eax
cmp eax, 0x100
jb 0x821434
fld qword [ebp - 0x40]
mov byte [ebp - 8], 0
mov eax, 0xff
mov esi, dword [ebp - 8]
xor edi, edi
mov dword [ebp - 0x1c], eax
jmp 0x82145b
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov ebx, 1
cmp eax, ebx
jbe 0x82146f
lea ebx, [ebx + ebx + 1]
cmp ebx, eax
jb 0x821467
cmp edi, 3
ja case.default.0x821474
jmp dword [edi*4 + 0x821e0c]
fld st(0)
and esi, 0xff
call fcn.0082fed4
mov cl, byte [ebp + esi - 0x148]
jmp 0x8214f0
fld st(0)
and esi, 0xff
call fcn.0082fed4
mov cl, byte [ebp + esi - 0x148]
shr eax, 8
jmp 0x8214f0
fld st(0)
and esi, 0xff
call fcn.0082fed4
mov cl, byte [ebp + esi - 0x148]
shr eax, 0x10
jmp 0x8214f0
fld st(0)
and esi, 0xff
call fcn.0082fed4
mov cl, byte [ebp + esi - 0x148]
shr eax, 0x18
jmp 0x8214f0
mov eax, dword [ebp - 0x34]
and esi, 0xff
mov cl, byte [eax + edi - 4]
mov al, byte [ebp + esi - 0x148]
add cl, al
inc edi
cmp edi, 0x17
mov byte [ebp - 8], cl
jb 0x821503
xor edi, edi
add cl, 0x17
mov byte [ebp - 8], cl
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
mov edx, esi
and edx, 0xff
and edx, ebx
inc eax
cmp eax, 0xb
mov dword [ebp - 0x2c], eax
jbe 0x821523
mov eax, edx
xor edx, edx
div dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
cmp eax, edx
jb 0x82146f
je 0x82155b
mov bl, byte [ebp + eax - 0x148]
lea edx, [ebp + edx - 0x148]
lea ecx, [ebp + eax - 0x148]
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 - 0x1c]
dec eax
mov dword [ebp - 0x1c], eax
jne 0x821459
mov dl, byte [ebp - 0x141]
and esi, 0xff
mov byte [ebp - 0x20], dl
xor edx, edx
mov al, byte [ebp + esi - 0x148]
mov bl, byte [ebp - 0x145]
mov byte [ebp - 0x28], al
mov eax, dword [ebp - 0x38]
mov cl, byte [ebp - 0x143]
mov dl, byte [eax]
mov al, byte [eax + 1]
add edx, 0xfffffff4
add al, 0x4d
shl edx, 4
or al, dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
mov byte [ebp - 1], al
fstp st(0)
mov al, byte [ebp + edx - 0x148]
lea esi, [ebp + edx - 0x148]
mov edx, dword [ebp - 0x147]
mov byte [ebp - 0x10], al
mov eax, edx
and eax, 0xff
mov al, byte [ebp + eax - 0x148]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
lea edi, [ebp + edx - 0x148]
mov dl, byte [ebp + edx - 0x148]
mov byte [esi], dl
mov edx, dword [ebp - 0x20]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
lea edx, [ebp + edx - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0xc]
and ebx, 0xff
mov dword [ebp - 0x14], edx
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x18], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x148]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x148]
add edx, ebx
mov bl, byte [esi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov esi, 1
mov bl, byte [ebp + edx - 0x148]
mov dl, byte [edi]
mov edi, dword [ebp - 0x1c]
mov bl, byte [ebp + ebx - 0x148]
add edx, edi
and edx, 0xff
xor bl, byte [ebp + edx - 0x148]
mov dl, byte [ebp - 1]
mov byte [ebp - 0x28], dl
xor bl, dl
mov edx, dword [ebp - 0x38]
mov byte [ebp - 0x20], bl
xor ebx, ebx
lea edi, [edx + 2]
mov bl, byte [edi + 1]
xor edx, edx
mov dl, byte [edi]
sub ebx, 0xb3
sub edx, 0xc
mov dword [ebp - 0x34], 2
shl edx, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea edi, [ebp + edx - 0x148]
mov dl, byte [ebp + edx - 0x148]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0xc]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
lea edx, [ebp + edx - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0x20]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x148]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x148]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x148]
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 - 0x148]
mov edx, dword [ebp - 8]
mov dl, byte [edx]
mov bl, byte [ebp + ebx - 0x148]
add edx, edi
and edx, 0xff
xor bl, byte [ebp + edx - 0x148]
mov dl, byte [ebp - 1]
mov byte [ebp - 0x28], dl
xor bl, dl
mov edx, dword [ebp - 0x38]
mov byte [ebp - 0x20], bl
lea edi, [edx + 2]
lea edx, [ebp - 0x158]
mov dword [ebp - 0x2c], edx
jmp 0x8217c6
mov edi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x2c]
mov bl, byte [edi + 2]
add edi, 2
add edx, 2
mov dword [ebp - 0x2c], edx
add bl, 4
mov dl, byte [edi + 1]
mov dword [ebp - 0x3c], edi
add dl, 0x4d
inc esi
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea edi, [ebp + edx - 0x148]
mov dl, byte [ebp + edx - 0x148]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0xc]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
lea edx, [ebp + edx - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0x20]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x148]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x148]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x148]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x148]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x148]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x20], dl
jbe 0x8218e6
mov edi, dword [ebp - 0x2c]
movsx dx, dl
mov word [edi], dx
mov edx, dword [ebp - 0x34]
dec edx
mov dword [ebp - 0x34], edx
jne 0x8217c3
lea ebx, [esi + 1]
cmp ebx, 7
jge 0x821a5e
mov edx, dword [ebp - 0xc]
and edx, 0xff
lea edx, [ebp + edx - 0x148]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x38]
lea edi, [edx + esi*2]
lea edx, [ebp + esi*2 - 0x15a]
mov dword [ebp - 0x2c], edx
mov edx, 7
sub edx, ebx
mov dword [ebp - 0x34], edx
jmp 0x821931
mov edi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x2c]
mov bl, byte [edi + 2]
add edi, 2
add edx, 2
mov dword [ebp - 0x2c], edx
add bl, 4
mov dl, byte [edi + 1]
mov dword [ebp - 0x3c], edi
add dl, 0x4d
inc esi
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea edi, [ebp + edx - 0x148]
mov dl, byte [ebp + edx - 0x148]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x18]
mov bl, byte [edx]
mov dl, byte [ebp - 0xc]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
lea edx, [ebp + edx - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0x20]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x148]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x148]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x148]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x148]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x148]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x20], dl
jbe 0x821a51
mov edi, dword [ebp - 0x2c]
movsx dx, dl
mov word [edi], dx
mov edx, dword [ebp - 0x34]
dec edx
mov dword [ebp - 0x34], edx
jne 0x82192e
mov edi, dword [ebp - 0x38]
inc esi
mov bl, byte [edi + esi*2]
mov dl, byte [edi + esi*2 + 1]
add bl, 4
add dl, 0x4d
shl bl, 4
or dl, bl
mov byte [ebp - 1], dl
mov edx, dword [ebp - 0x28]
and edx, 0xff
lea edi, [ebp + edx - 0x148]
mov dl, byte [ebp + edx - 0x148]
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0xc]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
mov dl, byte [ebp - 0xc]
add al, bl
inc dl
mov byte [ebp - 0x24], al
mov byte [ebp - 0xc], dl
mov edx, dword [ebp - 0x24]
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
lea edx, [ebp + edx - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0x20]
and ebx, 0xff
mov dword [ebp - 8], edx
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [edx], bl
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
and edx, 0xff
lea edx, [ebp + edx - 0x148]
mov dword [ebp - 0x18], edx
mov dl, byte [edx]
mov byte [ebx], dl
mov ebx, dword [ebp - 0x18]
mov dl, byte [ebp - 0x10]
mov byte [ebx], dl
mov edx, dword [ebp - 0x10]
and edx, 0xff
mov dword [ebp - 0x1c], edx
mov bl, byte [ebp + edx - 0x148]
add cl, bl
mov ebx, dword [ebp - 0x14]
mov byte [ebp - 0x30], cl
mov edx, dword [ebp - 0x30]
mov bl, byte [ebx]
and edx, 0xff
mov dl, byte [ebp + edx - 0x148]
add edx, ebx
mov bl, byte [edi]
add edx, ebx
xor ebx, ebx
and edx, 0xff
mov bl, byte [ebp + edx - 0x148]
mov edx, dword [ebp - 8]
mov edi, ebx
mov bl, byte [edx]
mov edx, dword [ebp - 0x1c]
add ebx, edx
mov dl, byte [ebp + edi - 0x148]
and ebx, 0xff
xor dl, byte [ebp + ebx - 0x148]
mov bl, byte [ebp - 1]
mov byte [ebp - 0x28], bl
xor dl, bl
test esi, esi
mov byte [ebp - 0x20], dl
jbe 0x821b80
movsx dx, dl
mov word [ebp + esi*2 - 0x15a], dx
mov edi, dword [ebp - 0x38]
inc esi
mov dl, byte [edi + esi*2 + 1]
mov bl, byte [edi + esi*2]
mov edi, dword [ebp - 0x28]
add bl, 4
and edi, 0xff
add dl, 0x4d
shl bl, 4
lea edi, [ebp + edi - 0x148]
or dl, bl
mov bl, byte [edi]
mov byte [ebp - 0x10], bl
mov ebx, dword [ebp - 0x18]
add al, byte [ebx]
mov byte [ebp - 0x24], al
mov al, byte [ebp - 0xc]
inc al
mov byte [ebp - 0xc], al
mov eax, dword [ebp - 0x24]
and eax, 0xff
mov bl, byte [ebp + eax - 0x148]
lea eax, [ebp + eax - 0x148]
mov byte [edi], bl
mov ebx, dword [ebp - 0x20]
and ebx, 0xff
mov dword [ebp - 8], eax
lea ebx, [ebp + ebx - 0x148]
mov dword [ebp - 0x14], ebx
mov bl, byte [ebx]
mov byte [eax], bl
mov eax, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x14]
and eax, 0xff
test esi, esi
lea eax, [ebp + eax - 0x148]
mov dword [ebp - 0x18], eax
mov al, byte [eax]
mov byte [ebx], al
mov ebx, dword [ebp - 0x18]
mov al, byte [ebp - 0x10]
mov byte [ebx], al
jbe 0x821c73
mov eax, dword [ebp - 0x10]
and eax, 0xff
mov bl, byte [ebp + eax - 0x148]
add bl, cl
and ebx, 0xff
mov cl, byte [ebp + ebx - 0x148]
mov ebx, dword [ebp - 0x14]
mov bl, byte [ebx]
add ecx, ebx
mov bl, byte [edi]
add ecx, ebx
xor ebx, ebx
and ecx, 0xff
mov bl, byte [ebp + ecx - 0x148]
mov ecx, dword [ebp - 8]
mov cl, byte [ecx]
add ecx, eax
mov al, byte [ebp + ebx - 0x148]
and ecx, 0xff
xor al, byte [ebp + ecx - 0x148]
xor al, dl
movsx cx, al
mov word [ebp + esi*2 - 0x15a], cx
xor ebx, ebx
cmp dword [ebp + 0x18], ebx
je 0x821c8e
lea edx, [ebp - 0x5ac]
push 0x104
push edx
call fcn.008212a0
add esp, 8
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x3a4]
push eax
push ecx
call fcn.0083042f
mov edx, dword [ebp + 0x10]
lea eax, [ebp - 0x3a4]
push edx
push eax
call fcn.0083042f
add esp, 0x10
lea ecx, [ebp - 0x3a4]
push ecx
call dword [0x8c6914]
test eax, eax
je 0x821e01
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0xfb2]
mov word [ebp - 0xfb4], bx
rep stosd dword es:[edi], eax
lea edx, [ebp - 0xfb4]
push 0x8b7700
push edx
stosw word es:[edi], ax
call fcn.0083042f
lea eax, [ebp - 0x3a4]
lea ecx, [ebp - 0xfb4]
push eax
push ecx
call fcn.0083042f
lea edx, [ebp - 0xfb4]
push 0x8b76f8
push edx
call fcn.0083042f
lea eax, [ebp - 0x5ac]
lea ecx, [ebp - 0xfb4]
push eax
push ecx
call fcn.0083042f
lea edx, [ebp - 0xfb4]
push 0x8b76f4
push edx
call fcn.0083042f
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 0xfb4]
push esi
push eax
call fcn.0083042f
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x48], ecx
lea edi, [ebp - 0x19c]
mov dword [ebp - 0x44], ecx
add esp, 0x30
mov dword [ebp - 0x40], ecx
lea edx, [ebp - 0x48]
mov dword [ebp - 0x3c], ecx
mov ecx, 0x11
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x19c]
push edx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
lea ecx, [ebp - 0xfb4]
push ebx
push ecx
push ebx
mov dword [ebp - 0x19c], 0x44
call dword [0x8c6900]
cmp word [esi], bx
je 0x821e01
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x7b2]
mov word [ebp - 0x7b4], bx
rep stosd dword es:[edi], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov esi, 0x18
stosw word es:[edi], ax
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x1f4
call ebx
push eax
call edi
dec esi
jne 0x821dbe
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x7b4]
push edx
push eax
call fcn.0083042f
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x7b4]
push ecx
push edx
call fcn.0083042f
lea eax, [ebp - 0x7b4]
push eax
call fcn.0040db90
add esp, 0x14
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret