Function at 0x14039f7a0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov r12, qword [0x140599778]
movsxd r15, dword [r12]
mov eax, dword [0x140490878]
mov dword [rsp + 0x54], eax
test rcx, rcx
je 0x14039fb27
mov qword [rsp + 0x70], rcx
mov dword [rsp + 0x38], 0x3b605c37
mov dword [rsp + 0x30], 0xa8acd372
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor eax, eax
mov qword [rsp + 0x48], rax
xor ecx, ecx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call fcn.1403a4540
test rax, rax
je 0x14039fb2e
mov rcx, qword [rax + 0x10]
test rcx, rcx
setne dl
or dl, byte [0x1405b36e0]
xor r8d, r8d
mov qword [rsp + 0x48], r8
test dl, 1
je 0x14039fb2e
mov rdx, qword [rax + 0x18]
mov qword [rsp + 0x68], rdx
test rdx, rdx
je 0x14039fb2e
mov ebx, dword [0x140599730]
lea edx, [rbx + 1]
mov dword [0x140599730], edx
xor ebx, edx
not ebx
and ebx, edx
mov edx, dword [0x14059a758]
mov r8d, edx
xor r8d, 0x3d99d5d3
and edx, 0x3d99d5d3
lea ebp, [r8 + rdx*2]
xor edx, edx
mov qword [rsp + 0x60], rdx
mov edx, 0
mov qword [rsp + 0x58], rdx
cmp ebx, ebp
jne 0x14039f8b7
mov edx, 0x3d99d5d3
add edx, dword [0x14059a758]
xor r8d, r8d
mov r9d, 0
mov qword [rsp + 0x60], r9
mov r9d, 0
mov qword [rsp + 0x58], r9
cmp edx, dword [rsp + 0x54]
jl 0x14039fb44
xor edx, edx
mov qword [rsp + 0x48], rdx
mov r13b, 1
lea r12, [fcn.14039f7a0]
lea esi, [r12 + r12]
add esi, 0x4020
mov r8, rcx
xor edi, edi
jmp 0x14039f968
add rdx, qword [0x1405b49c8]
mov r10, qword [0x14059a760]
add r10, qword [0x1405b3c70]
mov r14d, 1
movabs rdi, 0x9cbea7caa951cfd3
sub r10, rdi
add rdx, rdi
add rdx, r10
movabs r10, 0xbb04c22834a0ebf7
add rdx, r10
mov r10d, dword [0x1405b4f38]
add r10d, dword [r8 + 0x40]
add r10, rdx
cmp r10, r11
mov r10, qword [rsp + 0x48]
cmovae r10, rdx
mov qword [rsp + 0x48], r10
movzx r9d, r9b
cmovae r9d, r14d
mov rdx, qword [r8]
test rdx, rdx
cmovne r8, rdx
movzx edi, r9b
cmove edi, r14d
movzx edx, byte [0x14059a768]
dec dl
xor dl, dil
or dl, 0xfe
cmp dl, 0xff
jne 0x14039fb2e
test r13b, r13b
je 0x14039f9c0
nop dword [rax]
xor r9d, r9d
cmp ebx, ebp
setne r9b
mov r11, qword [0x1404908c8]
mov rdx, qword [0x1404908c0]
add r9, 0xffffffffffffffff
mov r10d, 0
adc r10, 0xffffffffffffffff
mov r14d, dword [0x14059a758]
mov r15d, r14d
xor r15d, 0x3d99d5d4
and r14d, 0x3d99d5d4
lea r14d, [r15 + r14*2]
xor r14d, esi
not r14d
test r14d, esi
je 0x14039fa00
nop dword [rax]
mov rdx, qword [0x1404908c8]
mov rdx, qword [0x1404908c0]
mov edx, dword [0x14059a758]
mov r9d, edx
xor r9d, 0x3d99d5d4
and edx, 0x3d99d5d4
lea edx, [r9 + rdx*2]
lea r9d, [r12 + r12]
add r9d, 0x2f40
test r9d, edx
jne 0x14039f9c0
jmp 0x14039f970
sub rdx, qword [rsp + 0x60]
sbb r11, qword [rsp + 0x58]
mov r14, r11
not r14
mov r15, rdx
not r15
xor r11, r10
not r10
and r10, r14
xor rdx, r9
not r9
and r9, r15
or r9, rdx
or r10, r11
not r9
not r10
or r10, r9
mov rdx, r10
shr rdx, 0x20
or edx, r10d
add edx, dword [0x1405b5690]
jmp 0x14039fa56
mov dword [0x1405b5690], edx
mov r9d, dword [0x1405b69c8]
lea r10d, [r9 - 1]
imul r10d, r9d
test r10b, 1
jne 0x14039fa50
mov dword [0x1405b5690], edx
test r13b, r13b
je 0x14039fa50
cmp rcx, qword [rax + 0x10]
je 0x14039fac0
mov dword [rsp + 0x38], 0x3b605c37
mov dword [rsp + 0x30], 0xa8acd372
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor ecx, ecx
xor edx, edx
xor r8d, r8d
xor r9d, r9d
call fcn.1403a4540
test rax, rax
je 0x14039fb2e
mov rcx, qword [rax + 0x10]
mov rdx, qword [rax + 0x18]
mov qword [rsp + 0x68], rdx
mov r8, rcx
mov edx, edi
and dl, 1
movzx r9d, byte [0x1405b3aa4]
mov r10d, edx
xor r10b, dl
not r10b
and r10b, r9b
xor r10b, dl
and dl, r9b
add dl, dl
add dl, r10b
jne 0x14039f950
cmp r8, qword [rsp + 0x68]
movzx r9d, dil
mov edx, 1
cmove r9d, edx
add r9b, byte [0x1405b47c0]
add r9b, byte [0x1405b69d2]
mov rdx, qword [r8 + 0x30]
mov r11, qword [rsp + 0x70]
cmp rdx, r11
jbe 0x14039f8dc
mov r14d, 1
jmp 0x14039f93e
xor eax, eax
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
add r15, r12
mov r9d, 0x3d99d5d4
lea r10, [fcn.14039f7a0]
lea r11d, [r10 + r10]
add r11d, 0x3160
mov r12d, 0x3d99d60c
xor r13d, r13d
xor edx, edx
mov qword [rsp + 0x60], rdx
xor edx, edx
mov qword [rsp + 0x58], rdx
jmp 0x14039fb90
add r13d, 0xb38edecf
cmp r13d, dword [rsp + 0x54]
jge 0x14039f8b7
nop word [rax + rax]
mov edx, dword [0x1405b69c8]
lea esi, [rdx - 1]
imul esi, edx
test sil, 1
jne 0x14039fb90
mov edx, dword [0x14059a758]
add edx, r9d
test r11d, edx
jne 0x14039fb90
movsxd rdx, r13d
add rdx, r15
mov rsi, qword [rdx]
mov rdx, qword [rdx + 8]
nop dword [rax]
mov edi, dword [0x1405b69cc]
mov r14d, dword [0x14059a758]
add r14d, r12d
cmp edi, r14d
jge 0x14039fbda
test r8b, r8b
je 0x14039fbf0
mov edi, dword [0x1405b69c8]
lea r14d, [rdi - 1]
imul r14d, edi
test r14b, 1
jne 0x14039fbc0
jmp 0x14039fbd5
xor qword [rsp + 0x60], rsi
xor qword [rsp + 0x58], rdx
add r13d, 0x4c712141
mov edx, dword [0x14059a758]
mov esi, edx
xor esi, 0x3d99d5d4
and edx, 0x3d99d5d4
lea edx, [rsi + rdx*2]
lea esi, [r10 + r10]
add esi, 0x46a0
test esi, edx
jne 0x14039fc40
lea edx, [r10 + r10]
add edx, 0xe0
mov esi, edx
not esi
test esi, edx
je 0x14039fb78
nop dword [rax]
mov edx, dword [0x1405b69cc]
cmp edx, 0x13
jge 0x14039fc40
jmp 0x14039fc26