Function at 0x689e4320
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x14], eax
add eax, 0x930c
cmp dword [eax], 0
jne 0x689e434a
push edi
mov dword [eax], 1
call fcn.689e40d3
mov eax, dword [edi + 0x30]
mov ecx, dword [ebp - 0x14]
mov esi, dword [edi + 0x20]
mov ebx, dword [edi + 0x2c]
mov dword [ebp - 4], eax
mov eax, dword [edi + 0x18]
add ecx, eax
movzx edx, byte [ecx]
movzx ecx, byte [ecx + 1]
shl edx, 4
xor edx, ecx
cmp eax, dword [edi + 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], edx
jge 0x689e48b9
jmp 0x689e437e
mov edx, dword [ebp - 0x10]
cmp esi, dword [edi + 0x28]
jae 0x689e48b9
mov ecx, dword [edi + 0x1c]
sub ecx, eax
cmp ecx, 3
jle 0x689e4410
mov edi, dword [ebp - 0x14]
movzx ecx, byte [edi + eax + 2]
shl edx, 4
xor ecx, edx
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, [edi + ecx*2 + 0x830a]
movzx edx, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
test edx, edx
mov dword [ebp - 0x18], ecx
lea ecx, [edi + 0x4106]
mov edi, dword [ebp - 0x18]
mov word [ecx + edi*2], dx
je 0x689e4457
push dword [ebp + 0x18]
lea edi, [ebp - 0x1c]
push dword [ebp + 0xc]
push edi
mov edi, dword [ebp - 0x14]
push ecx
mov ecx, eax
call fcn.689e418e
mov edx, dword [ebp - 8]
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
lea edi, [ecx + edx]
cmp edi, eax
mov dword [ebp - 0xc], ecx
jle 0x689e4405
sub eax, edx
mov dword [ebp - 0xc], eax
mov ecx, eax
mov eax, dword [ebp - 8]
cmp ecx, 3
jge 0x689e4460
mov edi, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [eax + ecx]
mov ecx, dword [ecx*4 + 0x689e1660]
mov edx, ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 4]
shr edx, 5
shl edx, cl
mov ecx, dword [ebp - 0x18]
and ecx, 0x1f
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x689e444e
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
inc eax
mov dword [ebp - 8], eax
jmp 0x689e48b0
and dword [ebp - 0xc], 0
mov ecx, dword [ebp - 0xc]
jmp 0x689e4408
inc eax
cmp ecx, dword [ebp + 0x10]
mov dword [ebp - 8], eax
jg 0x689e474d
mov edi, dword [ebp - 0x14]
movzx ecx, byte [edi + eax + 2]
mov edx, dword [ebp - 0x10]
shl edx, 4
xor ecx, edx
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, [edi + ecx*2 + 0x830a]
movzx edx, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
add edi, 0x4106
test edx, edx
mov word [edi + ecx*2], dx
je 0x689e4555
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp + 0x14]
mov ecx, dword [ebp + 0xc]
jl 0x689e44bb
sar ecx, 2
push dword [ebp + 0x18]
push ecx
lea ecx, [ebp - 0x20]
push ecx
push edi
mov edi, dword [ebp - 0x14]
mov ecx, eax
call fcn.689e418e
mov ecx, dword [ebp - 8]
mov edx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x18], edx
add edx, ecx
cmp edx, eax
jle 0x689e44e7
sub eax, ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 0x18], ecx
jle 0x689e4648
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [eax + ecx - 1]
mov edx, dword [ecx*4 + 0x689e1660]
mov ecx, dword [ebp - 4]
mov edi, edx
shr edi, 5
shl edi, cl
and edx, 0x1f
add dword [ebp - 4], edx
push 0x10
pop edx
or ebx, edi
cmp dword [ebp - 4], edx
jl 0x689e4530
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x18]
mov edi, dword [ecx*4 + 0x689e1a58]
mov ecx, edi
and ecx, 0x1f
mov dword [ebp - 0xc], ecx
cmp ecx, edx
mov ecx, dword [ebp - 4]
jg 0x689e455b
shr edi, 5
shl edi, cl
or ebx, edi
add ecx, dword [ebp - 0xc]
jmp 0x689e459a
and dword [ebp - 0x18], 0
jmp 0x689e44ea
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
push 0x10
or ebx, edx
pop edx
add dword [ebp - 4], edx
cmp dword [ebp - 4], edx
jl 0x689e4586
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 4]
shr edi, 0x15
shl edi, cl
mov ecx, dword [ebp - 0xc]
or ebx, edi
mov edi, dword [ebp - 4]
lea ecx, [edi + ecx - 0x10]
cmp ecx, edx
mov dword [ebp - 4], ecx
jl 0x689e45b2
sub dword [ebp - 4], edx
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x20]
mov edi, 0x100
cmp ecx, edi
jb 0x689e45c3
shr ecx, 7
add ecx, edi
movzx ecx, byte [ecx + 0x689e91a0]
mov ecx, dword [ecx*4 + 0x689e1e68]
mov edi, ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
shr edi, 8
shl edi, cl
mov ecx, dword [ebp - 0xc]
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edi
cmp dword [ebp - 4], edx
jl 0x689e45ff
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0xc]
shr ecx, 4
and ecx, 0xf
mov dword [ebp - 0xc], ecx
je 0x689e4639
mov edi, dword [ecx*4 + 0x689e1260]
and edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
shl edi, cl
add ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, edx
jl 0x689e4639
sub dword [ebp - 4], edx
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x18]
inc eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jmp 0x689e4846
mov edi, dword [ecx*4 + 0x689e1a58]
mov ecx, dword [ebp - 4]
mov edx, edi
and edx, 0x1f
cmp edx, 0x10
mov dword [ebp - 0x18], edx
jg 0x689e466f
add dword [ebp - 4], edx
shr edi, 5
shl edi, cl
or ebx, edi
cmp dword [ebp - 4], 0x10
jmp 0x689e46ae
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
mov ecx, dword [ebp - 4]
add ecx, 0x10
or ebx, edx
cmp ecx, 0x10
jl 0x689e469a
mov byte [esi], bl
mov edx, ebx
inc esi
shr edx, 8
mov byte [esi], dl
inc esi
sub ecx, 0x10
shr ebx, 0x10
mov edx, dword [ebp - 0x18]
shr edi, 0x15
shl edi, cl
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, 0x10
jl 0x689e46c2
sub dword [ebp - 4], 0x10
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x1c]
mov edx, 0x100
cmp ecx, edx
jb 0x689e46d3
shr ecx, 7
add ecx, edx
movzx ecx, byte [ecx + 0x689e91a0]
mov edi, dword [ecx*4 + 0x689e1e68]
mov ecx, dword [ebp - 4]
mov edx, edi
shr edx, 8
shl edx, cl
mov ecx, edi
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x689e470d
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
shr edi, 4
and edi, 0xf
je 0x689e4741
mov edx, dword [edi*4 + 0x689e1260]
and edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
add dword [ebp - 4], edi
shl edx, cl
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x689e4741
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
dec dword [ebp - 0xc]
inc eax
mov dword [ebp - 8], eax
jmp 0x689e4846
mov edi, dword [ecx*4 + 0x689e1a58]
mov ecx, dword [ebp - 4]
mov edx, edi
and edx, 0x1f
cmp edx, 0x10
mov dword [ebp - 0x18], edx
jg 0x689e4774
add dword [ebp - 4], edx
shr edi, 5
shl edi, cl
or ebx, edi
cmp dword [ebp - 4], 0x10
jmp 0x689e47b3
mov edx, edi
shr edx, 5
and edx, 0xffff
shl edx, cl
mov ecx, dword [ebp - 4]
add ecx, 0x10
or ebx, edx
cmp ecx, 0x10
jl 0x689e479f
mov byte [esi], bl
mov edx, ebx
inc esi
shr edx, 8
mov byte [esi], dl
inc esi
sub ecx, 0x10
shr ebx, 0x10
mov edx, dword [ebp - 0x18]
shr edi, 0x15
shl edi, cl
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 4], ecx
or ebx, edi
cmp ecx, 0x10
jl 0x689e47c7
sub dword [ebp - 4], 0x10
mov ecx, ebx
mov byte [esi], bl
shr ecx, 8
inc esi
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp - 0x1c]
mov edx, 0x100
cmp ecx, edx
jb 0x689e47d8
shr ecx, 7
add ecx, edx
movzx ecx, byte [ecx + 0x689e91a0]
mov edi, dword [ecx*4 + 0x689e1e68]
mov ecx, dword [ebp - 4]
mov edx, edi
shr edx, 8
shl edx, cl
mov ecx, edi
and ecx, 0xf
add dword [ebp - 4], ecx
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x689e4812
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
shr edi, 4
and edi, 0xf
je 0x689e4846
mov edx, dword [edi*4 + 0x689e1260]
and edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
add dword [ebp - 4], edi
shl edx, cl
or ebx, edx
cmp dword [ebp - 4], 0x10
jl 0x689e4846
sub dword [ebp - 4], 0x10
mov byte [esi], bl
mov ecx, ebx
inc esi
shr ecx, 8
mov byte [esi], cl
inc esi
shr ebx, 0x10
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1c]
mov ecx, dword [ebp - 0xc]
sub edx, eax
cmp edx, ecx
jg 0x689e485e
lea eax, [eax + ecx - 1]
mov dword [ebp - 8], eax
jmp 0x689e48ad
dec ecx
test ecx, ecx
jle 0x689e48ad
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x14]
movzx ecx, byte [edx + eax + 2]
mov edi, dword [ebp - 0x10]
shl edi, 4
xor ecx, edi
mov dword [ebp - 0x10], ecx
and ecx, 0x7ff
lea ecx, [edx + ecx*2 + 0x830a]
movzx edi, word [ecx]
mov word [ecx], ax
mov ecx, eax
and ecx, 0x1fff
mov dword [ebp - 0xc], ecx
lea ecx, [edx + 0x4106]
mov edx, dword [ebp - 0xc]
inc eax
dec dword [ebp - 0x18]
mov word [ecx + edx*2], di
jne 0x689e4866
mov dword [ebp - 8], eax
mov edi, dword [ebp + 8]
cmp eax, dword [edi + 0x1c]
jl 0x689e437b
mov ecx, dword [ebp - 4]
mov dword [edi + 0x30], ecx
mov ecx, eax
sub ecx, dword [edi + 0x1c]
mov dword [edi + 0x18], eax
neg ecx
sbb ecx, ecx
and ecx, 2
cmp eax, 0x4000
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x20], esi
mov dword [edi], ecx
jne 0x689e48e4
mov ebx, edi
call fcn.689e411f
pop edi
pop esi
pop ebx
leave
ret 0x14