Function at 0x1400595c0
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push r14
sub rsp, 0x78
mov rax, qword [rsp + 0xc0]
mov r14, r9
mov qword [rsp + 0x48], rax
mov ebp, r8d
mov rax, qword [rsp + 0xc8]
mov rbx, rdx
mov qword [rsp + 0x50], rax
mov rsi, rcx
mov dword [rsp + 0x28], r8d
mov qword [rsp + 0x40], rcx
test rdx, rdx
je 0x140059ba0
mov r11d, dword [rdx + 4]
test r11d, r11d
je 0x140059ba0
mov r9d, dword [rdx + 8]
test r9d, r9d
je 0x140059ba0
cmp dword [rdx], 0
je 0x140059ba0
cmp qword [rdx + 0x18], 0
je 0x140059633
cmp dword [rdx + 0x10], 0
jne 0x140059662
cmp qword [rdx + 0x28], 0
je 0x140059640
cmp dword [rdx + 0x20], 0
jne 0x140059662
cmp qword [rdx + 0x38], 0
je 0x14005964d
cmp dword [rdx + 0x30], 0
jne 0x140059662
cmp qword [rdx + 0x48], 0
je 0x140059ba0
cmp dword [rdx + 0x40], 0
je 0x140059ba0
mov r8d, dword [r14 + 0xc]
mov eax, 0x19000
mov r10d, dword [r14 + 8]
mov ecx, r8d
cmp r10d, r8d
mov qword [rsp + 0xb0], rdi
cdq
mov qword [rsp + 0x70], r12
cmovg ecx, r10d
mov qword [rsp + 0x60], r15
idiv ecx
mov edi, eax
cmp ebp, 0xffffffa6
je 0x1400596f5
test ebp, ebp
je 0x1400596e4
cmp ebp, 0x5a
je 0x1400596cd
cmp ebp, 0xb4
jne 0x1400596c3
mov eax, dword [r14]
lea ecx, [r10 - 1]
sub eax, dword [r14 + 0x18]
lea edx, [r8 - 1]
add ecx, eax
mov eax, dword [r14 + 4]
sub eax, dword [r14 + 0x1c]
add edx, eax
jmp 0x14005970a
mov ecx, dword [rsp + 0x28]
mov edx, dword [rsp + 0x28]
jmp 0x14005970a
mov ecx, dword [r14 + 0x1c]
lea edx, [r10 - 1]
mov eax, dword [r14]
sub ecx, dword [r14 + 4]
sub eax, dword [r14 + 0x18]
add edx, eax
jmp 0x14005970a
mov ecx, dword [r14 + 0x18]
sub ecx, dword [r14]
mov edx, dword [r14 + 0x1c]
sub edx, dword [r14 + 4]
jmp 0x14005970a
mov eax, dword [r14 + 4]
lea ecx, [r8 - 1]
sub eax, dword [r14 + 0x1c]
mov edx, dword [r14 + 0x18]
add ecx, eax
sub edx, dword [r14]
imul ecx, edi
lea r12d, [r11 - 1]
imul edx, edi
xor r15d, r15d
mov r8d, ecx
sar r8d, 0x1f
mov eax, edx
sar eax, 0x1f
add r8d, ecx
add eax, edx
sar r8d, 9
sar eax, 9
inc r8d
inc eax
sar r8d, 1
sar eax, 1
cmp r8d, r12d
jg 0x140059748
test r8d, r8d
mov r12d, r15d
cmovns r12d, r8d
lea ebp, [r9 - 1]
mov dword [rsp + 0x20], ebp
cmp eax, ebp
jg 0x140059760
test eax, eax
mov ebp, r15d
cmovns ebp, eax
mov dword [rsp + 0x20], ebp
mov eax, dword [r14 + 0x20]
imul eax, edi
mov edi, r9d
mov ecx, eax
sar ecx, 0x1f
add ecx, eax
shr ecx, 9
inc ecx
shr ecx, 1
mov dword [rsp + 0x30], ecx
lea eax, [rcx + rcx*2]
mov ecx, r12d
shr eax, 1
cmp eax, r12d
cmovl ecx, eax
mov eax, r11d
sub eax, r12d
dec eax
cmp ecx, eax
cmovl eax, ecx
mov ecx, ebp
cmp eax, ebp
cmovl ecx, eax
sub edi, ebp
dec edi
cmp ecx, edi
cmovl edi, ecx
mov dword [rsp + 0x24], edi
test edi, edi
je 0x140059b99
mov rax, qword [rsi]
mov rcx, rsi
imul r9d, r11d
shl r9d, 2
mov edx, r9d
call qword [rax + 8]
mov qword [rsp + 0x38], rax
mov rcx, rax
test rax, rax
je 0x140059b92
mov r8d, dword [rbx + 8]
xor edx, edx
imul r8d, dword [rbx + 4]
mov qword [rsp + 0x68], r13
lea r13d, [rdi + rdi]
mov dword [rsp + 0x2c], r13d
shl r8, 2
call fcn.1400fddca
mov ecx, dword [rbx + 4]
test ecx, ecx
je 0x1400598ef
mov ebp, dword [rbx + 8]
test ebp, ebp
je 0x1400598eb
cmp dword [rbx], r15d
je 0x1400598eb
mov r9, qword [rbx + 0x18]
test r9, r9
je 0x140059828
cmp dword [rbx + 0x10], r15d
jne 0x140059854
cmp qword [rbx + 0x28], r15
je 0x140059834
cmp dword [rbx + 0x20], r15d
jne 0x140059854
cmp qword [rbx + 0x38], r15
je 0x140059840
cmp dword [rbx + 0x30], r15d
jne 0x140059854
cmp qword [rbx + 0x48], r15
je 0x1400598eb
cmp dword [rbx + 0x40], r15d
je 0x1400598eb
movsxd rax, dword [rbx + 0x10]
mov r11, rcx
mov rcx, qword [rsp + 0x38]
add rcx, 4
add ebp, 0xfffffffe
lea rsi, [rax + r9]
lea r10, [rax + rsi]
lea r11, [rcx + r11*4]
nop dword [rax]
nop word [rax + rax]
mov edi, dword [rbx + 4]
sub edi, 2
nop word [rax + rax]
movzx eax, byte [r9 + 1]
inc rsi
movzx ecx, byte [r10 + 1]
sub ecx, eax
movzx eax, byte [r9 + 2]
add ecx, ecx
sub ecx, eax
movzx eax, byte [r10 + 2]
add ecx, eax
movzx eax, byte [r9]
sub ecx, eax
inc r9
movzx eax, byte [r10]
inc r10
add ecx, eax
mov dword [r11], ecx
add r11, 4
sub edi, 1
jne 0x140059890
add r9, 2
add rsi, 2
add r10, 2
add r11, 8
sub ebp, 1
jne 0x140059880
mov rsi, qword [rsp + 0x40]
mov edi, dword [rsp + 0x24]
mov ebp, dword [rsp + 0x20]
mov rax, qword [rsi]
lea edx, [r13*4 + 4]
mov rcx, rsi
call qword [rax + 8]
mov r13, rax
test rax, rax
je 0x140059b5a
mov ecx, dword [r14 + 0xc]
mov eax, 0x51eb851f
cmp dword [r14 + 8], ecx
mov r10d, dword [rbx + 4]
cmovg ecx, dword [r14 + 8]
shl ecx, 0xa
imul ecx
mov ecx, edx
sar ecx, 5
mov eax, ecx
shr eax, 0x1f
add ecx, eax
mov dword [rsp + 0x34], ecx
test r10d, r10d
je 0x1400599a0
cmp dword [rbx + 8], r15d
je 0x1400599a0
mov ecx, ebp
mov eax, edi
sub ecx, edi
mov r8, r13
imul ecx, r10d
sub rcx, rax
movsxd rax, r12d
add rcx, rax
mov rax, qword [rsp + 0x38]
lea ebx, [rdi*2 + 1]
sub r10d, ebx
mov r9d, ebx
movsxd r11, r10d
shl r11, 2
lea rax, [rax + rcx*4]
nop word [rax + rax]
mov ecx, r15d
mov edx, ebx
add ecx, dword [rax]
add rax, 4
sub edx, 1
jne 0x140059985
mov dword [r8], ecx
add rax, r11
add r8, 4
sub r9d, 1
jne 0x140059980
mov r12d, dword [rsp + 0x24]
lea rbx, [r13 + 4]
mov r10d, 1
mov r8d, 0x7fffffff
mov r11d, 0x80000000
mov r9d, r8d
mov ebp, r15d
mov edi, r11d
lea esi, [r12 - 1]
cmp esi, r10d
jl 0x140059a09
nop
mov edx, dword [rbx]
lea rbx, [rbx + 4]
neg edx
mov ecx, r9d
mov eax, edx
sar eax, 0x1f
mov r9d, eax
xor r9d, edx
sub r9d, eax
mov eax, r10d
cmp r9d, ecx
cmovge r9d, ecx
cmp edx, edi
mov ecx, edx
cmovle ecx, edi
cmovle eax, ebp
inc r10d
mov ebp, eax
mov edi, ecx
cmp r10d, esi
jle 0x1400599d0
lea r10d, [r12 + 1]
mov ebx, r15d
movsxd rax, r10d
lea rsi, [rax*4]
add rsi, r13
lea eax, [r12 + r12]
cmp r10d, eax
jg 0x140059a6f
mov r12d, dword [rsp + 0x2c]
nop dword [rax]
mov edx, dword [rsi]
lea rsi, [rsi + 4]
mov ecx, r8d
mov eax, edx
sar eax, 0x1f
mov r8d, eax
xor r8d, edx
sub r8d, eax
mov eax, r10d
cmp r8d, ecx
cmovge r8d, ecx
cmp edx, r11d
mov ecx, edx
cmovle ecx, r11d
cmovle eax, ebx
inc r10d
mov ebx, eax
mov r11d, ecx
cmp r10d, r12d
jle 0x140059a30
mov r12d, dword [rsp + 0x24]
mov esi, dword [rsp + 0x30]
lea ecx, [r9 + r9*4]
mov r10d, dword [rsp + 0x20]
sub ebx, r12d
mov edx, esi
mov eax, r10d
sub eax, esi
shr edx, 3
sub edx, r12d
add edx, r10d
add edx, ebp
cmp edi, ecx
cmovg eax, edx
imul eax, dword [rsp + 0x34]
mov r9d, eax
sar r9d, 0x1f
add r9d, eax
lea eax, [r8 + r8*4]
sar r9d, 9
inc r9d
sar r9d, 1
cmp r11d, eax
mov eax, dword [rsp + 0x28]
cmovle ebx, esi
add ebx, r10d
imul ebx, dword [rsp + 0x34]
mov r8d, ebx
sar r8d, 0x1f
add r8d, ebx
sar r8d, 9
inc r8d
sar r8d, 1
cmp eax, 0xffffffa6
je 0x140059b31
test eax, eax
je 0x140059b27
cmp eax, 0x5a
je 0x140059b08
cmp eax, 0xb4
jne 0x140059b37
mov edx, dword [r14 + 4]
add edx, dword [r14 + 0xc]
mov eax, edx
sub eax, r9d
sub edx, r8d
lea r9d, [rax - 1]
lea r8d, [rdx - 1]
jmp 0x140059b37
mov edx, dword [r14 + 8]
mov ecx, dword [r14]
mov eax, ecx
sub eax, r9d
sub ecx, r8d
lea r9d, [rdx - 1]
add r9d, eax
lea r8d, [rdx - 1]
add r8d, ecx
jmp 0x140059b37
add r9d, dword [r14 + 4]
add r8d, dword [r14 + 4]
jmp 0x140059b37
add r9d, dword [r14]
add r8d, dword [r14]
mov rax, qword [rsp + 0x48]
mov rdx, r13
mov rsi, qword [rsp + 0x40]
mov rcx, rsi
mov dword [rax], r9d
mov rax, qword [rsp + 0x50]
mov dword [rax], r8d
mov rax, qword [rsi]
call qword [rax + 0x10]
jmp 0x140059b60
mov r15d, 0xfffffffd
mov rax, qword [rsi]
mov rcx, rsi
mov rdx, qword [rsp + 0x38]
call qword [rax + 0x10]
mov r13, qword [rsp + 0x68]
mov eax, r15d
mov r12, qword [rsp + 0x70]
mov rdi, qword [rsp + 0xb0]
mov r15, qword [rsp + 0x60]
add rsp, 0x78
pop r14
pop rsi
pop rbp
pop rbx
ret
mov eax, 0xfffffffd
jmp 0x140059b76
mov eax, 0x61
jmp 0x140059b76
mov eax, 0xfffffffc
add rsp, 0x78
pop r14
pop rsi
pop rbp
pop rbx
ret