Function at 0x140163d40
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x488
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x400], 0xfffffffffffffffe
cmp byte [rcx + 8], 0
jne 0x140163dcd
mov ebx, r8d
mov rdi, rdx
mov rsi, rcx
cmp qword [0x1405a98e8], 0
jne 0x140163db1
mov ecx, 0x900
mov edx, 0xdc26137e
mov r8d, 0xdf04b2a1
call fcn.1401081c0
mov qword [rbp + 0x3f0], rax
mov rcx, rax
call fcn.140089f70
mov rax, qword [rbp + 0x3f0]
mov qword [0x1405a98e8], rax
mov r14, qword [0x1405a98e8]
mov rax, qword [r14 + 0x700]
mov rcx, rdi
call qword [case.0x1401238cb.0]
cmp eax, 0xffffffff
je 0x140163de7
mov eax, dword [0x1405a6ea8]
add rsp, 0x488
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov eax, dword [0x1405a6eac]
cmp eax, 0x25
jle 0x140163df4
jmp 0x140163e5c
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x1401238cb.0]
mov ecx, eax
mov edx, dword [0x1405a6ea8]
lea eax, [rdx - 1]
imul eax, edx
mov r8d, dword [0x140541268]
mov edx, r8d
xor edx, 0xbc252bb6
mov r9d, r8d
and r9d, 0x3c252bb6
lea r9d, [rdx + r9*2]
xor edx, edx
div r9d
add r8d, 0xbc252bb4
cmp edx, r8d
je 0x140163e8c
mov qword [rbp + 0x3f8], 0
mov rax, qword [r14 + 0x710]
lea r8, [rbp - 0x60]
lea r9, [rbp + 0x3f8]
mov rcx, rdi
mov edx, 0x400
call qword [case.0x1401238cb.0]
jmp 0x140163df4
test ecx, ecx
je 0x140163dcd
mov qword [rbp + 0x3b8], 0
mov qword [rbp + 0x3c0], 0xf
mov byte [rbp + 0x3a8], 0
lea rax, [0x14045cff8]
mov qword [rbp + 0x3a0], rax
lea rcx, [rbp + 0x3a0]
lea rdx, [rbp - 0x60]
mov r8d, 2
call fcn.140273710
xor eax, eax
test al, al
nop dword [rax]
mov edi, dword [rbp + 0x3b8]
mov eax, dword [0x1405a6eac]
cmp eax, 0x35
jg 0x140163ee0
test edi, edi
lea r15, [rbp + 0x3a8]
je 0x140163f9a
cmp dword [0x140541268], 0x43dad44c
je 0x140163f0e
jmp 0x140163f44
cmp qword [rbp + 0x3c0], 0x10
mov rcx, r15
jb 0x140163f22
mov rcx, qword [rbp + 0x3a8]
mov eax, 0xbc252bb5
add eax, dword [0x140541268]
lea rdx, [fcn.140163d40]
add edx, edx
add edx, 0x3f00
xor edx, eax
not edx
test edx, eax
je 0x140163f93
lea r14, [0x14016db30]
nop dword [rax + rax]
mov eax, dword [0x140541268]
mov ecx, eax
xor ecx, 0xbc252c15
and eax, 0x3c252c15
add eax, eax
mov edx, ecx
xor edx, eax
and eax, ecx
lea ecx, [rdx + rax*2]
call fcn.1403f8a54
mov qword [0x1405a6ea0], rax
mov rcx, r14
call fcn.140418e40
cmp dword [0x140541268], 0x43dad44c
jne 0x140163f50
jmp 0x140163f0e
mov edx, edi
call fcn.140089ef0
mov eax, dword [0x1405a6ea8]
lea ecx, [rax + 1]
nop word cs:[rax + rax]
imul ecx, eax
test cl, 1
je 0x140163fca
mov eax, dword [0x1405a6ea8]
mov ecx, dword [0x140541268]
add ecx, eax
dec ecx
jmp 0x140163fb0
lea rdi, [rsi + 0x90]
lea rdx, [rbp + 0x3a0]
mov rcx, rdi
call fcn.140100290
mov ecx, 0xbc252bb4
nop word cs:[rax + rax]
mov rdx, qword [rdi]
mov r8d, dword [0x1405a6ea8]
lea r9d, [r8 - 1]
imul r9d, r8d
and r9d, 1
mov r8d, dword [0x140541268]
add r8d, ecx
cmp r9d, r8d
je 0x140164029
mov edx, dword [0x1405a6ea8]
lea r8d, [rdx - 1]
imul r8d, edx
test r8b, 1
jmp 0x140163ff0
cmp rax, rdx
jne 0x140164216
lea rdi, [rbp + 0x3d0]
movabs r13, 0x9bb69b0f04e4a9fb
movabs r12, 0x9bb69b0f04e4aa0a
lea r14, [rbp - 0x60]
nop word cs:[rax + rax]
mov rax, qword [0x140541270]
lea rcx, [rax + r13]
mov qword [rbp + 0x3e0], rcx
add rax, r12
mov qword [rbp + 0x3e8], rax
movzx eax, byte [0x140541278]
add al, 0x87
mov byte [rbp + 0x3d0], al
mov rcx, r14
mov edx, 0xc614a2a1
mov r8d, 0xcc2ef73b
call fcn.1400af3a0
mov r15, rax
mov eax, dword [0x1405a6ea8]
mov ecx, dword [0x140541268]
add ecx, eax
dec ecx
imul ecx, eax
test cl, 1
je 0x1401640d8
mov qword [rbp + 0x3e0], 0
mov qword [rbp + 0x3e8], 0xf
mov byte [rbp + 0x3d0], 0
jmp 0x140164060
cmp r15, 0xf
jbe 0x1401640fc
mov eax, dword [0x1405a6ea8]
lea r9, [rbp - 0x60]
mov rcx, rdi
mov rdx, r15
call fcn.14008d4c0
lea rax, [0x14045cff8]
jmp 0x140164122
mov qword [rbp + 0x3e0], r15
lea rdx, [rbp - 0x60]
mov rcx, rdi
mov r8, r15
call fcn.140440940
mov byte [rbp + r15 + 0x3d0], 0
lea rax, [0x14045cff8]
mov qword [rbp + 0x3c8], rax
test bl, bl
je 0x140164142
add rsi, 0x10
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.140164400
jmp 0x140164155
add rsi, 0x30
lea rdx, [rbp + 0x3c8]
mov rcx, rsi
call fcn.140164400
mov eax, 0xbc252bb5
add eax, dword [0x140541268]
lea rcx, [fcn.140163d40]
add ecx, ecx
add ecx, 0x4980
xor ecx, eax
not ecx
test ecx, eax
jne 0x1401641a0
jmp 0x140164179
mov rax, qword [rbp + 0x3e8]
mov ecx, dword [0x1405a6ea8]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
je 0x1401641ad
nop word cs:[rax + rax]
mov eax, dword [0x1405a6eac]
cmp eax, 0x2b
jge 0x1401641a0
jmp 0x140164179
cmp rax, 0x10
jb 0x140164216
mov rcx, qword [rbp + 0x3d0]
mov r8, qword [0x140541270]
add r8, rax
movabs rdx, 0x9bb69b0f04e4a9fc
add rdx, r8
cmp rdx, 0x1000
jb 0x140164211
mov r8, qword [rcx - 8]
add rcx, 0xfffffffffffffff8
sub rcx, r8
movabs rdx, 0x9bb69b0f04e4aa1b
add rdx, qword [0x140541270]
cmp rcx, rdx
jae 0x140164293
mov rcx, qword [0x1405a6eb0]
lea rdx, [rax + rcx]
add rdx, 0x28
mov rcx, r8
call fcn.1400ad790
mov rax, qword [rbp + 0x3c0]
cmp rax, 0x10
jb 0x140163dcd
mov rcx, qword [rbp + 0x3a8]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x140164284
mov r8, qword [rcx - 8]
movabs rdx, 0xdf1dc5c7a15f0761
xor rdx, rcx
movabs r9, 0x5f1dc5c7a15f0761
and r9, rcx
lea rcx, [rdx + r9*2]
add rcx, qword [0x140541270]
sub rcx, r8
movabs rdx, 0xbc98d5476385a292
add rdx, rcx
cmp rdx, 0x20
jae 0x14016428e
add rax, 0x28
mov rdx, rax
mov rcx, r8
call fcn.1400ad790
jmp 0x140163dcd
call fcn.1403f89dc
call fcn.1403f89dc
int3