Function at 0x140058de0
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 0x1400593c0
mov r11d, dword [rdx + 4]
test r11d, r11d
je 0x1400593c0
mov r9d, dword [rdx + 8]
test r9d, r9d
je 0x1400593c0
cmp dword [rdx], 0
je 0x1400593c0
cmp qword [rdx + 0x18], 0
je 0x140058e53
cmp dword [rdx + 0x10], 0
jne 0x140058e82
cmp qword [rdx + 0x28], 0
je 0x140058e60
cmp dword [rdx + 0x20], 0
jne 0x140058e82
cmp qword [rdx + 0x38], 0
je 0x140058e6d
cmp dword [rdx + 0x30], 0
jne 0x140058e82
cmp qword [rdx + 0x48], 0
je 0x1400593c0
cmp dword [rdx + 0x40], 0
je 0x1400593c0
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 0x140058f15
test ebp, ebp
je 0x140058f04
cmp ebp, 0x5a
je 0x140058eed
cmp ebp, 0xb4
jne 0x140058ee3
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 0x140058f2a
mov ecx, dword [rsp + 0x28]
mov edx, dword [rsp + 0x28]
jmp 0x140058f2a
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 0x140058f2a
mov ecx, dword [r14 + 0x18]
sub ecx, dword [r14]
mov edx, dword [r14 + 0x1c]
sub edx, dword [r14 + 4]
jmp 0x140058f2a
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 0x140058f68
test r8d, r8d
mov r12d, r15d
cmovns r12d, r8d
lea ebp, [r9 - 1]
mov dword [rsp + 0x20], ebp
cmp eax, ebp
jg 0x140058f80
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 0x1400593b9
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 0x1400593b2
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.1400fd5ea
mov ecx, dword [rbx + 4]
test ecx, ecx
je 0x14005910f
mov ebp, dword [rbx + 8]
test ebp, ebp
je 0x14005910b
cmp dword [rbx], r15d
je 0x14005910b
mov r9, qword [rbx + 0x18]
test r9, r9
je 0x140059048
cmp dword [rbx + 0x10], r15d
jne 0x140059074
cmp qword [rbx + 0x28], r15
je 0x140059054
cmp dword [rbx + 0x20], r15d
jne 0x140059074
cmp qword [rbx + 0x38], r15
je 0x140059060
cmp dword [rbx + 0x30], r15d
jne 0x140059074
cmp qword [rbx + 0x48], r15
je 0x14005910b
cmp dword [rbx + 0x40], r15d
je 0x14005910b
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 0x1400590b0
add r9, 2
add rsi, 2
add r10, 2
add r11, 8
sub ebp, 1
jne 0x1400590a0
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 0x14005937a
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 0x1400591c0
cmp dword [rbx + 8], r15d
je 0x1400591c0
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 0x1400591a5
mov dword [r8], ecx
add rax, r11
add r8, 4
sub r9d, 1
jne 0x1400591a0
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 0x140059229
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 0x1400591f0
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 0x14005928f
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 0x140059250
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 0x140059351
test eax, eax
je 0x140059347
cmp eax, 0x5a
je 0x140059328
cmp eax, 0xb4
jne 0x140059357
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 0x140059357
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 0x140059357
add r9d, dword [r14 + 4]
add r8d, dword [r14 + 4]
jmp 0x140059357
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 0x140059380
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 0x140059396
mov eax, 0x61
jmp 0x140059396
mov eax, 0xfffffffc
add rsp, 0x78
pop r14
pop rsi
pop rbp
pop rbx
ret