Function at 0x14018b5f0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov qword [rbp], 0xfffffffffffffffe
mov r12d, r9d
mov qword [rbp - 0x18], r8
mov r13d, edx
mov rsi, rcx
mov edi, 0x520
add rdi, qword [rcx + 0x18]
mov rcx, rdi
mov edx, 0x1ea975b2
mov r8d, 0xa0f7d4db
mov r9d, 0x635797a5
call fcn.1400ab530
mov rbx, qword [0x140693db0]
test rbx, rbx
mov qword [rbp - 0x10], rdi
je 0x14018b659
mov eax, dword [0x140693e7c]
cmp eax, 0x44
jg 0x14018b6a0
jmp 0x14018b661
xor r15d, r15d
jmp 0x14018bb17
mov dword [rbx + 0xc], 0
mov dword [rsi + 0x10], 0xfffffffe
mov rax, qword [rsi + 0x18]
movzx ecx, byte [rbx + 0x10]
xor cl, 1
mov byte [rax + 0x6ed], cl
movzx eax, byte [rbx + 0x11]
mov ecx, dword [0x140693e78]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
je 0x14018b6e4
nop word cs:[rax + rax]
mov dword [rbx + 0xc], 0
mov dword [rsi + 0x10], 0xfffffffe
mov rax, qword [rsi + 0x18]
movzx ecx, byte [rbx + 0x10]
lea edx, [rcx - 1]
xor cl, 0xa5
add cl, 0x5b
not cl
mov r8d, edx
and r8b, cl
or cl, dl
not cl
or cl, r8b
mov byte [rax + 0x6ed], cl
mov eax, dword [0x140693e7c]
cmp eax, 0x38
jge 0x14018b6a0
jmp 0x14018b661
test al, al
je 0x14018b887
call fcn.14007ee00
lea r14, [rsi + 0x10]
cmp r13d, 0xffffffff
je 0x14018b88f
mov rdi, rax
test byte [rax + 0x161], 1
je 0x14018b780
mov r15, qword [rdi + 0x128]
call fcn.140253170
cmp r15, rax
jbe 0x14018b727
mov qword [rdi + 0x128], 0
mov r15d, dword [rdi + 0x120]
call fcn.140253170
test r15b, 4
mov ecx, 0x37464b60
mov edx, 0x37465ee8
cmove edx, ecx
add edx, dword [0x140613358]
mov r8, qword [rdi + 0x128]
mov r9d, dword [rdi + 0x134]
movzx ecx, byte [0x140613358]
add cl, 0x91
shl r9d, cl
sub rax, r8
mov ecx, r9d
xor ecx, edx
and r9d, edx
lea ecx, [rcx + r9*2]
xor r15d, r15d
cmp rax, rcx
jae 0x14018bb17
test r13d, r13d
je 0x14018b8b4
mov dword [rsi + 0xc], r13d
mov dword [rbx + 8], r13d
mov rcx, qword [rsi + 0x18]
mov edx, dword [rsi + 0xc]
test r12b, r12b
je 0x14018b991
xor r8d, r8d
call fcn.1403ea8e0
mov ecx, dword [0x140693e78]
lea edx, [rcx - 1]
imul edx, ecx
test dl, 1
nop dword [rax + rax]
mov ecx, dword [0x140693e7c]
cmp ecx, 0x4c
jg 0x14018b7c0
test rax, rax
je 0x14018b9f6
mov rcx, qword [rsi]
mov r8, qword [rcx + 0x28]
mov rcx, rsi
mov rdx, rax
mov rax, r8
call qword [0x1405fc400]
mov ecx, eax
mov eax, 0xffffffec
test cl, cl
je 0x14018ba59
mov rcx, qword [rsi + 0x18]
mov edx, dword [rsi + 0xc]
call fcn.1403da470
mov dword [r14], eax
xor r15d, r15d
test eax, eax
jne 0x14018ba5f
movzx eax, byte [0x140693e84]
add al, byte [rsi + 8]
jne 0x14018b9c0
mov byte [rsi + 8], 1
mov rcx, qword [rsi + 0x18]
mov edx, dword [rsi + 0xc]
mov r8, r14
call fcn.1401923d0
mov ecx, eax
mov r8d, 0x37464392
mov r9d, 0x374643dc
mov eax, dword [0x140693e7c]
cmp eax, 0x29
jg 0x14018b872
mov edx, dword [0x140693e78]
lea eax, [rdx - 1]
imul eax, edx
mov r10d, dword [0x140613358]
add r10d, r8d
xor edx, edx
div r10d
test edx, edx
je 0x14018bb34
mov eax, dword [0x140693e7c]
mov edx, dword [0x140613358]
add edx, r9d
cmp eax, edx
jge 0x14018b844
jmp 0x14018b84f
xor r15d, r15d
jmp 0x14018b9e6
mov rax, qword [rsi]
mov rax, qword [rax + 8]
mov rcx, rsi
mov rdx, r14
call qword [0x1405fc400]
mov r15d, eax
cmp dword [r14], 0
jne 0x14018ba5f
jmp 0x14018b9e6
mov eax, 0x37464391
add eax, dword [0x140613358]
lea rcx, [fcn.14018b5f0]
add ecx, ecx
add ecx, 0x34c0
mov edx, ecx
xor edx, eax
not eax
not ecx
and ecx, eax
or ecx, edx
cmp ecx, 0xffffffff
nop dword [rax]
mov ecx, dword [rdi + 0x160]
mov eax, dword [0x140693e78]
lea edx, [rax - 1]
imul edx, eax
and edx, 1
mov eax, 0x37464390
add eax, dword [0x140613358]
cmp edx, eax
jne 0x14018b8e0
mov eax, 0xffffffff
test cl, 1
je 0x14018ba59
mov rax, qword [rsi + 0x18]
movsxd rcx, dword [rdi + 0x11c]
mov rdi, qword [rax + 0x370]
lea r15, [rcx + rcx*4]
shl r15, 5
lea rcx, [rdi + r15]
xor edx, edx
call fcn.140401a40
test rax, rax
je 0x14018ba4e
lea rcx, [fcn.14018b5f0]
lea edx, [rcx + rcx]
add edx, 0x400
mov eax, edx
not eax
and edx, eax
add ecx, ecx
add ecx, 0x401
and eax, 0xfffffffe
xor eax, ecx
or eax, edx
nop word cs:[rax + rax]
mov ecx, dword [rdi + r15 + 0x24]
mov dword [rsi + 0xc], ecx
mov dword [rbx + 8], ecx
cmp eax, 0xffffffff
je 0x14018ba04
mov ecx, dword [rdi + r15 + 0x24]
mov dword [rsi + 0xc], ecx
mov dword [rbx + 8], ecx
jmp 0x14018b970
call fcn.1403eaa40
test rax, rax
je 0x14018b9c0
mov rcx, qword [rsi]
mov r8, qword [rcx + 0x28]
mov rcx, rsi
mov rdx, rax
mov rax, r8
call qword [0x1405fc400]
mov ecx, eax
mov eax, 0xffffffec
test cl, cl
je 0x14018ba59
mov rax, qword [rsi]
mov rax, qword [rax + 8]
mov rcx, rsi
mov rdx, r14
call qword [0x1405fc400]
mov r15d, eax
mov eax, 0x37464390
add eax, dword [0x140613358]
cmp dword [r14], eax
jne 0x14018ba5f
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ed], 0
jmp 0x14018bb17
mov rcx, qword [rsi + 0x18]
mov edx, dword [rsi + 0xc]
call fcn.1403eac30
jmp 0x14018ba59
mov rcx, qword [rsi + 0x18]
mov edx, dword [rsi + 0xc]
call fcn.1403ea9e0
test rax, rax
je 0x14018ba36
mov rcx, qword [rsi]
mov r8, qword [rcx + 0x28]
mov rcx, rsi
mov rdx, rax
mov rax, r8
call qword [0x1405fc400]
mov ecx, eax
mov eax, 0xffffffec
test cl, cl
je 0x14018ba59
mov rax, qword [rsi]
mov rax, qword [rax + 8]
mov rcx, rsi
mov rdx, r14
call qword [0x1405fc400]
jmp 0x14018b8a2
mov rcx, qword [rsi + 0x18]
xor edx, edx
call fcn.1403eac30
mov dword [r14], eax
xor r15d, r15d
mov rax, qword [rsi + 0x18]
mov byte [rax + 0x6ed], 0
mov eax, dword [0x140613358]
mov ecx, eax
xor ecx, 0x37464390
and eax, 0x37464390
lea eax, [rcx + rax*2]
cmp dword [rsi + 0x10], eax
jne 0x14018ba8c
mov dword [r14], 0xfffffffe
cmp qword [0x140693e88], 0
jne 0x14018bab7
mov ecx, 0x700
call fcn.1404e9d4c
mov qword [rbp - 8], rax
mov rcx, rax
call fcn.140094bf0
mov rax, qword [rbp - 8]
mov qword [0x140693e88], rax
mov rax, qword [0x140693e88]
mov rax, qword [rax + 0x6f0]
mov edx, dword [rsi + 0xc]
mov r9d, dword [rsi + 0x10]
mov qword [rsp + 0x20], rax
mov rcx, rbx
mov r8, qword [rbp - 0x18]
call fcn.14017aaa0
mov edx, dword [rsi + 0xc]
add edx, dword [0x140693e80]
test edx, edx
jle 0x14018bb17
cmp dword [rsi + 0x10], 0xfffffff9
je 0x14018bb17
mov eax, dword [0x140693e7c]
cmp eax, 0x1d
nop dword [rax]
mov rcx, qword [rsi + 0x18]
mov eax, dword [0x140693e7c]
cmp eax, 0xa
jg 0x14018bb00
xor r8d, r8d
call fcn.1403d8d80
mov rcx, qword [rbp - 0x10]
call fcn.140176700
mov eax, r15d
add rsp, 0x48
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
xor r15d, r15d
test cl, cl
jne 0x14018b9c0
jmp 0x14018ba5f