Function at 0x180090260
Capabilities:
Reference sql statements
Resolve function by parsing pe exports

Disassembly:
push rbp
push r13
push r14
sub rsp, 0x50
xor r14d, r14d
mov rbp, rdx
mov r13, rcx
cmp byte [rdx + 0x53], r14b
jne 0x180090293
lea r8, str.cannot_VACUUM_from_within_a_transaction
call fcn.1800178d0
lea eax, [r14 + 1]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
cmp dword [rdx + 0xa8], 1
jle 0x1800902b7
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.1800178d0
mov eax, 1
add rsp, 0x50
pop r14
pop r13
pop rbp
ret
mov eax, dword [rdx + 0x2c]
mov ecx, dword [rdx + 0x64]
mov qword [rsp + 0x70], rbx
mov ebx, dword [rdx + 0x28]
mov dword [rsp + 0x88], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [rdx + 0x54], 2
mov dword [rsp + 0x20], ecx
mov ecx, dword [rdx + 0x68]
mov dword [rdx + 0x2c], eax
mov rax, qword [rdx + 0x20]
mov dword [rsp + 0x24], ecx
mov rcx, qword [rdx + 0xc8]
mov qword [rdx + 0xc8], r14
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], r12
mov r12, qword [rax + 8]
lea r8, str.ATTACH_:memory:_AS_vacuum_db_
mov rdx, r13
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
movzx eax, byte [rcx + 0x14]
mov rcx, rbp
mov dword [rsp + 0x80], eax
lea rax, str.ATTACH__AS_vacuum_db_
cmovne r8, rax
call fcn.180090010
mov edi, eax
movsxd rax, dword [rbp + 0x28]
cmp eax, ebx
jle 0x180090355
lea ecx, [rax - 1]
movsxd r14, ecx
shl r14, 5
add r14, qword [rbp + 0x20]
test edi, edi
jne 0x180090845
mov rcx, rax
mov rax, qword [rbp + 0x20]
mov qword [rsp + 0x30], r15
shl rcx, 5
mov r15, qword [rcx + rax - 0x18]
mov rcx, r15
call fcn.18002f140
mov rcx, r12
call fcn.18002d9f0
mov dword [rsp + 0x78], eax
cmp dword [rbp + 0x5c], edi
je 0x1800903ad
mov rcx, qword [rbp + 0x20]
mov rdx, qword [rcx + 8]
mov rcx, qword [rdx + 8]
mov rdx, qword [rcx]
mov rcx, qword [rdx + 0x120]
test rcx, rcx
je 0x1800903ad
cmp dword [rcx], edi
je 0x1800903ad
mov dword [rbp + 0x5c], edi
lea r8, str.PRAGMA_vacuum_db.synchronousOFF
mov rdx, r13
mov rcx, rbp
call fcn.180090010
mov edi, eax
test eax, eax
jne 0x180090840
lea r8, str.BEGIN_
mov rdx, r13
mov rcx, rbp
call fcn.180090010
mov edi, eax
test eax, eax
jne 0x180090840
mov rbx, qword [r12 + 8]
cmp byte [r12 + 0x11], al
je 0x180090405
inc dword [r12 + 0x14]
cmp byte [r12 + 0x12], al
jne 0x180090405
mov rcx, r12
call fcn.18002af30
cmp byte [r12 + 0x10], 2
mov qword [rsp + 0x48], rsi
je 0x180090608
movzx edx, word [rbx + 0x28]
test dl, 1
je 0x180090429
mov edi, 8
jmp 0x18009062e
cmp byte [rbx + 0x24], 2
je 0x180090479
test dl, 0x40
jne 0x180090479
mov rax, qword [rbx + 0x78]
test rax, rax
je 0x18009044e
nop dword [rax]
cmp qword [rax], r12
jne 0x180090474
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x180090440
cmp byte [r12 + 0x11], 0
mov rax, qword [r12 + 8]
je 0x1800904ba
cmp qword [rax + 0x80], r12
je 0x180090492
test byte [rax + 0x28], 0x20
je 0x180090492
mov edi, 0x106
jmp 0x18009062e
mov rax, qword [rax]
jmp 0x180090480
mov rax, qword [rbx + 0x80]
mov rcx, qword [rax]
test rcx, rcx
je 0x18009044e
mov edi, 0x106
jmp 0x18009062e
mov rax, qword [rax + 0x78]
test rax, rax
je 0x1800904ba
nop dword [rax + rax]
cmp qword [rax], r12
je 0x1800904b1
cmp dword [rax + 8], 1
jne 0x1800904b1
cmp byte [rax + 0xc], 1
jne 0x180090488
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x1800904a0
mov eax, 0xfff7
xor edi, edi
and dx, ax
mov word [rbx + 0x28], dx
cmp dword [rbx + 0x40], edi
jne 0x1800904d5
or dx, 8
mov word [rbx + 0x28], dx
cmp qword [rbx + 0x18], 0
jne 0x1800904ec
mov rcx, rbx
call fcn.18002dc30
mov edi, eax
test eax, eax
je 0x1800904d5
jmp 0x18009052d
test edi, edi
jne 0x18009052d
test byte [rbx + 0x28], 1
je 0x1800904fd
mov edi, 8
jmp 0x18009052d
mov rax, qword [r12]
mov rcx, qword [rbx]
xor r8d, r8d
cmp byte [rax + 0x54], 2
mov edx, 1
sete r8b
call fcn.1800268d0
mov edi, eax
test eax, eax
jne 0x18009052d
mov rcx, rbx
call fcn.18002df00
mov edi, eax
test eax, eax
je 0x18009054d
cmp byte [rbx + 0x24], 0
jne 0x18009054d
mov rcx, qword [rbx + 0x18]
test rcx, rcx
je 0x18009054d
mov qword [rbx + 0x18], 0
mov rcx, qword [rcx + 0x70]
call fcn.1800266e0
cmp dil, 5
jne 0x18009058e
cmp byte [rbx + 0x24], 0
jne 0x18009058e
mov rsi, qword [rbx + 8]
add rsi, 0x210
je 0x18009058e
mov rax, qword [rsi]
test rax, rax
je 0x18009058e
mov edx, dword [rsi + 0x10]
test edx, edx
js 0x18009058e
mov rcx, qword [rsi + 8]
call rax
test eax, eax
je 0x180090587
inc dword [rsi + 0x10]
jmp 0x1800904d5
mov dword [rsi + 0x10], 0xffffffff
test edi, edi
jne 0x18009062e
cmp byte [r12 + 0x10], dil
jne 0x1800905bf
inc dword [rbx + 0x3c]
cmp byte [r12 + 0x11], dil
je 0x1800905bf
mov byte [r12 + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [r12 + 0x40], rax
lea rax, [r12 + 0x30]
mov qword [rbx + 0x78], rax
mov byte [r12 + 0x10], 2
cmp byte [rbx + 0x24], 2
jae 0x1800905cf
mov byte [rbx + 0x24], 2
or word [rbx + 0x28], 0x20
mov rsi, qword [rbx + 0x18]
mov qword [rbx + 0x80], r12
mov rax, qword [rsi + 0x50]
mov ecx, dword [rax + 0x1c]
bswap ecx
cmp dword [rbx + 0x40], ecx
je 0x180090608
mov rcx, qword [rsi + 0x70]
call fcn.180026e80
mov edi, eax
test eax, eax
jne 0x18009062e
mov ecx, dword [rbx + 0x40]
mov rax, qword [rsi + 0x50]
bswap ecx
mov dword [rax + 0x1c], ecx
mov rax, qword [r12]
mov rcx, qword [rbx]
mov edx, dword [rax + 0x274]
cmp edx, dword [rcx + 0x80]
jle 0x18009062c
cmp byte [rcx + 0xa], 0
je 0x18009062c
call fcn.180027350
mov edi, eax
jmp 0x18009062e
xor edi, edi
cmp byte [r12 + 0x11], 0
je 0x180090645
dec dword [r12 + 0x14]
jne 0x180090645
mov rcx, r12
call fcn.18002af00
test edi, edi
jne 0x18009083b
mov rax, qword [r12 + 8]
mov rcx, qword [rax]
cmp byte [rcx + 9], 5
jne 0x18009065e
mov dword [rbp + 0x5c], edi
mov rax, qword [r12 + 8]
mov esi, dword [rsp + 0x78]
xor r9d, r9d
mov edx, dword [rax + 0x34]
mov r8d, esi
mov rcx, r15
call fcn.18002d900
test eax, eax
jne 0x180090836
cmp dword [rsp + 0x80], eax
jne 0x1800906a2
mov edx, dword [rbp + 0x5c]
xor r9d, r9d
mov r8d, esi
mov rcx, r15
call fcn.18002d900
test eax, eax
jne 0x180090836
cmp byte [rbp + 0x55], 0
jne 0x180090836
movzx eax, byte [rbp + 0x58]
test al, al
js 0x1800906b9
movsx eax, al
jmp 0x1800906c1
mov rcx, r12
call fcn.18002dbd0
mov edx, eax
mov rcx, r15
call fcn.18002db40
lea r8, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
mov edi, eax
test eax, eax
jne 0x18009083b
lea r8, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
mov edi, eax
test eax, eax
jne 0x18009083b
lea r8, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
mov edi, eax
test eax, eax
jne 0x18009083b
or dword [rbp + 0x2c], 0x8000000
lea r8, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
and dword [rbp + 0x2c], 0xf7ffffff
mov edi, eax
test eax, eax
jne 0x18009083b
lea r8, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
mov edi, eax
test eax, eax
jne 0x18009083b
lea r8, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov rdx, r13
mov rcx, rbp
call fcn.1800900c0
mov edi, eax
test eax, eax
jne 0x18009083b
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov rdx, r13
mov rcx, rbp
call fcn.180090010
mov edi, eax
test eax, eax
jne 0x18009083b
xor ebx, ebx
lea r13, [0x1802b7130]
nop word [rax + rax]
movzx edx, byte [rbx + r13]
lea r8, [rsp + 0x78]
mov rcx, r12
call fcn.180035b70
movzx r8d, byte [rbx + r13 + 1]
movzx edx, byte [rbx + r13]
add r8d, dword [rsp + 0x78]
mov rcx, r15
call fcn.180035c00
mov edi, eax
test eax, eax
jne 0x18009083b
add rbx, 2
cmp rbx, 0xa
jl 0x1800907b0
mov rdx, r15
mov rcx, r12
call fcn.1800389d0
mov edi, eax
test eax, eax
jne 0x18009083b
mov rcx, r15
call fcn.18002f140
mov edi, eax
test eax, eax
jne 0x18009083b
mov rcx, r15
call fcn.18002dbd0
mov rcx, r12
mov edx, eax
call fcn.18002db40
mov r11, qword [r15 + 8]
lea r9d, [rdi + 1]
mov edx, dword [r11 + 0x34]
mov r8d, esi
mov rcx, r12
call fcn.18002d900
mov edi, eax
jmp 0x18009083b
mov edi, 7
mov rsi, qword [rsp + 0x48]
mov r15, qword [rsp + 0x30]
mov eax, dword [rsp + 0x88]
or r8d, 0xffffffff
mov r9d, 1
mov dword [rbp + 0x2c], eax
mov eax, dword [rsp + 0x20]
or edx, r8d
mov dword [rbp + 0x64], eax
mov eax, dword [rsp + 0x24]
mov rcx, r12
mov dword [rbp + 0x68], eax
mov rax, qword [rsp + 0x28]
mov qword [rbp + 0xc8], rax
call fcn.18002d900
mov r12, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x70]
mov byte [rbp + 0x53], 1
test r14, r14
je 0x1800908aa
mov rcx, qword [r14 + 8]
call fcn.18002d5a0
mov qword [r14 + 8], 0
mov qword [r14 + 0x18], 0
mov rcx, rbp
call fcn.18005dfd0
mov eax, edi
mov rdi, qword [rsp + 0x40]
add rsp, 0x50
pop r14
pop r13
pop rbp
ret