Function at 0x685540
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c
call fcn.006f2580
push ebx
mov ebx, dword [ebp + 0x14]
xor ecx, ecx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x174]
mov edx, dword [edi + 0x164]
mov dword [ebp - 0x14], eax
mov eax, ebx
add eax, dword [edi + 0x38]
mov dword [ebp - 0x10], edx
adc ecx, dword [edi + 0x3c]
cmp ecx, 0xf
ja 0x6857e5
jb 0x685585
cmp eax, 0xffffffe0
ja 0x6857e5
cmp dword [edi + 0x16c], 0
push esi
mov esi, dword [edi + 0x168]
mov dword [edi + 0x38], eax
mov dword [edi + 0x3c], ecx
mov dword [ebp - 8], esi
je 0x6855fd
test ebx, ebx
jne 0x6855c4
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
mov eax, dword [edi + 0x160]
call eax
add esp, 8
mov dword [edi + 0x16c], ebx
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
movups xmm0, xmmword [edi + 0x40]
mov esi, 0x10
mov dword [ebp - 8], esi
movups xmmword [edi + 0x178], xmm0
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [edi + 0x16c], 0
mov eax, dword [edi + 0xc]
bswap eax
mov dword [ebp - 0xc], eax
mov eax, esi
and eax, 0xf
mov dword [ebp - 0x18], eax
je 0x685673
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 0x14], edx
mov dword [ebp - 4], ecx
nop dword [eax + eax]
test ebx, ebx
je 0x68564b
mov al, byte [eax + edi + 0x10]
dec ebx
xor al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
mov byte [esi + edi + 0x178], al
inc esi
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp + 0x14], edx
and eax, 0xf
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], eax
jne 0x685620
jmp 0x685653
test eax, eax
jne 0x6857d6
push esi
lea eax, [edi + 0x178]
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
add esp, 0x10
xor esi, esi
mov dword [ebp - 8], esi
jmp 0x68567f
mov eax, dword [ebp + 0x10]
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], eax
cmp ebx, 0x10
jb 0x6856a2
test esi, esi
je 0x6856a2
push esi
lea eax, [edi + 0x178]
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call edx
add esp, 0x10
xor esi, esi
mov dword [ebp - 8], esi
cmp ebx, 0xc00
jb 0x68571a
mov esi, dword [ebp - 4]
mov eax, 0xaaaaaaab
mul ebx
mov eax, dword [ebp + 0x14]
shr edx, 0xb
mov dword [ebp - 0x1c], edx
nop dword [eax]
push edi
push dword [ebp - 0x14]
push 0xc0
push eax
push esi
call dword [ebp + 0x18]
mov eax, dword [ebp - 0xc]
add eax, 0xc0
mov dword [ebp - 0xc], eax
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0x14]
push 0xc00
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x10]
mov eax, dword [ebp + 0x14]
add esp, 0x24
add eax, 0xc00
add esi, 0xc00
sub ebx, 0xc00
mov dword [ebp + 0x14], eax
sub dword [ebp - 0x1c], 1
jne 0x6856c0
mov dword [ebp - 4], esi
mov esi, dword [ebp - 8]
jmp 0x68571d
mov eax, dword [ebp + 0x14]
mov ecx, ebx
and ecx, 0xfffffff0
mov dword [ebp - 0x1c], ecx
je 0x685769
push edi
push dword [ebp - 0x14]
mov esi, ecx
shr esi, 4
push esi
push eax
push dword [ebp - 4]
call dword [ebp + 0x18]
mov eax, dword [ebp - 0xc]
add eax, esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0xc], eax
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x1c]
sub ebx, eax
add dword [ebp - 4], eax
push eax
push esi
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x10]
add esp, 0x24
add esi, dword [ebp - 0x1c]
mov dword [ebp + 0x14], esi
mov esi, dword [ebp - 8]
test ebx, ebx
je 0x6857d6
push dword [ebp - 0x14]
lea eax, [edi + 0x10]
push eax
mov eax, dword [edi + 0x170]
push edi
call eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp - 0x18]
inc eax
bswap eax
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0x14]
lea edx, [ecx + eax]
add ecx, 0x10
add ecx, edi
sub dword [ebp - 4], eax
lea eax, [edi + 0x178]
mov dword [ebp + 0x14], ecx
mov edi, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
mov eax, ecx
nop dword [eax + eax]
movzx eax, byte [eax]
lea edx, [edx + 1]
movzx ecx, byte [edi + edx - 1]
xor ecx, eax
mov eax, dword [ebp - 0x1c]
mov byte [edx - 1], cl
mov byte [eax + esi], cl
inc esi
mov eax, dword [ebp + 0x14]
inc eax
mov dword [ebp + 0x14], eax
sub ebx, 1
jne 0x6857b0
mov edi, dword [ebp + 8]
mov dword [edi + 0x168], esi
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret