Function at 0x696640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x30
call fcn.00702be0
mov eax, dword [0x8fc044]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], esi
mov bl, byte [esi]
mov edi, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], eax
test bl, 0x40
jne 0x696687
push eax
lea eax, [esi + 0x10]
push eax
push esi
call edi
add esp, 0xc
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x30], edx
cmp edx, 0xf
jae 0x6966b3
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x6966a0
movzx eax, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
mov eax, dword [ebp + 0x14]
cmp ecx, eax
je 0x6966d8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00703eaa
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
cmp eax, 0x10
jb 0x69676a
mov edi, 0xfffffff8
sub edi, esi
shr eax, 4
mov dword [ebp - 0x28], eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
add esp, 0xc
lea eax, [esi + 0x10]
add byte [eax - 1], 1
lea eax, [eax - 1]
jne 0x696712
lea ecx, [edi + eax]
test ecx, ecx
jne 0x696702
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x10]
xor ecx, dword [ebp - 0x14]
push dword [ebp - 0x20]
mov dword [edx + 4], eax
mov dword [edx], ecx
xor dword [esi + 0x14], eax
xor dword [esi + 0x10], ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
xor eax, dword [ebp - 8]
xor ecx, dword [ebp - 0xc]
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
xor dword [esi + 0x1c], eax
lea eax, [esi + 0x10]
xor dword [esi + 0x18], ecx
push eax
push eax
call dword [ebp - 0x24]
mov eax, dword [ebp + 0x14]
add esp, 0xc
add dword [ebp - 0x1c], 0x10
sub eax, 0x10
add ebx, 0x10
mov dword [ebp + 0x14], eax
sub dword [ebp - 0x28], 1
jne 0x6966f1
mov edi, dword [ebp - 0x24]
test eax, eax
je 0x6967c8
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
call edi
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jbe 0x6967b5
lea eax, [ebp - 0x14]
sub ebx, eax
sub dword [ebp - 0x1c], eax
lea eax, [esi + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x14]
add ecx, edi
movzx edx, byte [ebx + ecx]
movzx eax, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0x1c]
mov byte [eax + ecx], dl
mov eax, dword [ebp - 0x28]
xor byte [eax + edi], dl
inc edi
cmp edi, esi
jb 0x696793
mov esi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x20]
lea eax, [esi + 0x10]
mov edi, dword [ebp - 0x24]
push ebx
push eax
push eax
call edi
add esp, 0xc
jmp 0x6967cb
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x30]
cmp edx, 0x10
jae 0x6967f0
mov ecx, 0x10
lea edi, [edx + esi]
sub ecx, edx
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp - 0x24]
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
call edi
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 8]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x15]
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi], al
xor ecx, ebp
pop esi
xor eax, eax
pop ebx
call fcn.00703eaa
mov esp, ebp
pop ebp
ret