Function at 0x6ad9b6e0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, edx
push edi
mov edi, ecx
push esi
mov esi, eax
push ebx
xor ebx, ebx
sub esp, 0x5c
mov dword [esp + 0x1c], eax
call fcn.6ad9b1b0
mov eax, dword [esi + 0x326c]
mov dword [esp + 0x24], ebp
xor ecx, ecx
mov dword [esp + 0x28], edi
mov ebp, esi
mov dword [esp + 0x20], eax
imul eax, eax, 0x11d8
lea edx, [esi + eax]
mov dword [esp + 0x34], eax
xor eax, eax
mov dword [esp + 0x40], edx
mov edi, edx
lea esi, [esi]
nop
mov esi, dword [ebp + eax*4 + 0xe44]
lea edx, [esi + esi*2]
add ebx, edx
movzx edx, byte [edi + eax + 0x208b]
add eax, 1
imul edx, esi
add ecx, edx
cmp eax, 8
jne 0x6ad9b728
add ecx, 0x18
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x20]
cmp ecx, ebx
mov ebx, dword [esp + 0x1c]
sbb edx, edx
mov ecx, dword [ebp + 4]
mov esi, dword [ebp + 0x10]
xor eax, 1
not edx
imul eax, eax, 0x11d8
add edx, 2
mov dword [esp + 0x30], edx
mov dword [esp + 0x38], eax
lea eax, [ebx + eax + 0x1d00]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x74]
lea eax, [ebx + eax*8 + 0x3270]
mov dword [esp + 0x2c], eax
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x3c], eax
mov eax, dword [ebp]
shl eax, 3
or eax, edx
lea edx, [ecx + 3]
mov dword [ebp + 4], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp], eax
sub esi, edx
cmp esi, 5
jle 0x6ad9bca0
sub ecx, 0xd
shr eax, cl
mov word [edx], ax
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edx, ecx
and ecx, 0xf
shr edx, 4
mov dword [ebp + 4], ecx
lea ebx, [ecx + 1]
lea edx, [eax + edx*2]
mov eax, dword [ebp]
sub esi, edx
mov dword [ebp + 0xc], edx
add eax, eax
cmp dword [esp + 0x70], 0x8000
je 0x6ad9bba0
mov dword [ebp], eax
mov dword [ebp + 4], ebx
cmp esi, 5
jle 0x6ad9b835
sub ecx, 0xf
shr eax, cl
mov word [edx], ax
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edx, ecx
mov ebx, ecx
shr edx, 4
and ebx, 0xf
lea edx, [eax + edx*2]
mov dword [ebp + 4], ebx
mov eax, dword [ebp]
mov dword [ebp + 0xc], edx
sub esi, edx
cmp dword [esp + 0x3c], 0xf
jbe 0x6ad9b880
mov ecx, dword [esp + 0x70]
shl eax, 8
shr ecx, 0x10
or eax, ecx
lea ecx, [ebx + 8]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
cmp esi, 5
jle 0x6ad9bd7f
lea ecx, [ebx - 8]
shr eax, cl
mov word [edx], ax
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
mov edx, ecx
mov ebx, ecx
shr edx, 4
and ebx, 0xf
lea edx, [eax + edx*2]
mov eax, dword [ebp]
mov dword [ebp + 0xc], edx
sub esi, edx
movzx ecx, word [esp + 0x70]
shl eax, 0x10
or eax, ecx
lea ecx, [ebx + 0x10]
mov dword [ebp], eax
mov dword [ebp + 4], ecx
cmp esi, 5
jle 0x6ad9b8b2
mov ecx, ebx
shr eax, cl
mov word [edx], ax
mov eax, dword [ebp + 4]
mov edx, eax
and eax, 0xf
shr edx, 4
mov dword [ebp + 4], eax
add edx, edx
add dword [ebp + 0xc], edx
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
lea esi, [edx + ecx + 0x1f91]
lea eax, [edx + ecx + 0x1d00]
mov dword [esp + 0x3c], esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
lea ebx, [esi + 0x100]
mov esi, dword [esp + 0x28]
lea eax, [edx + eax + 0x1f91]
mov dword [esp + 0x28], eax
sub esi, 0x100
cmp dword [esp + 0x30], 2
lea eax, [edx + ecx + 0x1e00]
mov dword [esp + 0x38], eax
je 0x6ad9bcc0
mov dword [esp], 0x100
mov ecx, dword [esp + 0x24]
mov eax, ebp
mov edx, dword [esp + 0x34]
call fcn.6ad9b260
mov dword [esp], esi
mov edx, dword [esp + 0x38]
mov ecx, ebx
mov eax, ebp
call fcn.6ad9b260
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
mov eax, ebp
mov dword [esp], 0xf9
call fcn.6ad9b260
mov dword [esp + 0x44], 0x32
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x3c], edi
imul eax, esi, 0x11d8
add eax, ebx
mov dword [esp + 0x20], eax
imul eax, esi, 0x476
mov dword [esp + 0x24], eax
jmp 0x6ad9ba15
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
sub ecx, 3
shr edi, 3
shl eax, cl
add edx, ecx
or eax, edi
mov dword [ebp + 4], edx
mov dword [ebp], eax
cmp ebx, 5
jle 0x6ad9bc68
lea ecx, [edx - 0x10]
mov edi, dword [esp + 0x20]
shr eax, cl
mov word [esi], ax
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 0x10]
shr edx, 4
lea ebx, [eax + edx*2]
mov eax, dword [esp + 0x40]
mov edx, dword [ebp]
sub esi, ebx
mov dword [ebp + 0xc], ebx
and eax, 7
movzx ecx, byte [eax + edi + 0x208b]
mov edi, dword [esp + 0x24]
lea eax, [eax + edi + 0x734]
mov edi, dword [esp + 0x1c]
shl edx, cl
or edx, dword [edi + eax*4 + 0x10]
mov eax, dword [ebp + 4]
mov dword [ebp], edx
and eax, 0xf
add eax, ecx
mov dword [ebp + 4], eax
cmp esi, 5
jle 0x6ad9ba10
lea ecx, [eax - 0x10]
shr edx, cl
mov word [ebx], dx
mov eax, dword [ebp + 4]
mov edx, eax
and eax, 0xf
shr edx, 4
mov dword [ebp + 4], eax
add edx, edx
add dword [ebp + 0xc], edx
add dword [esp + 0x2c], 8
mov eax, dword [esp + 0x2c]
mov edx, dword [eax]
mov eax, edx
and eax, 0x1ff
shr edx, 9
mov dword [esp + 0x28], eax
jne 0x6ad9bbd8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x6ad9bc4f
add dword [esp + 0x3c], eax
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov ebx, dword [eax + 4]
mov edx, ebx
and ebx, 0x3ff
lea eax, [ebx - 0x100]
shr edx, 0xa
shr eax, 3
mov dword [esp + 0x40], edx
mov esi, eax
mov dword [esp + 0x30], eax
movzx eax, byte [eax + 0x6ade1fa0]
mov dword [esp + 0x34], eax
lea eax, [edx - 2]
sub eax, dword [esi*4 + 0x6ade1fe0]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x20]
mov esi, dword [ebp + 0xc]
movzx edx, byte [ebx + eax + 0x1d00]
mov eax, dword [ebp]
mov ecx, edx
add edx, dword [ebp + 4]
shl eax, cl
lea ecx, [ebx + edi + 0x3ac]
mov edi, dword [esp + 0x1c]
mov ebx, dword [ebp + 0x10]
or eax, dword [edi + ecx*4 + 0xc]
sub ebx, esi
mov dword [ebp + 4], edx
mov dword [ebp], eax
cmp ebx, 5
jle 0x6ad9bae0
lea ecx, [edx - 0x10]
shr eax, cl
mov word [esi], ax
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov ecx, edx
and edx, 0xf
shr ecx, 4
mov dword [ebp + 4], edx
lea esi, [eax + ecx*2]
mov eax, dword [ebp]
mov dword [ebp + 0xc], esi
sub ebx, esi
mov ecx, dword [esp + 0x28]
cmp ecx, 8
jbe 0x6ad9bb4d
mov edi, dword [esp + 0x20]
movzx edi, byte [ecx + edi + 0x1f88]
mov dword [esp + 0x28], edi
mov edi, ecx
mov ecx, dword [esp + 0x24]
lea edi, [edi + ecx + 0x633]
movzx ecx, byte [esp + 0x28]
shl eax, cl
mov ecx, dword [esp + 0x1c]
or eax, dword [ecx + edi*4 + 0xc]
mov edi, dword [esp + 0x28]
mov dword [ebp], eax
add edx, edi
mov dword [ebp + 4], edx
cmp ebx, 5
jle 0x6ad9bb4d
lea ecx, [edx - 0x10]
shr eax, cl
mov word [esi], ax
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov ecx, edx
and edx, 0xf
shr ecx, 4
mov dword [ebp + 4], edx
lea esi, [eax + ecx*2]
mov eax, dword [ebp]
mov dword [ebp + 0xc], esi
sub ebx, esi
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x30], ecx
jae 0x6ad9b978
mov edi, dword [esp + 0x34]
mov ecx, edi
add edi, edx
shl eax, cl
mov ecx, dword [esp + 0x38]
mov dword [ebp + 4], edi
or eax, ecx
mov ecx, edi
mov dword [ebp], eax
cmp ebx, 5
jle 0x6ad9ba10
sub ecx, 0x10
shr eax, cl
mov word [esi], ax
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
mov eax, dword [ebp + 0xc]
shr edx, cl
mov word [eax + 2], dx
jmp 0x6ad9b9fd
or eax, 1
mov dword [ebp + 4], ebx
mov dword [ebp], eax
cmp esi, 5
jle 0x6ad9b8b2
sub ecx, 0xf
shr eax, cl
mov word [edx], ax
mov edx, dword [ebp + 4]
mov eax, edx
and edx, 0xf
shr eax, 4
mov dword [ebp + 4], edx
add eax, eax
add dword [ebp + 0xc], eax
jmp 0x6ad9b8b2
mov edi, dword [esp + 0x3c]
add edx, edi
nop
movzx ebx, byte [edi]
mov eax, dword [esp + 0x20]
add edi, 1
mov esi, dword [esp + 0x24]
movzx ecx, byte [ebx + eax + 0x1d00]
mov eax, dword [ebp]
lea ebx, [ebx + esi + 0x3ac]
mov esi, dword [esp + 0x1c]
shl eax, cl
add ecx, dword [ebp + 4]
or eax, dword [esi + ebx*4 + 0xc]
mov ebx, dword [ebp + 0xc]
mov dword [ebp + 4], ecx
mov esi, dword [ebp + 0x10]
mov dword [ebp], eax
sub esi, ebx
cmp esi, 5
jle 0x6ad9bc3b
sub ecx, 0x10
shr eax, cl
mov word [ebx], ax
mov eax, dword [ebp + 4]
mov ecx, eax
and eax, 0xf
shr ecx, 4
mov dword [ebp + 4], eax
add ecx, ecx
add dword [ebp + 0xc], ecx
cmp edi, edx
jne 0x6ad9bbe0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x3c], edi
test eax, eax
jne 0x6ad9ba3b
mov eax, dword [esp + 0x1c]
xor dword [eax + 0x326c], 1
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x20]
and ebx, 7
movzx ecx, byte [ebx + edi + 0x208b]
mov edi, dword [esp + 0x24]
lea ebx, [ebx + edi + 0x734]
mov edi, dword [esp + 0x1c]
shl eax, cl
add ecx, edx
or eax, dword [edi + ebx*4 + 0x10]
mov dword [ebp + 4], ecx
mov dword [ebp], eax
jmp 0x6ad9ba10
add eax, eax
cmp dword [esp + 0x70], 0x8000
lea ebx, [ecx + 4]
je 0x6ad9bd71
mov dword [ebp + 4], ebx
jmp 0x6ad9b835
mov dword [esp + 0x30], ebx
xor edx, edx
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], edi
mov edi, dword [esp + 0x40]
lea esi, [esi]
mov eax, dword [ebp]
movzx ecx, byte [edi + edx + 0x208b]
mov esi, dword [ebp + 0xc]
shl eax, 3
or eax, ecx
mov ecx, dword [ebp + 4]
mov dword [ebp], eax
lea ebx, [ecx + 3]
mov dword [ebp + 4], ebx
mov ebx, dword [ebp + 0x10]
sub ebx, esi
cmp ebx, 5
jle 0x6ad9bd1c
sub ecx, 0xd
shr eax, cl
mov word [esi], ax
mov eax, dword [ebp + 4]
mov ecx, eax
and eax, 0xf
shr ecx, 4
mov dword [ebp + 4], eax
add ecx, ecx
add dword [ebp + 0xc], ecx
add edx, 1
cmp edx, 8
jne 0x6ad9bcd8
mov dword [esp], 0x100
mov esi, dword [esp + 0x48]
mov eax, ebp
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x4c]
call fcn.6ad9b260
mov dword [esp], esi
mov edx, dword [esp + 0x38]
mov eax, ebp
mov ecx, ebx
call fcn.6ad9b260
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
mov eax, ebp
mov dword [esp], 0xf9
call fcn.6ad9b260
jmp 0x6ad9b94d
or eax, 1
mov dword [ebp + 4], ebx
mov dword [ebp], eax
jmp 0x6ad9b8b2
movzx edx, word [esp + 0x70]
shl eax, 0x10
or eax, edx
mov dword [ebp], eax
lea eax, [ebx + 0x18]
mov dword [ebp + 4], eax
jmp 0x6ad9b8b2