Function at 0x7ca730
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov eax, dword [rcx]
mov esi, dword [rsp + 0xd0]
mov r13d, dword [rsp + 0xc0]
mov r12, qword [rsp + 0xc8]
mov ebx, r13d
mov dword [rsp + 0x3c], eax
mov rdi, rcx
mov eax, dword [rcx + 0x14]
mov ecx, esi
sub ecx, 1
mov qword [rsp + 0xa8], rdx
mov dword [rsp + 0xb0], r8d
mov dword [rsp + 0xb8], r9d
mov dword [rsp + 0x2c], eax
mov dword [rsp + 0x44], ecx
js 0x7cad25
movsxd rax, esi
movsxd rdx, ecx
lea r9, [r12 + rax - 2]
mov eax, ecx
add rdx, r12
sub r9, rax
mov eax, 0xd
nop dword [rax]
movzx r8d, byte [rdx]
lea ecx, [rax*8]
sub rdx, 1
xor ecx, r8d
xor eax, ecx
cmp r9, rdx
jne 0x7ca7b0
lea r15d, [rax*8]
movzx ecx, r13b
xor eax, r15d
xor edx, edx
xor eax, ecx
mov dword [rsp + 0x40], ecx
mov rcx, qword [rdi + 0x20]
div dword [rsp + 0x2c]
mov qword [rsp + 0x30], rcx
mov eax, edx
mov dword [rsp + 0x38], edx
mov r15, qword [rcx + rax*8]
lea rbp, [rax*8]
test r15, r15
je 0x7cabe0
movsxd r14, esi
jmp 0x7ca81c
mov r15, qword [r15]
test r15, r15
je 0x7cabe0
cmp byte [r15 + 0x30], bl
jne 0x7ca810
cmp dword [r15 + 0x1c], esi
jne 0x7ca810
lea rcx, [r15 + 0x31]
mov r8, r14
mov rdx, r12
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x7ca810
mov ebx, dword [r15 + 0x10]
mov esi, dword [r15 + 0x18]
mov r11d, eax
mov eax, ebx
sub eax, esi
cmp eax, 0x15
jle 0x7cab50
mov ebx, esi
mov rax, qword [r15 + 0x28]
neg ebx
cmp rax, qword [rsp + 0xa8]
je 0x7caae7
mov r12, qword [rsp + 0xa8]
mov rcx, rdi
xor r8d, r8d
mov rdx, r15
sub r12, rax
call fcn.00728ee0
movsxd rcx, dword [r15 + 0x18]
add rcx, r15
cmp r12, 0x7f
jbe 0x7cad17
cmp r12, 0x3fff
jbe 0x7cacd5
mov rdx, r12
call fcn.0076d570
mov r11d, eax
mov rax, qword [rsp + 0xa8]
mov edx, dword [rdi]
add r11d, dword [r15 + 0x18]
mov dword [r15 + 0x18], r11d
mov qword [r15 + 0x28], rax
mov dword [r15 + 0x14], r11d
cmp edx, 1
je 0x7cacf4
add r11d, 1
xor eax, eax
test edx, edx
mov r9d, dword [rsp + 0xb0]
setne al
mov dword [r15 + 0x18], r11d
neg eax
mov dword [r15 + 0x24], 0
mov word [r15 + 0x22], ax
test r9d, r9d
js 0x7cabc6
cwde
mov esi, r11d
mov r10d, 1
cmp dword [rsp + 0xb0], eax
je 0x7cab32
movsxd rcx, esi
add rcx, r15
test edx, edx
je 0x7cad42
movzx eax, word [rsp + 0xb0]
mov word [r15 + 0x22], ax
mov edx, dword [rsp + 0xb0]
sub edx, dword [r15 + 0x24]
add edx, 2
movsxd rdx, edx
cmp rdx, 0x7f
jbe 0x7cad35
cmp rdx, 0x3fff
jbe 0x7cad84
call fcn.0076d570
mov r11d, eax
mov eax, dword [rsp + 0xb0]
add r11d, dword [r15 + 0x18]
mov dword [r15 + 0x18], r11d
add r11d, ebx
mov dword [r15 + 0x24], eax
jmp 0x7cabce
add rsi, 8
cmp rbp, rsi
jne 0x7cac68
mov esi, dword [rsp + 0xd0]
mov rcx, qword [rsp + 0x30]
call fcn.0082d7e0
mov ecx, dword [rsp + 0x44]
mov dword [rdi + 0x14], ebx
mov qword [rdi + 0x20], r14
test ecx, ecx
js 0x7cada1
movsxd rdx, esi
movsxd rax, ecx
lea r9, [r12 + rdx - 2]
mov edx, ecx
add rax, r12
sub r9, rdx
mov edx, 0xd
nop dword [rax]
movzx r8d, byte [rax]
lea ecx, [rdx*8]
sub rax, 1
xor ecx, r8d
xor edx, ecx
cmp r9, rax
jne 0x7ca9d0
lea eax, [rdx*8]
xor eax, edx
xor edx, edx
xor eax, dword [rsp + 0x40]
div ebx
mov dword [rsp + 0x38], edx
call fcn.0082e1a0
mov ebx, eax
test eax, eax
jne 0x7cabb0
mov r14, qword [rsp + 0x48]
mov rcx, r14
call fcn.007dc490
mov r15, rax
test rax, rax
je 0x7cabb0
mov qword [rax + 0x10], 0
lea rcx, [rax + 0x31]
mov rdx, r12
mov byte [rax + 0x30], r13b
movsxd r13, esi
mov qword [rax], 0
mov r8, r13
mov qword [rax + 8], 0
mov qword [rax + 0x18], 0
mov qword [rax + 0x20], 0
mov qword [rax + 0x28], 0
mov dword [rax + 0x10], r14d
call sub.msvcrt.dll_memcpy
mov dword [r15 + 0x1c], esi
mov edx, dword [rsp + 0x38]
add esi, 0x32
mov byte [r15 + r13 + 0x31], 0
mov rax, qword [rdi + 0x20]
mov dword [r15 + 0x18], esi
movsxd rsi, esi
lea rax, [rax + rdx*8]
lea rcx, [r15 + rsi]
mov rdx, qword [rax]
mov qword [r15], rdx
mov rdx, qword [rsp + 0xa8]
mov qword [rax], r15
add dword [rdi + 0x10], 1
call fcn.007cdaf0
add eax, dword [r15 + 0x18]
mov esi, eax
mov dword [r15 + 0x18], eax
mov rax, qword [rsp + 0xa8]
mov dword [r15 + 0x14], esi
mov qword [r15 + 0x28], rax
mov eax, dword [rdi]
cmp eax, 1
je 0x7caae4
add esi, 1
test eax, eax
setne al
mov dword [r15 + 0x18], esi
movzx eax, al
neg eax
mov word [r15 + 0x22], ax
mov r11d, esi
mov r8d, dword [rsp + 0xb0]
test r8d, r8d
js 0x7cabc9
mov edx, dword [rdi]
cmp edx, 1
je 0x7cad06
mov ecx, dword [rsp + 0x3c]
xor r10d, r10d
movsx eax, word [r15 + 0x22]
test ecx, ecx
sete r10b
cmp eax, dword [rsp + 0xb0]
jne 0x7ca914
lea r11d, [rbx + rsi]
test r10d, r10d
je 0x7cabce
mov r11d, esi
mov eax, dword [rsp + 0xb8]
movsxd r11, r11d
lea rcx, [r15 + r11]
mov dword [rsp + 0xb0], eax
jmp 0x7ca92f
mov dword [rsp + 0x2c], r11d
call fcn.0082e1a0
test eax, eax
jne 0x7cabb0
add ebx, ebx
mov rcx, r15
movsxd rdx, ebx
call fcn.007e6b50
test rax, rax
je 0x7cabb0
mov r14, qword [rdi + 0x20]
mov r11d, dword [rsp + 0x2c]
mov dword [rax + 0x10], ebx
add r14, rbp
mov rdx, qword [r14]
cmp rdx, r15
je 0x7cab9b
nop word [rax + rax]
mov r14, rdx
mov rdx, qword [rdx]
cmp rdx, r15
jne 0x7cab90
mov qword [r14], rax
mov esi, dword [rax + 0x18]
mov r15, rax
jmp 0x7ca853
mov eax, 7
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sub r11d, esi
mov byte [r15 + 0x20], 1
mov rax, qword [rdi + 8]
add dword [rax], r11d
xor eax, eax
jmp 0x7cabb5
lea eax, [rsi + 1]
mov edx, pe_nt_image_headers64
cdqe
add rax, 0x71
cmp rax, 0x80
cmovge rdx, rax
mov eax, dword [rdi + 0x10]
mov qword [rsp + 0x48], rdx
add eax, eax
cmp dword [rsp + 0x2c], eax
jg 0x7ca9fe
call fcn.0082e1a0
test eax, eax
jne 0x7cabb0
mov ebx, dword [rsp + 0x2c]
add ebx, ebx
movsxd r15, ebx
shl r15, 3
mov rcx, r15
call fcn.007dc490
mov r14, rax
test rax, rax
je 0x7cabb0
mov r8, r15
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, dword [rdi + 0x14]
test eax, eax
jle 0x7ca994
mov rcx, qword [rsp + 0x30]
sub eax, 1
mov dword [rsp + 0xd0], esi
lea rbp, [rcx + rax*8 + 8]
mov rsi, rcx
nop dword [rax]
mov r15, qword [rsi]
test r15, r15
je 0x7ca980
mov rax, qword [r15]
lea rcx, [r15 + 0x30]
mov qword [rsi], rax
call sub.msvcrt.dll_strlen
mov edx, eax
sub edx, 1
js 0x7cad10
cdqe
movsxd rcx, edx
mov edx, edx
lea r9, [r15 + rax - 2]
add rcx, r15
mov eax, 0xd
sub r9, rdx
nop dword [rax]
movzx r8d, byte [rcx + 0x30]
lea edx, [rax*8]
sub rcx, 1
xor edx, r8d
xor eax, edx
cmp r9, rcx
jne 0x7caca8
xor edx, edx
div ebx
lea rax, [r14 + rdx*8]
mov rdx, qword [rax]
mov qword [r15], rdx
mov qword [rax], r15
jmp 0x7cac68
mov rax, r12
and r12d, 0x7f
mov r11d, 2
shr rax, 7
mov byte [rcx + 1], r12b
or eax, 0xffffff80
mov byte [rcx], al
jmp 0x7ca8ab
mov eax, dword [rsp + 0xb0]
sub r11d, esi
test eax, eax
js 0x7cabc9
mov byte [r15 + 0x21], 1
jmp 0x7cabce
mov eax, 0xd
jmp 0x7cacc2
mov byte [rcx], r12b
mov r11d, 1
jmp 0x7ca8ab
mov r15d, 0x68
mov eax, 0xd
jmp 0x7ca7d1
mov byte [rcx], dl
mov r11d, 1
jmp 0x7ca95f
add esi, 1
movsxd rdx, dword [rsp + 0xb0]
mov dword [r15 + 0x18], esi
mov byte [rcx], 1
movsxd rcx, dword [r15 + 0x18]
add rcx, r15
call fcn.007cdaf0
add eax, dword [r15 + 0x18]
mov dword [r15 + 0x24], 0
mov dword [r15 + 0x18], eax
mov esi, eax
movzx eax, word [rsp + 0xb0]
mov word [r15 + 0x22], ax
jmp 0x7cab22
mov rax, rdx
and edx, 0x7f
mov r11d, 2
shr rax, 7
mov byte [rcx + 1], dl
or eax, 0xffffff80
mov byte [rcx], al
jmp 0x7ca95f
mov eax, 0x68
mov edx, 0xd
jmp 0x7ca9f0