Function at 0x180049e40
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov dword [rax + 0x20], r9d
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
push rbx
push rbp
push r12
push r14
push r15
sub rsp, 0xa0
mov rbx, qword [rcx]
movzx ebp, byte [rcx + 0x1e2]
mov r15d, r8d
test dword [rbx + 0x18], 0x4000000
mov r14, rdx
mov r12, rcx
je 0x18004a51b
mov qword [rax - 0x30], rsi
xor edx, edx
mov qword [rax - 0x38], rdi
mov qword [rax - 0x40], r13
cmp qword [rcx + 0x18], rdx
jne 0x180049ec1
mov rcx, rbx
call fcn.1800213a0
mov qword [r12 + 0x18], rax
test rax, rax
je 0x180049ebf
xor r9d, r9d
xor r8d, r8d
mov edx, 0x84
mov rcx, rax
mov dword [rsp + 0x20], 0
call fcn.180021570
xor edx, edx
mov rcx, qword [r14 + 0x80]
mov edi, 0xfff0bdc0
mov dword [rsp + 0xd0], edi
test rcx, rcx
je 0x180049f07
cmp dword [rbx + 8], 0
mov edi, edx
mov dword [rsp + 0xd0], edx
jle 0x180049f07
mov rax, qword [rbx + 0x10]
add rax, 0x18
cmp qword [rax], rcx
je 0x180049f00
inc edi
add rax, 0x20
cmp edi, dword [rbx + 8]
jl 0x180049ef0
mov dword [rsp + 0xd0], edi
mov rax, qword [rbx + 0x10]
mov rsi, qword [r14 + 0x40]
movsxd rcx, edi
shl rcx, 5
mov r13, rbp
mov qword [rsp + 0x68], rbp
mov rax, qword [rcx + rax]
mov qword [rsp + 0x78], rax
test rsi, rsi
je 0x18004a194
jmp 0x180049f42
xor edx, edx
cmp byte [r12 + 0x1e2], 0
mov qword [rsp + 0x70], rdx
mov qword [rsp + 0x58], rdx
mov dword [rsp + 0x50], edx
je 0x180049f6c
mov rdx, qword [rsi + 0x10]
mov r8, rax
mov rcx, rbx
call fcn.18003cba0
jmp 0x180049f7d
mov r8, qword [rsi + 0x10]
mov r9, rax
xor edx, edx
mov rcx, r12
call fcn.18003cd20
mov rbp, rax
test rax, rax
je 0x18004a15f
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x70]
mov r8, rsi
mov rdx, rbp
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.1800486d0
test eax, eax
jne 0x18004a15f
mov r14, qword [rsp + 0x58]
test r14, r14
je 0x180049fbd
mov rax, r14
jmp 0x180049fc9
mov eax, dword [rsi + 0x40]
mov dword [rsp + 0x54], eax
lea rax, [rsp + 0x54]
mov r15, qword [rsp + 0x70]
xor r13d, r13d
mov qword [rsp + 0x60], rax
cmp dword [rsi + 0x28], r13d
jle 0x18004a082
mov r14d, dword [rsp + 0xd0]
mov rdx, rax
mov rdi, rax
neg rdx
mov qword [rsp + 0x70], rdx
nop word [rax + rax]
mov ecx, dword [rdi]
mov rax, qword [rsp + 0xd8]
mov eax, dword [rax + 0x10]
cmp ecx, eax
mov eax, 0xffffffff
cmove ecx, eax
mov dword [rdi], ecx
cmp qword [rbx + 0x168], 0
je 0x18004a069
test r15, r15
je 0x18004a035
mov rax, qword [r15 + 0x10]
lea rcx, [rdx + rax]
mov eax, dword [rcx + rdi]
jmp 0x18004a038
mov eax, dword [rbp + 0x10]
mov rdx, qword [rbp + 8]
cdqe
mov r9d, r14d
lea r8, [rax + rax*2]
mov rax, qword [rbp + 0x18]
mov rcx, r12
add r8, r8
mov r8, qword [rax + r8*8]
call fcn.18003c1b0
mov rdx, qword [rsp + 0x70]
xor ecx, ecx
cmp eax, 2
sete cl
mov dword [rsp + 0x50], ecx
inc r13d
add rdi, 4
cmp r13d, dword [rsi + 0x28]
jl 0x18004a000
mov r14, qword [rsp + 0x58]
mov edi, dword [rsp + 0xd0]
mov rax, qword [rbp + 8]
mov r8d, dword [rbp + 0x28]
xor r9d, r9d
mov edx, edi
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.18003c470
mov eax, dword [rsp + 0xe0]
inc dword [r12 + 0x54]
mov r13d, dword [rsp + 0x50]
test eax, eax
je 0x18004a0e0
mov dword [rsp + 0x40], r13d
or ecx, 0xffffffff
mov r9, r15
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov r8, rbp
mov edx, edi
mov rcx, r12
mov qword [rsp + 0x20], rsi
call fcn.180048a60
mov eax, dword [rsp + 0xe8]
test eax, eax
je 0x18004a11b
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x38], 1
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x60]
mov r9, r15
mov r8, rbp
mov qword [rsp + 0x28], rax
mov edx, edi
mov rcx, r12
mov qword [rsp + 0x20], rsi
call fcn.180048a60
test r14, r14
je 0x18004a150
cmp r14, qword [rbx + 0x158]
jb 0x18004a150
cmp r14, qword [rbx + 0x160]
jae 0x18004a150
mov rax, qword [rbx + 0x150]
mov r13, qword [rsp + 0x68]
mov qword [r14], rax
dec dword [rbx + 0x144]
mov qword [rbx + 0x150], r14
jmp 0x18004a172
mov rcx, r14
call sym.sqlite3.dll_sqlite3_free
mov r13, qword [rsp + 0x68]
jmp 0x18004a172
test r13, r13
je 0x18004a503
cmp byte [rbx + 0x2a], 0
jne 0x18004a503
mov rsi, qword [rsi + 8]
mov rax, qword [rsp + 0x78]
test rsi, rsi
jne 0x180049f40
mov r14, qword [rsp + 0xd8]
mov r15d, dword [rsp + 0xe0]
mov r11, qword [r14 + 8]
mov r8, r11
test r11, r11
je 0x18004a1b9
cmp byte [r11], 0
je 0x18004a1af
inc r8
cmp byte [r8], 0
jne 0x18004a1a6
sub r8d, r11d
and r8d, 0x3fffffff
mov rdi, qword [r14 + 0x80]
cmp qword [rdi + 0x60], 0
je 0x18004a205
xor eax, eax
mov r9d, r8d
mov r10, r11
test r8d, r8d
jle 0x18004a1fe
lea rsi, [0x180097ae0]
nop dword [rax + rax]
movzx ecx, byte [r10]
dec r9d
inc r10
movzx edx, byte [rcx + rsi]
lea ecx, [rax*8]
xor edx, ecx
xor eax, edx
test r9d, r9d
jg 0x18004a1e0
xor edx, edx
div dword [rdi + 0x50]
jmp 0x18004a207
xor edx, edx
mov r9d, edx
lea rcx, [rdi + 0x50]
mov rdx, r11
call fcn.18000ac60
test rax, rax
je 0x18004a503
mov rbp, qword [rax + 0x10]
test rbp, rbp
je 0x18004a503
mov edi, 0x60
cmp byte [rbp + 0x2c], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x70], 0
jne 0x18004a263
cmp qword [r12 + 0x1c8], 0
jne 0x18004a263
cmp byte [r12 + 0x168], 0
je 0x18004a4f1
lea rax, [rsp + 0x70]
lea r9, [rsp + 0x60]
mov r8, rbp
mov rdx, r14
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.1800486d0
test eax, eax
je 0x18004a29c
test r13, r13
je 0x18004a503
cmp byte [rbx + 0x2a], 0
jne 0x18004a503
jmp 0x18004a4f1
cmp byte [rbx + 0x2a], 0
mov rsi, qword [rsp + 0x70]
jne 0x18004a452
cmp byte [rbx + 0x142], 0
je 0x18004a2f4
cmp di, word [rbx + 0x140]
ja 0x18004a2f4
mov rdi, qword [rbx + 0x150]
test rdi, rdi
je 0x18004a2ef
mov rax, qword [rdi]
inc dword [rbx + 0x144]
mov qword [rbx + 0x150], rax
mov eax, dword [rbx + 0x144]
cmp eax, dword [rbx + 0x148]
jle 0x18004a356
mov dword [rbx + 0x148], eax
jmp 0x18004a356
mov edi, 0x60
cmp dword [0x1800ac3f0], 0
je 0x18004a33a
mov rcx, qword [0x1800af828]
test rcx, rcx
je 0x18004a30f
call qword [0x1800ac468]
lea rdx, [rsp + 0xd0]
mov ecx, edi
call fcn.180006ef0
mov rcx, qword [0x1800af828]
test rcx, rcx
je 0x18004a330
call qword [0x1800ac478]
mov rdi, qword [rsp + 0xd0]
jmp 0x18004a34d
mov ecx, edi
call qword [0x1800ac408]
mov rdi, rax
mov qword [rsp + 0xd0], rax
test rdi, rdi
jne 0x18004a35f
mov byte [rbx + 0x2a], 1
test rdi, rdi
je 0x18004a44d
xor edx, edx
mov rcx, rdi
lea r8d, [rdx + 0x60]
call fcn.18008c4a0
mov eax, 1
mov rdx, rdi
mov word [rdi + 2], ax
movsx r9d, word [rdi]
mov r8d, eax
mov rcx, rbx
call fcn.180041e00
cmp byte [rbx + 0x2a], 0
mov rdi, rax
je 0x18004a399
mov rdx, rax
jmp 0x18004a445
movsx eax, word [rax]
mov r13, qword [rsp + 0x60]
dec eax
movsxd rcx, eax
xor eax, eax
imul rcx, rcx, 0x58
mov qword [rcx + rdi + 0x10], rax
mov qword [rcx + rdi + 8], rax
mov rdx, qword [rbp]
mov qword [rdi + 0x20], rdx
mov rax, qword [rbp]
mov rcx, qword [rax + 8]
mov qword [rdi + 0x10], rcx
inc word [rdx + 0x38]
mov eax, dword [r12 + 0x54]
mov dword [rdi + 0x34], eax
mov eax, dword [rsp + 0xe8]
inc dword [r12 + 0x54]
test eax, eax
je 0x18004a40c
or ecx, 0xffffffff
mov r9, r13
mov r8, r14
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], eax
mov rcx, r12
mov rdx, rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rbp
call fcn.180049460
test r15d, r15d
je 0x18004a43a
mov eax, 1
mov r9, r13
mov r8, r14
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], r15d
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x20], rbp
call fcn.180049460
mov qword [rdi + 0x10], 0
mov rdx, rdi
mov rcx, rbx
call fcn.1800420d0
mov edi, 0x60
test rsi, rsi
je 0x18004a4f1
cmp rsi, qword [rbx + 0x158]
jb 0x18004a486
cmp rsi, qword [rbx + 0x160]
jae 0x18004a486
mov rax, qword [rbx + 0x150]
mov qword [rsi], rax
dec dword [rbx + 0x144]
mov qword [rbx + 0x150], rsi
jmp 0x18004a4f1
cmp dword [0x1800ac3f0], 0
je 0x18004a4e8
mov rcx, qword [0x1800af828]
test rcx, rcx
je 0x18004a4a1
call qword [0x1800ac468]
mov rcx, rsi
call qword [0x1800ac420]
mov edx, dword [0x1800af7c0]
mov rcx, rsi
neg eax
add edx, eax
mov eax, dword [0x1800af7e4]
cmp edx, eax
mov dword [0x1800af7c0], edx
cmovg eax, edx
mov dword [0x1800af7e4], eax
call qword [0x1800ac410]
mov rcx, qword [0x1800af828]
test rcx, rcx
je 0x18004a4f1
call qword [0x1800ac478]
jmp 0x18004a4f1
mov rcx, rsi
call qword [0x1800ac410]
mov rbp, qword [rbp + 0x18]
mov r13, qword [rsp + 0x68]
test rbp, rbp
jne 0x18004a231
mov rdi, qword [rsp + 0x90]
mov rsi, qword [rsp + 0x98]
mov r13, qword [rsp + 0x88]
add rsp, 0xa0
pop r15
pop r14
pop r12
pop rbp
pop rbx
ret