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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x54]
xor ebp, ebp
cmp byte [edi + 0x55], 0
jne 0x5c7b5a
push ebp
push 0x28
push edi
call fcn.005a9460
mov esi, eax
add esp, 0xc
test esi, esi
je 0x5c7b37
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x6919ac]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x6919bc]
movq qword [esi + 0x20], xmm0
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x5c7b4b
push eax
push edi
call fcn.005a9350
add esp, 8
pop edi
mov dword [ebx], esi
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
cmp dword [edi + 0xbc], 1
jle 0x5c7bcd
push 0
push 0x2b
push edi
call fcn.005a9460
mov esi, eax
add esp, 0xc
test esi, esi
je 0x5c7baa
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x6919d4]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x6919e4]
movq qword [esi + 0x20], xmm0
mov ax, word [0x6919ec]
mov word [esi + 0x28], ax
mov al, byte [0x6919ee]
mov byte [esi + 0x2a], al
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x5c7b4b
push eax
push edi
call fcn.005a9350
add esp, 8
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, dword [esp + 0x5c]
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x1c], eax
test ecx, ecx
je 0x5c7c96
movzx edx, word [ecx + 0x10]
mov eax, edx
and eax, 0x3f
cmp byte [eax + 0x68a830], 3
je 0x5c7c41
push 0
push 0x12
push edi
call fcn.005a9460
mov esi, eax
add esp, 0xc
test esi, esi
je 0x5c7c1a
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x691a00]
mov word [esi + 0x10], cx
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x5c7b4b
push eax
push edi
call fcn.005a9350
add esp, 8
mov dword [ebx], esi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, edx
and eax, 0x202
cmp eax, 0x202
jne 0x5c7c66
cmp byte [ecx + 0x12], 1
jne 0x5c7c66
mov edx, dword [ecx + 8]
mov ecx, dword [edi + 0x3c]
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x5c7c9b
test dl, 1
je 0x5c7c7b
mov ecx, dword [edi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x5c7c9b
push 1
push ecx
call fcn.005edbf0
mov ecx, dword [edi + 0x3c]
add esp, 8
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x5c7c9b
mov edx, 0x6a4e12
mov ecx, dword [edi + 0x20]
mov ebx, dword [edi + 0x24]
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x68]
mov dword [esp + 0x38], ecx
and ecx, 0xefffafff
or ecx, 0x201
mov dword [esp + 0x28], ebx
mov bl, byte [edi + 0x5e]
mov dword [edi + 0x20], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x34], eax
or eax, 6
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x3c], esi
mov esi, dword [edi + 0x6c]
mov byte [esp + 0x54], bl
mov ebx, dword [esp + 0x28]
shl ecx, 4
and ebx, 0xfffffffe
mov dword [esp + 0x40], esi
mov esi, dword [edi + 0x70]
mov dword [edi + 0x24], ebx
mov byte [edi + 0x5e], 0
mov ebx, dword [ecx + eax]
mov dword [esp + 0x44], esi
mov esi, dword [edi + 0x74]
mov dword [esp + 0x48], esi
mov esi, dword [ecx + eax + 4]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ebx
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x5c7d24
cmp byte [eax + 0x10], 0
mov dword [esp + 0x20], ebp
je 0x5c7d2c
mov dword [esp + 0x20], 1
mov eax, dword [edi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push dword [esp + 0x58]
mov dword [esp + 0x30], eax
push edi
call fcn.00576000
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x5c809c
mov eax, dword [esp + 0x24]
shl eax, 4
add eax, dword [edi + 0x10]
mov dword [esp + 0x10], eax
mov ebp, dword [eax + 4]
mov dword [esp + 0x1c], ebp
cmp dword [esp + 0x5c], ebx
je 0x5c7e36
mov eax, dword [ebp + 4]
xorps xmm0, xmm0
mov ebx, dword [esp + 0x18]
mov ecx, ebx
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [esp + 0x2c], xmm0
mov edx, dword [eax]
test edx, edx
je 0x5c7dba
lea ecx, [esp + 0x2c]
push ecx
push eax
mov eax, dword [edx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x5c7dd4
cmp dword [esp + 0x30], eax
jg 0x5c7dd4
jl 0x5c7db3
cmp dword [esp + 0x2c], eax
ja 0x5c7dd4
mov ecx, dword [esp + 0x58]
shl ecx, 4
mov eax, dword [edi + 0x10]
or dword [edi + 0x18], 8
mov dword [esp + 0x18], ecx
movzx ebx, byte [ebx + eax + 8]
mov eax, dword [edi + 0x20]
and eax, 0x38
or ebx, eax
jmp 0x5c7e3b
push 0
push 0x1b
push edi
mov ebx, 1
call fcn.005a9460
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x5c7e17
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [ebp], xmm0
movq xmm0, qword [0x691a2c]
movq qword [ebp + 0x10], xmm0
mov cx, word [0x691a34]
mov word [ebp + 0x18], cx
mov al, byte [0x691a36]
mov byte [ebp + 0x1a], al
mov eax, dword [esp + 0x50]
mov ecx, dword [eax]
test ecx, ecx
je 0x5c7e2f
push ecx
push edi
call fcn.005a9350
mov eax, dword [esp + 0x58]
add esp, 8
mov dword [eax], ebp
jmp 0x5c8098
mov ebx, 1
push esi
call fcn.005a2100
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [ecx + eax + 0xc]
push dword [ecx + 0x50]
push ebp
call fcn.005a3f20
push 0
push esi
call fcn.005a40f0
push eax
push ebp
call fcn.005a40f0
or ebx, 0x20
push ebx
push ebp
call fcn.005a40a0
push str.BEGIN
push dword [esp + 0x78]
push edi
call fcn.00575e20
mov ebx, eax
add esp, 0x30
test ebx, ebx
jne 0x5c8098
cmp dword [esp + 0x5c], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push esi
call fcn.005a10e0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x5c8098
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x5c7ec3
cmp dword [esp + 0x5c], ebx
jne 0x5c7ec3
mov dword [edi + 0x64], ebx
mov eax, dword [esi + 4]
mov ebx, dword [esp + 0x2c]
push 0
push ebx
push dword [eax + 0x24]
push ebp
call fcn.005a3fc0
add esp, 0x10
test eax, eax
jne 0x5c8093
cmp dword [esp + 0x20], eax
jne 0x5c7efd
push eax
push ebx
push dword [edi + 0x64]
push ebp
call fcn.005a3fc0
add esp, 0x10
test eax, eax
jne 0x5c8093
cmp byte [edi + 0x57], 0
jne 0x5c8093
mov al, byte [edi + 0x5a]
test al, al
js 0x5c7f13
movsx eax, al
jmp 0x5c7f1c
push esi
call fcn.005a2050
add esp, 4
push eax
push ebp
call fcn.005a3ea0
push dword [esp + 0x1c]
mov ebp, dword [esp + 0x5c]
mov eax, dword [esp + 0x30]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebp
push edi
mov byte [edi + 0xb0], al
call fcn.00576000
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x5c8098
push dword [esp + 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebp
push edi
call fcn.00576000
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x5c8098
push dword [esp + 0x14]
mov byte [edi + 0xb0], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
push ebp
push edi
call fcn.00576000
and dword [edi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x5c8098
push dword [esp + 0x14]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebp
push edi
call fcn.00576000
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x5c8098
xor ebp, ebp
cmp byte [esi + 9], 0
mov eax, dword [esi + 4]
movzx ebx, byte [ebp + 0x689f94]
mov dword [esp + 0x2c], eax
je 0x5c7fdb
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x5c7fdb
push esi
call fcn.0056d650
mov eax, dword [esp + 0x30]
add esp, 4
cmp ebx, 0xf
jne 0x5c7fea
mov eax, dword [eax]
mov ebx, dword [eax + 0x6c]
add ebx, dword [esi + 0x14]
jmp 0x5c7ff6
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + ebx*4 + 0x24]
bswap ebx
cmp byte [esi + 9], 0
je 0x5c800b
add dword [esi + 0xc], 0xffffffff
jne 0x5c800b
push esi
call fcn.005eb510
add esp, 4
movzx eax, byte [ebp + 0x689f95]
add eax, ebx
push eax
movzx eax, byte [ebp + 0x689f94]
push eax
push dword [esp + 0x24]
call fcn.005a49f0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x5c8098
add ebp, 2
cmp ebp, 0xa
jl 0x5c7fb1
mov ebp, dword [esp + 0x1c]
cmp dword [esp + 0x5c], eax
jne 0x5c8055
push ebp
push esi
call fcn.005a1830
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x5c8098
push ebp
call fcn.005a1660
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5c8098
cmp dword [esp + 0x5c], eax
jne 0x5c8098
push ebp
call fcn.005a2050
push eax
push esi
call fcn.005a3ea0
push ebp
call fcn.005a2100
mov ecx, dword [ebp + 4]
push 1
push eax
push dword [ecx + 0x24]
push esi
call fcn.005a3fc0
add esp, 0x20
mov ebx, eax
jmp 0x5c8098
mov ebx, 7
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x34]
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x28]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x68], eax
mov eax, dword [esp + 0x40]
mov dword [edi + 0x6c], eax
mov eax, dword [esp + 0x44]
push 1
mov dword [edi + 0x70], eax
mov eax, dword [esp + 0x4c]
push 0
mov dword [edi + 0x74], eax
mov al, byte [esp + 0x5c]
push 0xffffffffffffffff
push esi
mov byte [edi + 0xb0], 0
mov byte [edi + 0x5e], al
call fcn.005a3fc0
add esp, 0x10
mov byte [edi + 0x55], 1
test ebp, ebp
je 0x5c810b
push dword [ebp + 4]
call fcn.005a1270
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push edi
call fcn.005c68d0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret