Function at 0x140130800
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2e8
mov r10, rdx
mov qword [rsp + 0x50], rcx
movabs rax, 0x3fffffffffffffff
add rax, rdx
mov rcx, rax
or rcx, rdx
shr rcx, 0x20
je 0x140130867
xor edx, edx
div r10
mov qword [rsp + 0x58], rax
mov rax, r10
cmp r10, 0x1001
jae 0x14013087d
shr rax, 1
mov rcx, r10
sub rcx, rax
cmp rcx, 0x40
mov eax, 0x40
cmovb rax, rcx
mov qword [rsp + 0x48], rax
jmp 0x1401308a6
xor edx, edx
div r10d
mov qword [rsp + 0x58], rax
mov rax, r10
cmp r10, 0x1001
jb 0x14013084a
or rax, 1
bsr rcx, rax
xor ecx, 0xffffffc0
add ecx, 0x41
shr ecx, 1
mov eax, 1
shl rax, cl
mov rdx, r10
shr rdx, cl
add rdx, rax
shr rdx, 1
mov qword [rsp + 0x48], rdx
mov rax, qword [rsp + 0x50]
lea rcx, [rax + 8]
mov qword [rsp + 0x70], rcx
add rax, 0xfffffffffffffff8
mov qword [rsp + 0x60], rax
mov r12d, 1
xor ebp, ebp
movabs rsi, 0x1ffffffffffffffe
xor r14d, r14d
mov qword [rsp + 0x40], r9
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x80], r10
nop word cs:[rax + rax]
mov rax, qword [rsp + 0x50]
lea rax, [rax + rbp*8]
mov qword [rsp + 0x38], rax
sub r10, rbp
jbe 0x140130960
cmp r10, qword [rsp + 0x48]
jae 0x140130980
cmp byte [rsp + 0x350], 0
je 0x1401309fd
mov rsi, r10
cmp r10, 0x20
mov eax, 0x20
cmovae rsi, rax
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
mov rcx, qword [rsp + 0x38]
mov rdx, rsi
call fcn.140135270
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x40]
mov eax, esi
lea rcx, [rax*2 + 1]
jmp 0x140130b8c
xor esi, esi
mov eax, 1
mov qword [rsp + 0x68], rax
cmp r14, 2
jae 0x140130be0
jmp 0x140130e66
mov r11, r8
cmp r10, 2
jb 0x140130b81
mov rdi, r10
mov r10, qword [rsp + 0x38]
mov edx, dword [r10 + 8]
mov r8d, dword [r10 + 0xc]
xor eax, eax
cmp r8d, dword [r10 + 4]
setb al
xor ecx, ecx
cmp edx, dword [r10]
setb cl
cmove ecx, eax
test cl, cl
je 0x140130a14
cmp rdi, 2
jne 0x140130a6b
mov rax, qword [rsp + 0x38]
lea rcx, [rax + 8]
mov edx, 1
mov eax, 2
xor r8d, r8d
mov r11, r8
not r11
add r11, rdx
mov rdx, qword [rcx + r11*8]
mov rsi, qword [rsp + 0x38]
mov r10, qword [rsi + r8*8]
mov qword [rsi + r8*8], rdx
mov qword [rcx + r11*8], r10
mov r11, qword [rsp + 0x30]
jmp 0x140130b7e
mov rax, qword [rsp + 0x48]
mov rcx, r10
cmp rax, r10
cmovb rcx, rax
add rcx, rcx
jmp 0x140130b8c
mov r10d, 2
cmp rdi, 2
je 0x140130b81
mov eax, 2
nop dword [rax]
mov r9d, edx
mov r10d, r8d
mov r8, qword [rsp + 0x38]
mov edx, dword [r8 + rax*8]
mov r8d, dword [r8 + rax*8 + 4]
xor r11d, r11d
cmp r8d, r10d
setb r11b
xor r10d, r10d
cmp edx, r9d
setb r10b
cmove r10d, r11d
test r10b, r10b
jne 0x140130aad
inc rax
cmp rdi, rax
jne 0x140130a30
jmp 0x140130aaa
mov eax, 2
mov r9d, edx
mov r10d, r8d
mov r8, qword [rsp + 0x38]
mov edx, dword [r8 + rax*8]
mov r8d, dword [r8 + rax*8 + 4]
xor r11d, r11d
cmp r8d, r10d
setb r11b
xor r10d, r10d
cmp edx, r9d
setb r10b
cmove r10d, r11d
cmp r10b, 1
jne 0x140130aad
inc rax
cmp rdi, rax
jne 0x140130a70
mov rax, rdi
cmp rax, qword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x30]
mov r10, rdi
jb 0x14013090a
mov r11, r8
test cl, cl
je 0x140130b7e
mov r10d, 1
cmp rax, 2
jb 0x140130b81
mov rdx, rax
shr rdx, 1
mov rcx, qword [rsp + 0x38]
lea rcx, [rcx + rax*8]
lea r8, [rdx*8]
sub rcx, r8
cmp rdx, 1
je 0x1401309d2
mov r9, rdx
and r9, 0xfffffffffffffffe
mov r8, qword [rsp + 0x70]
lea r10, [r8 + rbp*8]
lea r8, [rax + rbp]
mov r11, qword [rsp + 0x60]
lea r11, [r11 + r8*8]
xor r8d, r8d
mov r15, rsi
nop word [rax + rax]
mov rsi, qword [r11]
mov rdi, qword [r10 + r8*8 - 8]
mov qword [r10 + r8*8 - 8], rsi
mov qword [r11], rdi
mov rsi, r8
xor rsi, r15
add rsi, rdx
mov rdi, qword [rcx + rsi*8]
mov rbx, qword [r10 + r8*8]
mov qword [r10 + r8*8], rdi
mov qword [rcx + rsi*8], rbx
add r8, 2
add r11, 0xfffffffffffffff0
cmp r9, r8
jne 0x140130b30
mov r10, rax
test dl, 1
mov r9, qword [rsp + 0x40]
mov r11, qword [rsp + 0x30]
jne 0x1401309d5
jmp 0x140130b81
mov r10, rax
lea rcx, [r10*2 + 1]
mov r8, r11
mov rax, r12
shr rax, 1
mov qword [rsp + 0x68], rcx
shr rcx, 1
lea rdx, [rbp*2]
sub rdx, rax
lea rax, [rcx + rbp*2]
mov rcx, qword [rsp + 0x58]
imul rdx, rcx
imul rax, rcx
xor rax, rdx
je 0x140130bce
bsr rsi, rax
xor rsi, 0x3f
cmp r14, 2
jae 0x140130be0
jmp 0x140130e66
mov esi, 0x40
cmp r14, 2
jb 0x140130e66
nop dword [rax]
mov rax, qword [rsp + 0x60]
lea rax, [rax + rbp*8]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x88], rbp
jmp 0x140130c2d
mov rbp, r12
mov rdx, r10
sub r8, rdx
mov rcx, rbp
call sub.msvcrt.dll_memcpy
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x30]
lea r12, [r13*2 + 1]
mov rbp, qword [rsp + 0x88]
cmp r14, 1
jbe 0x140130e60
cmp byte [rsp + r14 + 0x95], sil
jb 0x140130e66
dec r14
mov rdi, qword [rsp + r14*8 + 0xd8]
mov r15, rdi
shr r15, 1
mov rbx, r12
shr rbx, 1
lea r13, [r15 + rbx]
cmp r13, r9
ja 0x140130c80
mov eax, edi
or eax, r12d
and eax, 1
jne 0x140130c80
add r13, r13
mov r12, r13
cmp r14, 1
ja 0x140130c2d
jmp 0x140130e60
mov rax, rbp
sub rax, r13
mov rcx, qword [rsp + 0x50]
lea rbp, [rcx + rax*8]
test dil, 1
jne 0x140130ce0
mov rax, r15
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, rbp
mov rdx, r15
call fcn.140135270
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x40]
test r12b, 1
je 0x140130ce6
cmp rdi, 2
jae 0x140130d2d
jmp 0x140130c13
test r12b, 1
jne 0x140130cd0
lea rcx, [r15*8]
add rcx, rbp
mov rax, rbx
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rdx, rbx
call fcn.140135270
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x40]
cmp rdi, 2
jb 0x140130c13
cmp r12, 2
jb 0x140130c13
cmp r15, rbx
mov rdi, rbx
cmovb rdi, r15
cmp rdi, r9
ja 0x140130c13
lea r12, [r15*8]
add r12, rbp
cmp rbx, r15
mov rdx, rbp
cmovb rdx, r12
mov rcx, r8
lea r8, [rdi*8]
call sub.msvcrt.dll_memcpy
mov r10, qword [rsp + 0x30]
lea r8, [r10 + rdi*8]
cmp rbx, r15
jae 0x140130df2
mov rax, qword [rsp + 0x78]
nop word cs:[rax + rax]
mov ecx, dword [r8 - 8]
mov edx, dword [r8 - 4]
xor r9d, r9d
cmp edx, dword [r12 - 4]
setb r9b
xor edx, edx
cmp ecx, dword [r12 - 8]
setb dl
cmove edx, r9d
test dl, dl
mov rcx, r8
cmovne rcx, r12
mov rcx, qword [rcx - 8]
mov qword [rax], rcx
movzx ecx, dl
xor dl, 1
movzx edx, dl
lea r12, [r12 + rdx*8]
add r12, 0xfffffffffffffff8
lea r8, [r8 + rcx*8]
add r8, 0xfffffffffffffff8
cmp r12, rbp
je 0x140130bf8
add rax, 0xfffffffffffffff8
cmp r8, r10
jne 0x140130d90
jmp 0x140130bf8
mov rdx, r10
test rdi, rdi
je 0x140130bfe
nop
mov ecx, dword [r12]
mov eax, dword [r12 + 4]
xor r9d, r9d
cmp eax, dword [rdx + 4]
setb r9b
xor eax, eax
cmp ecx, dword [rdx]
setb al
cmove eax, r9d
mov ecx, eax
xor cl, 1
test al, al
mov r9, rdx
cmovne r9, r12
mov r9, qword [r9]
mov qword [rbp], r9
movzx ecx, cl
lea rdx, [rdx + rcx*8]
add rbp, 8
cmp rdx, r8
je 0x140130bfe
movzx eax, al
lea r12, [r12 + rax*8]
cmp r12, qword [rsp + 0x38]
jne 0x140130e00
jmp 0x140130bfe
mov r14d, 1
mov qword [rsp + r14*8 + 0xd8], r12
mov byte [rsp + r14 + 0x96], sil
mov r10, qword [rsp + 0x80]
cmp r10, rbp
jbe 0x140130ea3
inc r14
mov r12, qword [rsp + 0x68]
mov rax, r12
shr rax, 1
add rbp, rax
movabs rsi, 0x1ffffffffffffffe
jmp 0x1401308f0
test r12b, 1
jne 0x140130ed6
mov rax, r10
or rax, 1
bsr rax, rax
xor eax, 0x3f
add eax, eax
xor eax, 0x7e
mov dword [rsp + 0x20], eax
mov qword [rsp + 0x28], 0
mov rcx, qword [rsp + 0x50]
mov rdx, r10
call fcn.140135270
nop
add rsp, 0x2e8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret