Function at 0x1007c040
Capabilities:
Encode data using xor
Encrypt data using salsa20 or chacha

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x101114bc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x74], eax
mov eax, ebx
or eax, ecx
mov dword [ebp - 0x6c], ebx
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x58], ecx
je 0x1007c27b
xor eax, eax
nop dword [eax]
mov byte [ebp + eax - 0x14], 0
inc eax
cmp eax, 0x10
jb 0x1007c080
mov eax, dword [edx]
mov dword [ebp - 0x14], eax
mov eax, dword [edx + 4]
mov dword [ebp - 0x10], eax
push esi
test ecx, ecx
jne 0x1007c0a8
cmp ebx, 0x40
jae 0x1007c0a8
mov esi, dword [ebp + 0xc]
jmp 0x1007c1f7
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x53]
sub ebx, edi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x68], ebx
push 0
push str.expand_32_byte_k
push dword [ebp - 0x74]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.10079c20
mov ecx, dword [ebp - 0x60]
lea eax, [edi + 1]
mov dword [ebp - 0x5c], ecx
lea esi, [ebp - 0x54]
add esp, 0x14
mov dword [ebp - 0x64], 0x10
sub dword [ebp - 0x5c], edi
mov edi, dword [ebp - 0x68]
lea edx, [ecx + 3]
nop dword [eax]
mov bl, byte [esi]
test ecx, ecx
je 0x1007c11a
movzx ecx, byte [edx - 3]
xor cl, bl
mov ebx, dword [ebp - 0x5c]
mov byte [eax - 1], cl
movzx ecx, byte [edi + eax - 1]
xor cl, byte [ebx + eax]
mov byte [eax], cl
movzx ecx, byte [edi + eax]
xor cl, byte [edx - 1]
mov byte [eax + 1], cl
mov bl, byte [edx]
jmp 0x1007c12d
movzx ecx, byte [edi + eax - 1]
mov byte [eax], cl
movzx ecx, byte [edi + eax]
mov byte [eax - 1], bl
xor bl, bl
mov byte [eax + 1], cl
mov cl, byte [edi + eax + 1]
add esi, 4
xor cl, bl
add edx, 4
mov byte [eax + 2], cl
add eax, 4
sub dword [ebp - 0x64], 1
mov ecx, dword [ebp - 0x60]
jne 0x1007c0f0
movzx ecx, byte [ebp - 0xc]
movzx eax, byte [ebp - 0xb]
inc ecx
mov byte [ebp - 0xc], cl
shr ecx, 8
add ecx, eax
mov edx, dword [ebp - 0x58]
movzx eax, byte [ebp - 0xa]
mov byte [ebp - 0xb], cl
shr ecx, 8
add ecx, eax
mov edi, dword [ebp - 0x70]
movzx eax, byte [ebp - 9]
mov byte [ebp - 0xa], cl
shr ecx, 8
add ecx, eax
movzx eax, byte [ebp - 8]
mov byte [ebp - 9], cl
shr ecx, 8
add ecx, eax
movzx eax, byte [ebp - 7]
mov byte [ebp - 8], cl
shr ecx, 8
add ecx, eax
movzx eax, byte [ebp - 6]
mov byte [ebp - 7], cl
shr ecx, 8
add ecx, eax
mov eax, dword [ebp - 0x60]
mov byte [ebp - 6], cl
shr ecx, 8
add byte [ebp - 5], cl
mov ecx, dword [ebp - 0x6c]
lea esi, [eax + 0x40]
add ecx, 0xffffffc0
mov dword [ebp - 0x6c], ecx
adc edx, 0xffffffff
mov dword [ebp - 0x64], ecx
sub dword [ebp - 0x68], 0x40
add edi, 0x40
test eax, eax
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x5c], edx
cmove esi, eax
mov dword [ebp - 0x70], edi
mov dword [ebp - 0x60], esi
test edx, edx
ja 0x1007c0b6
jb 0x1007c1e4
cmp ecx, 0x40
jae 0x1007c0b6
mov eax, dword [ebp - 0x64]
mov ebx, eax
mov ecx, dword [ebp - 0x5c]
or eax, ecx
mov dword [ebp - 0x58], ecx
je 0x1007c27a
push 0
push str.expand_32_byte_k
push dword [ebp - 0x74]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x54]
push eax
call fcn.10079c20
xor edx, edx
add esp, 0x14
cmp dword [ebp - 0x58], edx
jb 0x1007c27a
ja 0x1007c21e
test ebx, ebx
je 0x1007c27a
test esi, esi
je 0x1007c25c
lea eax, [ebp - 0x54]
sub esi, eax
sub edi, eax
nop dword [eax]
lea ecx, [ebp - 0x54]
add ecx, edx
inc edx
mov al, byte [ecx + esi]
xor al, byte [ecx]
mov byte [ecx + edi], al
xor eax, eax
cmp eax, dword [ebp - 0x58]
jb 0x1007c230
ja 0x1007c27a
cmp edx, ebx
jb 0x1007c230
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10085c29
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x54]
xor ecx, ecx
sub edx, edi
mov al, byte [edi + edx]
lea edi, [edi + 1]
mov byte [edi - 1], al
inc ecx
xor eax, eax
cmp eax, dword [ebp - 0x58]
jb 0x1007c263
ja 0x1007c27a
cmp ecx, ebx
jb 0x1007c263
pop esi
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop ebx
call fcn.10085c29
mov esp, ebp
pop ebp
ret