Function at 0x14035aa60
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
test rdx, rdx
mov qword [rsp + 0x80], rdx
sete al
test ecx, ecx
mov dword [rsp + 0x7c], ecx
setle dl
or eax, edx
cmp byte [0x140395124], 0
mov ebx, eax
je 0x14035af71
mov ecx, 5
call qword [0x140395190]
test rax, rax
mov qword [rsp + 0x88], rax
je 0x14035af71
mov rcx, rax
call qword [0x1403951a0]
test bl, bl
jne 0x14035af3e
mov ebx, dword [0x140395340]
test ebx, ebx
je 0x14035ae51
movzx eax, byte [0x1403953c0]
cmp dword [rsp + 0x7c], eax
mov r8, rax
jle 0x14035aefe
test al, al
jne 0x14035ae1f
nop word [rax + rax]
mov eax, dword [0x140395370]
mov r13d, dword [0x140395340]
mov esi, dword [0x140395344]
mov ebx, dword [0x140395348]
lea ecx, [rax + 1]
mov eax, dword [0x14039536c]
mov r11d, dword [0x14039534c]
mov dword [rsp + 0x48], ecx
mov ebp, dword [0x140395350]
mov dword [0x140395370], ecx
mov edi, dword [0x140395354]
mov dword [rsp + 0x40], r13d
mov r8d, dword [0x140395358]
mov dword [rsp + 0x3c], eax
mov r15d, dword [0x14039535c]
mov dword [rsp + 0x4c], esi
mov eax, dword [0x140395378]
mov dword [rsp + 0x44], ebx
mov r10d, dword [0x140395360]
mov dword [rsp + 0x58], r11d
mov r9d, dword [0x140395364]
mov dword [rsp + 0x54], ebp
mov r12d, dword [0x140395368]
mov dword [rsp + 0x50], edi
mov edx, dword [0x140395374]
mov dword [rsp + 0x74], eax
mov r14d, dword [0x14039537c]
mov dword [rsp + 0x5c], r8d
mov dword [rsp + 0x60], r15d
mov dword [rsp + 0x64], r10d
mov dword [rsp + 0x68], r9d
mov dword [rsp + 0x6c], r12d
mov dword [rsp + 0x70], edx
mov dword [rsp + 0x78], r14d
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x38], 0xa
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
nop dword [rax]
add r13d, ebp
add esi, edi
add ebx, r8d
xor ecx, r13d
xor edx, esi
xor eax, ebx
rol ecx, 0x10
rol edx, 0x10
add r10d, ecx
add r9d, edx
rol eax, 0x10
xor ebp, r10d
xor edi, r9d
add r12d, eax
rol ebp, 0xc
rol edi, 0xc
xor r8d, r12d
add r13d, ebp
add esi, edi
rol r8d, 0xc
xor ecx, r13d
xor edx, esi
add ebx, r8d
rol ecx, 8
rol edx, 8
xor eax, ebx
add r10d, ecx
add r9d, edx
xor ebp, r10d
xor edi, r9d
mov dword [rsp + 0x34], r9d
rol ebp, 7
rol edi, 7
mov dword [rsp + 0x30], r10d
rol eax, 8
add r11d, r15d
add r13d, edi
xor r14d, r11d
add r12d, eax
mov r9d, r14d
mov r14d, dword [rsp + 0x2c]
xor r8d, r12d
rol r9d, 0x10
rol r8d, 7
add esi, r8d
xor ecx, esi
add r14d, r9d
rol ecx, 0x10
xor r15d, r14d
mov r10d, r14d
rol r15d, 0xc
add r11d, r15d
xor r9d, r11d
rol r9d, 8
add r10d, r9d
xor r9d, r13d
rol r9d, 0x10
xor r15d, r10d
add r10d, ecx
add r12d, r9d
rol r15d, 7
xor edi, r12d
rol edi, 0xc
add r13d, edi
xor r9d, r13d
mov r14d, r9d
mov r9d, dword [rsp + 0x34]
rol r14d, 8
add r12d, r14d
xor edi, r12d
rol edi, 7
xor r8d, r10d
add ebx, r15d
rol r8d, 0xc
add r11d, ebp
xor edx, ebx
add esi, r8d
xor eax, r11d
rol edx, 0x10
xor ecx, esi
rol eax, 0x10
rol ecx, 8
add r9d, eax
add r10d, ecx
xor ebp, r9d
xor r8d, r10d
mov dword [rsp + 0x2c], r10d
mov r10d, dword [rsp + 0x30]
rol ebp, 0xc
add r11d, ebp
rol r8d, 7
xor eax, r11d
rol eax, 8
add r10d, edx
add r9d, eax
xor r15d, r10d
xor ebp, r9d
rol r15d, 0xc
rol ebp, 7
add ebx, r15d
xor edx, ebx
rol edx, 8
add r10d, edx
xor r15d, r10d
rol r15d, 7
sub dword [rsp + 0x38], 1
jne 0x14035abd0
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x40]
add eax, r13d
mov dword [0x140395380], eax
mov eax, dword [rsp + 0x4c]
add eax, esi
mov dword [0x140395384], eax
mov eax, dword [rsp + 0x44]
add eax, ebx
mov ebx, dword [rsp + 0x30]
mov dword [0x140395388], eax
mov eax, dword [rsp + 0x58]
add eax, r11d
mov r11d, dword [rsp + 0x54]
mov dword [0x14039538c], eax
mov eax, dword [rsp + 0x5c]
add r11d, ebp
add r8d, eax
mov eax, dword [rsp + 0x60]
mov dword [0x140395390], r11d
mov dword [0x140395398], r8d
mov r8d, dword [rsp + 0x2c]
mov r11d, dword [rsp + 0x50]
add r15d, eax
mov eax, dword [rsp + 0x64]
mov dword [0x14039539c], r15d
add r11d, edi
mov dword [0x140395394], r11d
add r10d, eax
mov eax, dword [rsp + 0x68]
mov dword [0x1403953a0], r10d
add r9d, eax
mov eax, dword [rsp + 0x6c]
mov dword [0x1403953a4], r9d
add r12d, eax
mov eax, dword [rsp + 0x3c]
mov dword [0x1403953a8], r12d
add r8d, eax
mov eax, dword [rsp + 0x48]
mov dword [0x1403953ac], r8d
add eax, ecx
mov dword [0x1403953b0], eax
mov eax, dword [rsp + 0x70]
add edx, eax
mov eax, dword [rsp + 0x74]
mov dword [0x1403953b4], edx
add ebx, eax
mov dword [0x1403953b8], ebx
mov eax, dword [rsp + 0x78]
mov byte [0x1403953c0], 0x40
add r14d, eax
cmp dword [rsp + 0x7c], 0x40
mov dword [0x1403953bc], r14d
jle 0x14035af6a
mov r8d, 0x40
mov rsi, qword [rsp + 0x80]
lea rdx, [0x140395380]
mov rcx, rsi
call sym.memcpy
movzx edx, byte [0x1403953c0]
sub dword [rsp + 0x7c], edx
add rsi, rdx
mov qword [rsp + 0x80], rsi
jmp 0x14035aaf8
call sym.sqlite3_initialize
test eax, eax
jne 0x14035afd2
cmp byte [0x140395124], 0
je 0x14035afb2
mov ecx, 2
call qword [0x140395190]
test rax, rax
mov rdi, rax
je 0x14035afb2
mov rcx, rax
call qword [0x1403951a0]
mov rsi, qword [0x1403955c0]
mov rcx, rdi
call qword [0x1403951b0]
movdqa xmm1, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140395340], xmm1
test rsi, rsi
je 0x14035afe1
mov edx, dword [0x1403952d0]
lea r8, [0x140395350]
test edx, edx
jne 0x14035b000
mov edx, 0x2c
mov rcx, rsi
call qword [rsi + 0x68]
mov ebx, dword [0x140395370]
mov eax, dword [rsp + 0x7c]
mov dword [0x14039537c], ebx
mov dword [0x140395370], 0
mov byte [0x1403953c0], 0
test eax, eax
jg 0x14035aaf8
xor eax, eax
movsxd r8, dword [rsp + 0x7c]
mov rcx, qword [rsp + 0x80]
sub eax, r8d
mov rbx, r8
lea edx, [rax + 0x40]
lea rax, [0x140395340]
movsxd rdx, edx
add rdx, rax
call sym.memcpy
mov rax, qword [rsp + 0x88]
sub byte [0x1403953c0], bl
test rax, rax
je 0x14035af9e
mov rcx, rax
jmp 0x14035af50
mov rcx, qword [rsp + 0x88]
mov dword [0x140395340], 0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp qword [0x1403951b0]
mov eax, 0x40
jmp 0x14035aefe
test bl, bl
jne 0x14035af94
mov ebx, dword [0x140395340]
mov qword [rsp + 0x88], 0
test ebx, ebx
jne 0x14035aad6
jmp 0x14035ae51
mov dword [0x140395340], 0
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rsi, qword [0x1403955c0]
test rsi, rsi
je 0x14035afd2
movdqa xmm2, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140395340], xmm2
jmp 0x14035aeb3
movdqa xmm0, xmmword [str.expand_32_byte_kcume_dist]
movaps xmmword [0x140395340], xmm0
lea rdx, [0x140395350]
mov ecx, 5
xor eax, eax
mov rdi, rdx
rep stosq qword [rdi], rax
mov dword [rdi], 0
jmp 0x14035aed9
mov ecx, 5
xor eax, eax
mov rdi, r8
rep stosq qword [rdi], rax
mov dword [0x140395350], edx
mov dword [rdi], 0
jmp 0x14035aed9