Function at 0x140165980
Capabilities:
Reference sql statements

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov r13, r8
mov rbx, rdx
xor esi, esi
mov dword [rsp + 0xc0], esi
lea ecx, [rsi + 0x30]
call fcn.1402bcb4c
mov qword [rsp + 0xd8], rax
test rax, rax
je 0x1401659dd
lea r8d, [rsi + 2]
mov rdx, rbx
mov rcx, rax
call fcn.14020be90
mov r12, rax
jmp 0x1401659e0
mov r12, rsi
lea rax, vtable.Core::SharedPtr_class_Core::Data::SqliteConnection_.0
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], r12
mov r15, rsi
mov qword [rsp + 0x58], rsi
test r12, r12
je 0x140165a28
mov ecx, 4
call fcn.1402bcb4c
mov r15, rax
test rax, rax
je 0x140165a19
mov dword [rax], esi
mov qword [rsp + 0x58], rax
jmp 0x140165a21
mov r15, rsi
mov qword [rsp + 0x58], rsi
mov dword [r15], 1
mov dword [r12 + 0x24], 0x3e8
mov rax, qword [r12 + 0x28]
mov rcx, qword [rax]
test rcx, rcx
je 0x140165a48
mov edx, 0x3e8
call fcn.1402925b0
lea rdx, [r12 + 0x10]
mov r8d, dword [r12 + 0x24]
mov rcx, qword [r12 + 0x28]
call fcn.14020bd00
mov byte [r12 + 0x20], al
test al, al
je 0x14016603d
mov rbx, qword [r13]
lea rdi, vtable.Core::Data::SqliteCommand.0
lea r14, [0x14034d1a0]
mov qword [rsp + 0xd8], rbx
cmp rbx, qword [r13 + 8]
je 0x140165bea
cmp byte [rbx + 0x18], 0
je 0x140165be1
mov r8, qword [rbx + 8]
lea rdx, str.DELETE_FROM_keywords_WHERE_Keyword_ls
lea rcx, [rsp + 0x38]
call fcn.140202d40
nop
mov ecx, 0x20
call fcn.1402bcb4c
mov r14, rax
mov qword [rsp + 0x28], rax
test rax, rax
je 0x140165b1c
mov qword [rax], rdi
mov qword [rax + 0x10], 0
mov edx, dword [rsp + 0x44]
test edx, edx
jne 0x140165ae4
lea rax, [0x14034d1a0]
mov qword [r14 + 8], rax
jmp 0x140165b09
lea rcx, [rax + 8]
call fcn.1402028a0
movsxd r9, dword [rsp + 0x44]
mov eax, dword [r14 + 0x10]
inc eax
movsxd rdx, eax
mov r8, qword [rsp + 0x38]
mov rcx, qword [r14 + 8]
call fcn.1402c06dc
mov edx, dword [rsp + 0x44]
lea rcx, [r14 + 8]
call fcn.140203bb0
mov qword [r14 + 0x18], r12
jmp 0x140165b1f
mov r14, rsi
lea rax, vtable.Core::SharedPtr_class_Core::Data::SqliteCommand_.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], r14
mov rdi, rsi
mov qword [rsp + 0x70], rsi
test r14, r14
je 0x140165b66
mov ecx, 4
call fcn.1402bcb4c
mov rdi, rax
test rax, rax
je 0x140165b58
mov dword [rax], esi
mov qword [rsp + 0x70], rax
jmp 0x140165b60
mov rdi, rsi
mov qword [rsp + 0x70], rsi
mov dword [rdi], 1
mov rcx, r14
call fcn.14020c190
mov rax, qword [rbx]
mov byte [rax + 0x59], 1
test rdi, rdi
je 0x140165ba4
mov eax, dword [rdi]
test eax, eax
jle 0x140165b84
dec eax
mov dword [rdi], eax
cmp dword [rdi], 0
jne 0x140165ba4
test r14, r14
je 0x140165b9b
mov rax, qword [r14]
mov edx, 1
mov rcx, r14
call qword [rax]
mov rcx, rdi
call fcn.14021ae20
nop
jmp 0x140165bc2
lea r14, [0x14034d1a0]
lea rdi, vtable.Core::Data::SqliteCommand.0
cmp dword [rsp + 0x40], 0
jle 0x140165be1
mov rcx, qword [rsp + 0x38]
call fcn.1402bd0e0
add rbx, 0x20
jmp 0x140165a7b
mov ecx, 0x20
call fcn.1402bcb4c
mov rdi, rax
mov qword [rsp + 0xd8], rax
test rax, rax
je 0x140165cbb
mov qword [rsp + 0x30], 0
mov edx, 0x70
lea rcx, [rsp + 0x28]
call fcn.1402028a0
mov eax, dword [rsp + 0x30]
inc eax
movsxd rdx, eax
mov r9d, 0x70
lea r8, str.SELECT_COUNT___FROM_meta_INNER_JOIN_keywords_ON_keywords.id__meta.value_WHERE_KeyDefault_Search_Provider_ID
mov rcx, qword [rsp + 0x28]
call fcn.1402c06dc
mov edx, 0x70
lea rcx, [rsp + 0x28]
call fcn.140203bb0
nop
mov r13d, dword [rsp + 0xc0]
or r13d, 1
mov dword [rsp + 0xc0], r13d
lea rax, vtable.Core::Data::SqliteCommand.0
mov qword [rdi], rax
mov qword [rdi + 0x10], 0
mov edx, dword [rsp + 0x34]
test edx, edx
jne 0x140165c84
mov qword [rdi + 8], r14
jmp 0x140165ca8
lea rcx, [rdi + 8]
call fcn.1402028a0
movsxd r9, dword [rsp + 0x34]
mov eax, dword [rdi + 0x10]
inc eax
movsxd rdx, eax
mov r8, qword [rsp + 0x28]
mov rcx, qword [rdi + 8]
call fcn.1402c06dc
mov edx, dword [rsp + 0x34]
lea rcx, [rdi + 8]
call fcn.140203bb0
mov qword [rdi + 0x18], r12
jmp 0x140165cc6
mov rdi, rsi
mov r13d, dword [rsp + 0xc0]
lea rax, vtable.Core::SharedPtr_class_Core::Data::SqliteCommand_.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdi
mov rbx, rsi
mov qword [rsp + 0x70], rbx
test rdi, rdi
je 0x140165d0d
mov ecx, 4
call fcn.1402bcb4c
mov rbx, rax
test rax, rax
je 0x140165cff
mov dword [rax], esi
mov qword [rsp + 0x70], rax
jmp 0x140165d07
mov rbx, rsi
mov qword [rsp + 0x70], rbx
mov dword [rbx], 1
test r13b, 1
je 0x140165d30
and r13d, 0xfffffffe
mov dword [rsp + 0xc0], r13d
cmp dword [rsp + 0x30], 0
jle 0x140165d30
mov rcx, qword [rsp + 0x28]
call fcn.1402bd0e0
mov rcx, rdi
call fcn.14020c0b0
mov r14d, eax
test rbx, rbx
je 0x140165d69
mov ecx, dword [rbx]
test ecx, ecx
jle 0x140165d4a
dec ecx
mov dword [rbx], ecx
cmp dword [rbx], 0
jne 0x140165d69
test rdi, rdi
je 0x140165d61
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
mov rcx, rbx
call fcn.14021ae20
test r14d, r14d
jne 0x140165ffb
lea ecx, [r14 + 0x20]
call fcn.1402bcb4c
mov rdi, rax
mov qword [rsp + 0xd8], rax
test rax, rax
je 0x140165e3d
mov qword [rsp + 0x30], 0
lea edx, [r14 + 0x1f]
lea rcx, [rsp + 0x28]
call fcn.1402028a0
mov eax, dword [rsp + 0x30]
inc eax
movsxd rdx, eax
lea r9d, [r14 + 0x1f]
lea r8, str.SELECT_id_FROM_keywords_LIMIT_1
mov rcx, qword [rsp + 0x28]
call fcn.1402c06dc
lea edx, [r14 + 0x1f]
lea rcx, [rsp + 0x28]
call fcn.140203bb0
nop
or r13d, 2
mov dword [rsp + 0xc0], r13d
lea rax, vtable.Core::Data::SqliteCommand.0
mov qword [rdi], rax
mov qword [rdi + 0x10], 0
mov edx, dword [rsp + 0x34]
test edx, edx
jne 0x140165e06
lea rax, [0x14034d1a0]
mov qword [rdi + 8], rax
jmp 0x140165e2a
lea rcx, [rdi + 8]
call fcn.1402028a0
movsxd r9, dword [rsp + 0x34]
mov eax, dword [rdi + 0x10]
inc eax
movsxd rdx, eax
mov r8, qword [rsp + 0x28]
mov rcx, qword [rdi + 8]
call fcn.1402c06dc
mov edx, dword [rsp + 0x34]
lea rcx, [rdi + 8]
call fcn.140203bb0
mov qword [rdi + 0x18], r12
jmp 0x140165e40
mov rdi, rsi
lea rax, vtable.Core::SharedPtr_class_Core::Data::SqliteCommand_.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rdi
mov rbx, rsi
mov qword [rsp + 0x70], rbx
test rdi, rdi
je 0x140165e87
mov ecx, 4
call fcn.1402bcb4c
mov rbx, rax
test rax, rax
je 0x140165e79
mov dword [rax], esi
mov qword [rsp + 0x70], rax
jmp 0x140165e81
mov rbx, rsi
mov qword [rsp + 0x70], rbx
mov dword [rbx], 1
test r13b, 2
je 0x140165e9e
cmp dword [rsp + 0x30], 0
jle 0x140165e9e
mov rcx, qword [rsp + 0x28]
call fcn.1402bd0e0
mov rcx, rdi
call fcn.14020c0b0
mov r14d, eax
test rbx, rbx
je 0x140165ed7
mov eax, dword [rbx]
test eax, eax
jle 0x140165eb8
dec eax
mov dword [rbx], eax
cmp dword [rbx], 0
jne 0x140165ed7
test rdi, rdi
je 0x140165ecf
mov rax, qword [rdi]
mov edx, 1
mov rcx, rdi
call qword [rax]
mov rcx, rbx
call fcn.14021ae20
test r14d, r14d
je 0x140165ffb
mov r8d, r14d
lea rdx, str.UPDATE_meta_SET_value_d_WHERE_KeyDefault_Search_Provider_ID
lea rcx, [rsp + 0x38]
call fcn.140202d40
nop
mov ecx, 0x20
call fcn.1402bcb4c
mov rbx, rax
mov qword [rsp + 0xc0], rax
test rax, rax
je 0x140165f6d
lea rax, vtable.Core::Data::SqliteCommand.0
mov qword [rbx], rax
mov qword [rbx + 0x10], 0
mov edx, dword [rsp + 0x44]
test edx, edx
jne 0x140165f36
lea rax, [0x14034d1a0]
mov qword [rbx + 8], rax
jmp 0x140165f5a
lea rcx, [rbx + 8]
call fcn.1402028a0
movsxd r9, dword [rsp + 0x44]
mov eax, dword [rbx + 0x10]
inc eax
movsxd rdx, eax
mov r8, qword [rsp + 0x38]
mov rcx, qword [rbx + 8]
call fcn.1402c06dc
mov edx, dword [rsp + 0x44]
lea rcx, [rbx + 8]
call fcn.140203bb0
mov qword [rbx + 0x18], r12
jmp 0x140165f70
mov rbx, rsi
lea rax, vtable.Core::SharedPtr_class_Core::Data::SqliteCommand_.0
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rsi
test rbx, rbx
je 0x140165fb1
mov ecx, 4
call fcn.1402bcb4c
test rax, rax
je 0x140165fa6
mov dword [rax], esi
mov rsi, rax
mov qword [rsp + 0x70], rax
jmp 0x140165fab
mov qword [rsp + 0x70], rsi
mov dword [rsi], 1
mov rcx, rbx
call fcn.14020c190
nop
test rsi, rsi
je 0x140165fe9
mov eax, dword [rsi]
test eax, eax
jle 0x140165fc9
dec eax
mov dword [rsi], eax
cmp dword [rsi], 0
jne 0x140165fe9
test rbx, rbx
je 0x140165fe0
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax]
mov rcx, rsi
call fcn.14021ae20
nop
cmp dword [rsp + 0x40], 0
jle 0x140165ffb
mov rcx, qword [rsp + 0x38]
call fcn.1402bd0e0
nop
jmp 0x140166007
test r15, r15
je 0x140166039
mov eax, dword [r15]
test eax, eax
jle 0x140166018
dec eax
mov dword [r15], eax
cmp dword [r15], 0
jne 0x140166039
test r12, r12
je 0x140166031
mov rax, qword [r12]
mov edx, 1
mov rcx, r12
call qword [rax]
mov rcx, r15
call fcn.14021ae20
mov al, 1
jmp 0x14016606d
test r15, r15
je 0x14016606b
mov eax, dword [r15]
test eax, eax
jle 0x14016604e
dec eax
mov dword [r15], eax
cmp dword [r15], 0
jne 0x14016606b
mov rax, qword [r12]
mov edx, 1
mov rcx, r12
call qword [rax]
mov rcx, r15
call fcn.14021ae20
nop
xor al, al
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret