Function at 0x689e4ae3
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x38]
mov ecx, dword [eax + 0x2c314]
mov esi, dword [eax + 0x2c310]
mov ebx, dword [eax + 0x2c30c]
mov dword [ebp + 8], ecx
mov ecx, dword [edi + 0x18]
mov dword [ebp - 4], ecx
add ecx, eax
movzx edx, byte [ecx + 1]
movzx ecx, byte [ecx]
shl ecx, 5
xor edx, ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], edx
jmp 0x689e51b8
mov edx, dword [edi + 0x1c]
sub edx, ecx
cmp edx, 3
jle 0x689e4bb9
movzx ecx, byte [eax + ecx + 2]
mov edx, dword [ebp - 0x14]
shl edx, 5
xor ecx, edx
mov dword [ebp - 0x14], ecx
and ecx, 0x1fff
lea ecx, [eax + ecx*2 + 0x2030a]
movzx edx, word [ecx]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 4]
mov word [ecx], dx
mov ecx, edx
mov edx, dword [ebp - 0x18]
and ecx, 0x7fff
add eax, 0x10106
test edx, edx
mov word [eax + ecx*2], dx
je 0x689e4baa
push dword [ebp + 0x18]
mov esi, dword [ebp - 0xc]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp - 4]
push eax
call fcn.689e48f0
mov edx, dword [ebp - 4]
mov ecx, dword [edi + 0x1c]
lea esi, [eax + edx]
cmp esi, ecx
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], eax
jle 0x689e4bb1
sub ecx, edx
mov dword [ebp - 0x10], ecx
jmp 0x689e4bae
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
cmp eax, 3
jge 0x689e4c26
mov eax, dword [ebp - 0xc]
inc dword [edi + 0x14]
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
mov edx, dword [edi + 0x38]
lea ecx, [edx + ecx*2 + 0x2f2d8]
inc word [ecx]
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
mov edx, dword [edi + 0x38]
movzx edx, word [edx + ecx*2 + 0x2f098]
mov ecx, esi
shl edx, cl
mov ecx, dword [ebp - 4]
movzx ecx, byte [ecx + eax]
or ebx, edx
mov edx, dword [edi + 0x38]
movzx ecx, byte [edx + ecx + 0x2ef78]
add esi, ecx
cmp esi, 0x10
mov dword [ebp - 8], esi
jl 0x689e4c1e
mov ecx, dword [ebp + 8]
mov byte [ecx], bl
mov edx, ebx
inc ecx
shr edx, 8
mov byte [ecx], dl
inc ecx
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], ecx
mov dword [ebp - 8], esi
inc dword [ebp - 4]
jmp 0x689e5168
inc dword [ebp - 4]
cmp eax, dword [ebp + 0x10]
jg 0x689e4fbc
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
movzx eax, byte [ecx + eax + 2]
mov edx, dword [ebp - 0x14]
shl edx, 5
xor eax, edx
mov dword [ebp - 0x14], eax
and eax, 0x1fff
lea eax, [ecx + eax*2 + 0x2030a]
movzx edx, word [eax]
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 4]
mov word [eax], dx
mov eax, edx
mov edx, dword [ebp - 0x18]
and eax, 0x7fff
add ecx, 0x10106
test edx, edx
mov word [ecx + eax*2], dx
je 0x689e4cb5
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0x14]
mov eax, dword [ebp + 0xc]
jl 0x689e4c86
sar eax, 2
push dword [ebp + 0x18]
mov esi, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x20]
push eax
push ecx
mov ecx, dword [ebp - 4]
call fcn.689e48f0
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov edx, eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x18], edx
add edx, ecx
cmp edx, eax
jle 0x689e4cb9
sub eax, ecx
mov dword [ebp - 0x18], eax
jmp 0x689e4cb9
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x10]
jle 0x689e4e6f
inc dword [edi + 0x14]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
mov edx, dword [edi + 0x38]
lea ecx, [eax + ecx - 1]
movzx eax, byte [ecx]
lea eax, [edx + eax*2 + 0x2f2d8]
inc word [eax]
movzx eax, byte [ecx]
mov ecx, dword [edi + 0x38]
movzx edx, word [ecx + eax*2 + 0x2f098]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x38]
movzx eax, byte [ecx + eax + 0x2ef78]
add esi, eax
or ebx, edx
cmp esi, 0x10
jl 0x689e4d1f
mov eax, dword [ebp + 8]
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov eax, dword [ebp - 0x20]
mov ecx, 0x100
cmp eax, ecx
jb 0x689e4d30
shr eax, 7
add eax, ecx
movzx ecx, byte [eax + 0x689e91a0]
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x689e907d]
movzx eax, byte [ecx + 0x689e1144]
mov dword [ebp - 0x24], eax
movzx eax, byte [edx + 0x689e1124]
inc dword [edi + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [edi + 0x38]
lea eax, [eax + edx*2 + 0x2f4da]
inc word [eax]
mov eax, dword [edi + 0x38]
lea eax, [eax + ecx*2 + 0x2fab8]
inc word [eax]
mov eax, dword [edi + 0x38]
movzx eax, word [eax + edx*2 + 0x2f29a]
mov dword [ebp - 8], ecx
mov ecx, esi
shl eax, cl
or ebx, eax
mov eax, dword [edi + 0x38]
movzx eax, byte [eax + edx + 0x2f079]
add esi, eax
cmp esi, 0x10
mov eax, dword [ebp + 8]
jl 0x689e4daf
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jle 0x689e4de6
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffffd
dec edx
and edx, ecx
mov ecx, esi
add esi, dword [ebp - 0x10]
shl edx, cl
or ebx, edx
cmp esi, 0x10
jl 0x689e4de6
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [edi + 0x38]
mov edx, dword [ebp - 8]
movzx edx, word [ecx + edx*2 + 0x2c638]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x38]
or ebx, edx
mov edx, dword [ebp - 8]
movzx ecx, byte [ecx + edx + 0x2c618]
add esi, ecx
cmp esi, 0x10
mov dword [ebp - 8], esi
jl 0x689e4e29
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
mov ecx, dword [ebp - 0x24]
test ecx, ecx
jle 0x689e4e61
xor edx, edx
inc edx
shl edx, cl
mov ecx, esi
add esi, dword [ebp - 0x24]
dec edx
and edx, dword [ebp - 0x20]
mov dword [ebp - 8], esi
shl edx, cl
or ebx, edx
cmp esi, 0x10
jl 0x689e4e61
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
mov eax, dword [ebp - 0x18]
inc dword [ebp - 4]
mov dword [ebp - 0x10], eax
jmp 0x689e5100
mov eax, dword [ebp - 0x1c]
mov ecx, 0x100
cmp eax, ecx
jb 0x689e4e80
shr eax, 7
add eax, ecx
movzx edx, byte [eax + 0x689e91a0]
movzx ecx, byte [edx + 0x689e1144]
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 0x689e907d]
mov dword [ebp - 0x28], ecx
movzx ecx, byte [eax + 0x689e1124]
inc dword [edi + 0x14]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edi + 0x38]
lea ecx, [ecx + eax*2 + 0x2f4da]
inc word [ecx]
mov ecx, dword [edi + 0x38]
lea ecx, [ecx + edx*2 + 0x2fab8]
inc word [ecx]
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x18], edx
movzx edx, word [ecx + eax*2 + 0x2f29a]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x38]
movzx eax, byte [ecx + eax + 0x2f079]
add esi, eax
mov eax, dword [ebp + 8]
or ebx, edx
cmp esi, 0x10
jl 0x689e4eff
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [ebp - 0x24]
test ecx, ecx
jle 0x689e4f36
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffffd
dec edx
and edx, ecx
mov ecx, esi
add esi, dword [ebp - 0x24]
shl edx, cl
or ebx, edx
cmp esi, 0x10
jl 0x689e4f36
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [edi + 0x38]
mov edx, dword [ebp - 0x18]
movzx edx, word [ecx + edx*2 + 0x2c638]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x38]
or ebx, edx
mov edx, dword [ebp - 0x18]
movzx ecx, byte [ecx + edx + 0x2c618]
add esi, ecx
cmp esi, 0x10
mov dword [ebp - 8], esi
jl 0x689e4f79
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
mov ecx, dword [ebp - 0x28]
test ecx, ecx
jle 0x689e4fb1
xor edx, edx
inc edx
shl edx, cl
mov ecx, esi
add esi, dword [ebp - 0x28]
dec edx
and edx, dword [ebp - 0x1c]
mov dword [ebp - 8], esi
shl edx, cl
or ebx, edx
cmp esi, 0x10
jl 0x689e4fb1
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
dec dword [ebp - 0x10]
inc dword [ebp - 4]
jmp 0x689e5100
mov ecx, dword [ebp - 0x1c]
mov edx, 0x100
cmp ecx, edx
jb 0x689e4fcd
shr ecx, 7
add ecx, edx
movzx edx, byte [eax + 0x689e907d]
movzx ecx, byte [ecx + 0x689e91a0]
movzx eax, byte [ecx + 0x689e1144]
mov dword [ebp - 0x18], eax
movzx eax, byte [edx + 0x689e1124]
inc dword [edi + 0x14]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x38]
lea eax, [eax + edx*2 + 0x2f4da]
inc word [eax]
mov eax, dword [edi + 0x38]
lea eax, [eax + ecx*2 + 0x2fab8]
inc word [eax]
mov eax, dword [edi + 0x38]
movzx eax, word [eax + edx*2 + 0x2f29a]
mov dword [ebp - 0x24], ecx
mov ecx, esi
shl eax, cl
or ebx, eax
mov eax, dword [edi + 0x38]
movzx eax, byte [eax + edx + 0x2f079]
add esi, eax
cmp esi, 0x10
mov eax, dword [ebp + 8]
jl 0x689e5049
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [ebp - 0x28]
test ecx, ecx
jle 0x689e5080
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffffd
dec edx
and edx, ecx
mov ecx, esi
add esi, dword [ebp - 0x28]
shl edx, cl
or ebx, edx
cmp esi, 0x10
jl 0x689e5080
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
mov dword [ebp + 8], eax
sub esi, 0x10
mov ecx, dword [edi + 0x38]
mov edx, dword [ebp - 0x24]
movzx edx, word [ecx + edx*2 + 0x2c638]
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x38]
or ebx, edx
mov edx, dword [ebp - 0x24]
movzx ecx, byte [ecx + edx + 0x2c618]
add esi, ecx
cmp esi, 0x10
mov dword [ebp - 8], esi
jl 0x689e50c3
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
cmp dword [ebp - 0x18], 0
jle 0x689e5100
mov ecx, dword [ebp - 0x18]
xor eax, eax
inc eax
shl eax, cl
mov ecx, esi
add esi, dword [ebp - 0x18]
dec eax
and eax, dword [ebp - 0x1c]
mov dword [ebp - 8], esi
shl eax, cl
or ebx, eax
cmp esi, 0x10
jl 0x689e5100
mov eax, dword [ebp + 8]
mov byte [eax], bl
mov ecx, ebx
inc eax
shr ecx, 8
mov byte [eax], cl
inc eax
shr ebx, 0x10
sub esi, 0x10
mov dword [ebp + 8], eax
mov dword [ebp - 8], esi
mov edx, dword [edi + 0x1c]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
sub edx, ecx
cmp edx, eax
jg 0x689e5118
lea eax, [ecx + eax - 1]
mov dword [ebp - 4], eax
jmp 0x689e5165
dec eax
test eax, eax
jle 0x689e5165
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + edx + 2]
mov ecx, dword [ebp - 0x14]
shl ecx, 5
xor eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
and eax, 0x1fff
lea eax, [ecx + eax*2 + 0x2030a]
movzx ecx, word [eax]
mov word [eax], dx
mov eax, dword [ebp - 0xc]
and edx, 0x7fff
add eax, 0x10106
inc dword [ebp - 4]
dec dword [ebp - 0x28]
mov word [eax + edx*2], cx
jne 0x689e5120
mov eax, dword [ebp - 0xc]
cmp dword [edi + 0x14], 0xfff2
jae 0x689e517c
lea ecx, [eax + 0x2c302]
cmp dword [ebp + 8], ecx
jb 0x689e51b8
mov eax, dword [ebp + 8]
mov byte [eax], bl
inc eax
mov ecx, ebx
shr ecx, 8
mov byte [eax], cl
inc eax
push edi
mov dword [ebp + 8], eax
call fcn.689e7988
cmp dword [edi], 0
mov eax, dword [ebp - 0xc]
jne 0x689e51c4
mov ecx, dword [eax + 0x2c314]
mov ebx, dword [eax + 0x2c30c]
mov eax, dword [eax + 0x2c310]
mov dword [ebp - 8], eax
mov esi, eax
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 4]
cmp ecx, dword [edi + 0x1c]
jl 0x689e4b2b
mov ecx, dword [ebp + 8]
mov dword [eax + 0x2c314], ecx
mov dword [eax + 0x2c30c], ebx
mov dword [eax + 0x2c310], esi
mov eax, dword [ebp - 4]
cmp eax, 0x10000
mov dword [edi + 0x18], eax
jne 0x689e51ec
push edi
call fcn.689e4985
pop edi
pop esi
pop ebx
leave
ret 0x14