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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
cmp byte [rdx + 0x5f], 0
mov rdi, rcx
mov r12, rdx
movsxd rbx, r8d
mov rsi, r9
je 0x6294e0
cmp dword [rdx + 0xc8], 1
jg 0x6294c0
mov ebp, dword [rdx + 0x4c]
test r9, r9
je 0x629500
movzx eax, word [r9 + 8]
lea rdx, [0x00829c40]
and eax, 0x3f
cmp byte [rdx + rax], 3
je 0x629198
lea r8, str.non_text_filename
mov rdx, r12
mov r13d, 1
call fcn.005945c0
mov eax, r13d
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r9
mov edx, 1
call fcn.005b99f0
mov r9, rax
mov eax, dword [r12 + 0x4c]
and eax, 0xfffffffe
or eax, 6
mov dword [r12 + 0x4c], eax
mov eax, dword [r12 + 0x2c]
mov edx, dword [r12 + 0x74]
shl rbx, 5
lea r8, str.ATTACH__Q_AS_vacuum_db
mov rcx, qword [r12 + 0x30]
mov r14d, dword [r12 + 0x28]
mov dword [rsp + 0x28], eax
or eax, 6
mov dword [r12 + 0x2c], eax
mov rax, qword [r12 + 0x20]
mov dword [rsp + 0x2c], edx
mov edx, dword [r12 + 0x78]
add rax, rbx
mov qword [rsp + 0x20], rcx
mov dword [rsp + 0x30], edx
movzx edx, byte [r12 + 0x68]
mov byte [r12 + 0x68], 0
mov r15, qword [rax + 8]
mov byte [rsp + 0x37], dl
movabs rdx, 0xfffffffeefffafff
and rdx, rcx
mov rcx, qword [rax]
mov rax, qword [r15 + 8]
mov dword [rsp + 0x48], r14d
or rdx, 0x201
mov rax, qword [rax]
mov qword [r12 + 0x30], rdx
mov rdx, rdi
mov qword [rsp + 0x40], rcx
mov rcx, r12
movzx eax, byte [rax + 0x10]
mov byte [rsp + 0x38], al
call fcn.00629090
mov dword [r12 + 0x4c], ebp
mov r13d, eax
test eax, eax
jne 0x6296c8
movsxd rbp, r14d
shl rbp, 5
add rbp, qword [r12 + 0x20]
mov r14, qword [rbp + 8]
test rsi, rsi
je 0x6292b7
mov rax, qword [r14 + 8]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov qword [rsp + 0x60], 0
mov rax, qword [rcx]
test rax, rax
je 0x6292b1
lea r8, [rsp + 0x60]
mov rdx, r8
call qword [rax + 0x30]
test eax, eax
jne 0x629728
cmp qword [rsp + 0x60], 0
jg 0x629728
or dword [r12 + 0x2c], 8
cmp byte [r15 + 0x11], 0
je 0x629748
mov rcx, r15
call fcn.005977c0
mov rax, qword [r15 + 8]
mov edx, dword [rax + 0x30]
sub edx, dword [rax + 0x34]
cmp byte [r15 + 0x11], 0
mov dword [rsp + 0x4c], edx
je 0x6292ea
sub dword [r15 + 0x14], 1
je 0x6297a0
mov rax, qword [r12 + 0x20]
mov rcx, r14
mov rax, qword [rax + rbx + 0x18]
mov edx, dword [rax + 0x74]
call fcn.00597cd0
xor edx, edx
mov rcx, r15
call fcn.00597d50
mov rcx, r14
mov edx, eax
call fcn.00597d50
mov edx, 0x21
mov rcx, r14
call fcn.00597e10
lea r8, str.BEGIN
mov rdx, rdi
mov rcx, r12
call fcn.00628f60
mov r13d, eax
test eax, eax
jne 0x629648
test rsi, rsi
mov eax, 2
mov rcx, r15
cmove r13d, eax
xor r8d, r8d
mov edx, r13d
call fcn.005d8d20
mov r13d, eax
test eax, eax
jne 0x629648
mov rax, qword [r15 + 8]
mov rdx, qword [rax]
cmp byte [rdx + 9], 5
je 0x629790
mov edx, dword [rax + 0x30]
mov r8d, dword [rsp + 0x4c]
xor r9d, r9d
mov rcx, r14
call fcn.005a1b80
test eax, eax
jne 0x629780
cmp byte [rsp + 0x38], 0
je 0x629760
cmp byte [r12 + 0x61], 0
jne 0x629780
movsx edx, byte [r12 + 0x64]
test dl, dl
js 0x6297ad
mov rcx, r14
call fcn.00597e60
movzx eax, byte [rsp + 0x48]
mov rdx, rdi
mov rcx, r12
mov rbx, qword [rsp + 0x40]
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov byte [r12 + 0xb4], al
mov r9, rbx
call fcn.00629090
mov r13d, eax
test eax, eax
jne 0x629648
mov r9, rbx
lea r8, str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
mov rdx, rdi
mov rcx, r12
call fcn.00629090
mov r13d, eax
test eax, eax
jne 0x629648
mov r9, rbx
lea r8, str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
mov rdx, rdi
mov rcx, r12
mov byte [r12 + 0xb4], 0
call fcn.00629090
and dword [r12 + 0x2c], 0xfffffffb
mov r13d, eax
test eax, eax
jne 0x629648
mov r9, rbx
lea r8, str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov rdx, rdi
mov rcx, r12
call fcn.00629090
mov r13d, eax
test eax, eax
jne 0x629648
lea rdi, [0x008286b8]
mov r13d, 1
lea rbx, [rsp + 0x5c]
mov edx, r13d
mov r8, rbx
mov rcx, r15
call fcn.00597f60
movzx r8d, byte [rdi + 1]
mov edx, r13d
mov rcx, r14
add r8d, dword [rsp + 0x5c]
call fcn.005d9670
mov r13d, eax
test eax, eax
jne 0x629648
add rdi, 2
lea rax, [0x008286c2]
cmp rax, rdi
je 0x6297bc
movzx r13d, byte [rdi]
jmp 0x62946e
lea r8, str.cannot_VACUUM___SQL_statements_in_progress
mov r13d, 1
call fcn.005945c0
jmp 0x62917c
lea r8, str.cannot_VACUUM_from_within_a_transaction
mov r13d, 1
call fcn.005945c0
jmp 0x62917c
lea r9, [0x0081f92e]
jmp 0x6291b8
cmp byte [r15 + 0x11], 0
je 0x62951b
mov rcx, r15
call fcn.005977c0
cmp byte [r14 + 0x11], 0
je 0x62952a
mov rcx, r14
call fcn.005977c0
mov rax, qword [r15 + 8]
lea r8, [rsp + 0x60]
mov rax, qword [rax]
mov rcx, qword [rax + 0x48]
mov r9, qword [rcx]
test r9, r9
je 0x62957f
mov rdx, qword [r14 + 8]
lea r8, [rsp + 0x60]
mov qword [rsp + 0x38], r8
mov eax, dword [rdx + 0x3c]
movsxd rdx, dword [rdx + 0x30]
and eax, 0x7fffffff
imul rax, rdx
mov edx, 0xb
mov qword [rsp + 0x60], rax
call qword [r9 + 0x50]
mov r8, qword [rsp + 0x38]
cmp eax, 0xc
mov r13d, eax
je 0x62957f
test eax, eax
jne 0x6295de
mov rdi, r8
xor eax, eax
mov ecx, 0x12
mov edx, 0x7fffffff
rep stosd dword [rdi], eax
mov rcx, r8
mov qword [rsp + 0x38], r8
mov rax, qword [r14]
mov qword [rsp + 0x88], r14
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x80], rax
mov dword [rsp + 0x78], 1
call fcn.005e18c0
mov r8, qword [rsp + 0x38]
mov rcx, r8
call fcn.005e4a90
mov r13d, eax
test eax, eax
jne 0x6297d5
mov rax, qword [r15 + 8]
and word [rax + 0x26], 0xfffd
cmp byte [r14 + 0x11], 0
je 0x6295f0
sub dword [r14 + 0x14], 1
je 0x629802
cmp byte [r15 + 0x11], 0
je 0x629602
sub dword [r15 + 0x14], 1
je 0x6297f5
test r13d, r13d
jne 0x629648
mov rcx, r14
call fcn.005e1850
mov r13d, eax
test eax, eax
jne 0x629648
mov rcx, r14
call fcn.00597ed0
mov rcx, r15
mov edx, eax
call fcn.00597e60
mov rax, qword [r14 + 8]
mov r8d, dword [rsp + 0x4c]
mov rcx, r15
mov r9d, 1
mov edx, dword [rax + 0x30]
call fcn.005a1b80
mov r13d, eax
nop dword [rax]
mov eax, dword [rsp + 0x28]
mov r9d, 1
mov r8d, 0xffffffff
mov rcx, r15
mov byte [r12 + 0xb4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov eax, dword [rsp + 0x2c]
mov dword [r12 + 0x74], eax
mov eax, dword [rsp + 0x30]
mov dword [r12 + 0x78], eax
movzx eax, byte [rsp + 0x37]
mov byte [r12 + 0x68], al
call fcn.005a1b80
mov byte [r12 + 0x5f], 1
mov rcx, qword [rbp + 8]
call fcn.005e4580
mov qword [rbp + 8], 0
mov qword [rbp + 0x18], 0
mov rcx, r12
call fcn.005a38b0
jmp 0x62917c
mov eax, dword [rsp + 0x28]
mov r9d, 1
mov r8d, 0xffffffff
mov rcx, r15
mov byte [r12 + 0xb4], 0
mov edx, 0xffffffff
mov dword [r12 + 0x2c], eax
mov rax, qword [rsp + 0x20]
mov qword [r12 + 0x30], rax
mov eax, dword [rsp + 0x2c]
mov dword [r12 + 0x74], eax
mov eax, dword [rsp + 0x30]
mov dword [r12 + 0x78], eax
movzx eax, byte [rsp + 0x37]
mov byte [r12 + 0x68], al
call fcn.005a1b80
mov byte [r12 + 0x5f], 1
jmp 0x6296b8
lea r8, str.output_file_already_exists
mov rdx, r12
mov rcx, rdi
mov r13d, 1
call fcn.005945c0
jmp 0x629648
mov rax, qword [r15 + 8]
mov edx, dword [rax + 0x30]
sub edx, dword [rax + 0x34]
mov dword [rsp + 0x4c], edx
jmp 0x6292ea
mov edx, dword [r12 + 0x6c]
mov r8d, dword [rsp + 0x4c]
xor r9d, r9d
mov rcx, r14
call fcn.005a1b80
test eax, eax
je 0x629399
nop dword [rax]
mov r13d, 7
jmp 0x629648
mov dword [r12 + 0x6c], 0
jmp 0x629373
mov rcx, r15
call fcn.00597850
jmp 0x6292ea
mov rcx, r15
call fcn.00597ed0
mov edx, eax
jmp 0x6293b3
test rsi, rsi
je 0x62950c
mov rcx, r14
call fcn.005e1850
mov r13d, eax
jmp 0x629648
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 8]
mov rcx, qword [rax]
cmp byte [rcx + 0x10], 0
jne 0x6295de
call fcn.0059dbf0
jmp 0x6295de
mov rcx, r15
call fcn.00597850
jmp 0x629602
mov rcx, r14
call fcn.00597850
jmp 0x6295f0