Function at 0x140366e1c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x10], rdx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
movsxd r12, dword [rsp + 0xc0]
xor eax, eax
xor r13d, r13d
movsxd rsi, r8d
cmp dword [rcx], eax
mov rdi, rcx
mov dword [rsp + 0x30], r9d
mov r9, qword [rsp + 0xb8]
sete al
mov dword [rsp + 0x2c], eax
lea ebp, [r13 + 0xd]
lea eax, [r12 - 1]
mov dword [rsp + 0x24], r13d
movsxd r8, eax
mov r10d, ebp
mov qword [rsp + 0x48], r8
test eax, eax
js 0x140366e93
movzx ecx, byte [r8 + r9]
lea eax, [r10*8]
xor ecx, eax
xor r10d, ecx
sub r8, 1
jns 0x140366e7b
movzx ecx, byte [rsp + 0xb0]
lea eax, [r10*8]
xor eax, ecx
mov dword [rsp + 0x28], ecx
xor eax, r10d
xor edx, edx
div dword [rdi + 0x14]
mov rax, qword [rdi + 0x20]
mov r15d, edx
mov rbx, qword [rax + rdx*8]
test rbx, rbx
je 0x140366f63
cmp byte [rbx + 0x30], cl
jne 0x140366eea
cmp dword [rbx + 0x1c], r12d
jne 0x140366eea
mov r8, r12
lea rcx, [rbx + 0x31]
mov rdx, r9
call fcn.1403acae0
test eax, eax
je 0x140366efc
mov cl, byte [rsp + 0xb0]
mov rbx, qword [rbx]
test rbx, rbx
je 0x140366f63
mov r9, qword [rsp + 0xb8]
jmp 0x140366ec5
test rbx, rbx
je 0x140366f63
mov ecx, dword [rbx + 0x10]
mov eax, ecx
sub eax, dword [rbx + 0x18]
cmp eax, 0x16
jge 0x140366f4f
lea ebp, [rcx + rcx]
mov rcx, rbx
movsxd rdx, ebp
call fcn.1402f276c
mov rdx, rax
test rax, rax
je 0x14036723b
mov dword [rax + 0x10], ebp
mov rcx, qword [rdi + 0x20]
lea r8, [rcx + r15*8]
mov rcx, qword [r8]
cmp rcx, rbx
je 0x140366f49
mov rax, qword [rcx]
mov r8, rcx
mov rcx, rax
cmp rax, rbx
jne 0x140366f3b
mov qword [r8], rdx
mov rbx, rdx
mov r13d, dword [rbx + 0x18]
mov r14, qword [rsp + 0x98]
neg r13d
jmp 0x14036715c
mov ecx, dword [rdi + 0x14]
lea r14, [r12 + 0x72]
mov eax, 0x80
cmp r14, rax
cmovl r14, rax
mov eax, dword [rdi + 0x10]
add eax, eax
mov qword [rsp + 0x40], r14
cmp eax, ecx
jl 0x1403670b2
mov rax, qword [rdi + 0x20]
lea r15d, [rcx + rcx]
movsxd rbx, r15d
shl rbx, 3
mov rcx, rbx
mov dword [rsp + 0x20], r15d
mov qword [rsp + 0x38], rax
call fcn.1402f2708
mov r12, rax
test rax, rax
je 0x14036723b
mov r8, rbx
xor edx, edx
mov rcx, rax
call fcn.1403ac180
xor eax, eax
mov dword [rsp + 0x90], eax
cmp dword [rdi + 0x14], eax
jle 0x14036705b
mov rbx, qword [rsp + 0x38]
mov r13d, r15d
mov r14, qword [rbx]
test r14, r14
je 0x14036703a
mov rax, qword [r14]
lea rcx, [r14 + 0x30]
mov qword [rbx], rax
mov r15d, ebp
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
sub eax, 1
movsxd r8, eax
js 0x140367018
movzx edx, byte [r8 + r14 + 0x30]
lea ecx, [r15*8]
xor edx, ecx
xor r15d, edx
sub r8, 1
jns 0x140366fff
xor edx, edx
mov eax, r15d
div r13d
mov rax, qword [r12 + rdx*8]
mov qword [r14], rax
mov qword [r12 + rdx*8], r14
mov r14, qword [rbx]
test r14, r14
jne 0x140366fe5
mov eax, dword [rsp + 0x90]
inc eax
add rbx, 8
mov dword [rsp + 0x90], eax
cmp eax, dword [rdi + 0x14]
jl 0x140366fdd
mov r13d, dword [rsp + 0x24]
mov r14, qword [rsp + 0x40]
mov r15d, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x38]
call fcn.1402f27a0
mov rdx, qword [rsp + 0x48]
mov dword [rdi + 0x14], r15d
mov qword [rdi + 0x20], r12
test rdx, rdx
js 0x140367095
mov r8, qword [rsp + 0xb8]
movzx ecx, byte [rdx + r8]
lea eax, [rbp*8]
xor ecx, eax
xor ebp, ecx
sub rdx, 1
jns 0x14036707f
mov r12d, dword [rsp + 0xc0]
lea eax, [rbp*8]
xor eax, dword [rsp + 0x28]
xor edx, edx
xor eax, ebp
div r15d
mov r15d, edx
mov rcx, r14
call fcn.1402f2708
mov rbx, rax
test rax, rax
je 0x14036723b
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x30]
call fcn.1403ac180
mov al, byte [rsp + 0xb0]
lea rcx, [rbx + 0x31]
mov rdx, qword [rsp + 0xb8]
movsxd rbp, r12d
mov r8, rbp
mov byte [rbx + 0x30], al
mov dword [rbx + 0x10], r14d
call fcn.1403abad0
mov r14, qword [rsp + 0x98]
lea eax, [r12 + 0x32]
mov dword [rbx + 0x1c], r12d
mov byte [rbx + rbp + 0x31], 0
mov dword [rbx + 0x18], eax
mov rax, qword [rdi + 0x20]
mov edx, r15d
mov rcx, qword [rax + rdx*8]
mov qword [rbx], rcx
mov rax, qword [rdi + 0x20]
mov qword [rax + rdx*8], rbx
mov rdx, r14
inc dword [rdi + 0x10]
movsxd rcx, dword [rbx + 0x18]
add rcx, rbx
call fcn.140368ae8
add eax, dword [rbx + 0x18]
mov dword [rbx + 0x18], eax
mov dword [rbx + 0x14], eax
mov qword [rbx + 0x28], r14
cmp dword [rdi], 1
je 0x14036715c
inc eax
mov dword [rbx + 0x18], eax
mov eax, dword [rdi]
neg eax
sbb cx, cx
mov word [rbx + 0x22], cx
mov rbp, qword [rbx + 0x28]
cmp r14, rbp
je 0x1403671b3
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call fcn.1403265f4
movsxd rcx, dword [rbx + 0x18]
mov rdx, r14
sub rdx, rbp
add rcx, rbx
call fcn.140368ae8
add eax, dword [rbx + 0x18]
mov r11d, 1
mov dword [rbx + 0x18], eax
mov dword [rbx + 0x14], eax
mov qword [rbx + 0x28], r14
cmp dword [rdi], r11d
je 0x1403671b8
inc eax
mov dword [rbx + 0x18], eax
mov eax, dword [rdi]
neg eax
sbb cx, cx
and dword [rbx + 0x24], 0
mov word [rbx + 0x22], cx
jmp 0x1403671b8
mov r11d, dword [rsp + 0x2c]
test esi, esi
js 0x140367227
cmp dword [rdi], 1
jne 0x1403671c7
mov byte [rbx + 0x21], 1
jmp 0x14036722b
movsx eax, word [rbx + 0x22]
cmp esi, eax
je 0x1403671f9
cmp dword [rdi], 0
jne 0x140367221
movsxd rax, dword [rbx + 0x18]
mov rdx, rsi
mov byte [rax + rbx], 1
inc dword [rbx + 0x18]
movsxd rcx, dword [rbx + 0x18]
add rcx, rbx
call fcn.140368ae8
add dword [rbx + 0x18], eax
and dword [rbx + 0x24], 0
mov word [rbx + 0x22], si
mov esi, dword [rsp + 0x30]
test r11d, r11d
je 0x14036722b
movsxd rcx, dword [rbx + 0x18]
mov eax, esi
sub eax, dword [rbx + 0x24]
add rcx, rbx
add eax, 2
movsxd rdx, eax
call fcn.140368ae8
add dword [rbx + 0x18], eax
mov dword [rbx + 0x24], esi
jmp 0x14036722b
mov word [rbx + 0x22], si
jmp 0x140367202
mov byte [rbx + 0x20], 1
mov eax, dword [rbx + 0x18]
mov rcx, qword [rdi + 8]
add eax, r13d
add dword [rcx], eax
xor eax, eax
jmp 0x140367240
mov eax, 7
mov rbx, qword [rsp + 0xa0]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret