Function at 0x502f20
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], 0
cmp byte [esi + 0x4f], 0
jne 0x502f7b
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x502f4b
push eax
push esi
call fcn.004eb970
add esp, 8
push 0
push 0x28
push esi
call fcn.004eb9e0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x502f6e
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [edi], esi
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x502fb3
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x502f97
push eax
push esi
call fcn.004eb970
add esp, 8
push 0
push 0x2b
push esi
call fcn.004eb9e0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x502f6e
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x502f65
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x50302f
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x586bb0], 3
je 0x503016
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x502fe3
push eax
push esi
call fcn.004eb970
add esp, 8
push 0
push 0x12
push esi
call fcn.004eb9e0
add esp, 0xc
test eax, eax
je 0x503009
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x58f2ec]
mov word [eax + 0x10], cx
mov dword [edi], eax
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push ecx
call fcn.004b3720
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x503034
mov edx, 0x599a67
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
push ebx
mov ebx, dword [esi + 0x24]
mov dword [ebp - 0x20], ecx
mov cl, byte [esi + 0x58]
mov edi, dword [esi + 0x64]
mov dword [ebp - 0x28], eax
or eax, 6
mov dword [ebp - 0x2c], ebx
and ebx, 0xfffffffe
mov dword [esi + 0x24], ebx
mov ebx, dword [ebp + 0x10]
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x18], eax
and ecx, 0xefffafff
mov eax, dword [esi + 0x10]
or ecx, 0x201
mov dword [esi + 0x20], ecx
shl ebx, 4
mov byte [esi + 0x58], 0
mov dword [ebp + 0x10], ebx
push edx
mov ecx, dword [eax + ebx]
mov ebx, dword [eax + ebx + 4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 8]
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [ebx + 4]
push ecx
mov dword [ebp - 0x30], edi
mov edi, dword [esi + 0x68]
mov eax, dword [eax]
push esi
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x10], ebx
mov al, byte [eax + 0xc]
mov byte [ebp + 0xf], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004cb030
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x5033a3
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 0x14], 0
mov dword [ebp - 0x24], eax
mov edi, dword [eax + 4]
mov dword [ebp - 8], edi
je 0x503164
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x503160
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x503117
cmp dword [ebp - 0x14], eax
jl 0x503160
jg 0x503117
cmp dword [ebp - 0x18], eax
jbe 0x503160
mov eax, dword [ebp + 8]
mov edi, 1
mov eax, dword [eax]
test eax, eax
je 0x50312f
push eax
push esi
call fcn.004eb970
add esp, 8
push 0
push 0x1b
push esi
call fcn.004eb9e0
add esp, 0xc
mov dword [ebp + 0xc], eax
test eax, eax
je 0x503156
push 0x1b
push str.output_file_already_exists
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x5033a3
or dword [esi + 0x18], 8
mov cl, byte [ebx + 9]
test cl, cl
je 0x503180
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x503180
push ebx
call fcn.004c3fd0
mov cl, byte [ebx + 9]
add esp, 4
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x14], edx
test cl, cl
je 0x50319f
add dword [ebx + 0xc], 0xffffffff
jne 0x50319f
push ebx
call fcn.005201b0
add esp, 4
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax + ecx + 0xc]
push dword [eax + 0x50]
push edi
call fcn.004e80f0
push 0
push ebx
call fcn.004e8320
push eax
push edi
call fcn.004e8320
push 0x21
push edi
call fcn.004e8250
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.004caf60
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x5033a3
cmp dword [ebp + 0x14], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push ebx
call fcn.004e5780
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x5033a3
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x503215
mov dword [esi + 0x5c], edi
mov ecx, dword [ebx + 4]
mov edi, dword [ebp - 8]
push 0
push dword [ebp - 0x14]
push dword [ecx + 0x20]
push edi
call fcn.004e8180
add esp, 0x10
test eax, eax
jne 0x503399
cmp byte [ebp + 0xf], al
jne 0x50324e
push eax
push dword [ebp - 0x14]
push dword [esi + 0x5c]
push edi
call fcn.004e8180
add esp, 0x10
test eax, eax
jne 0x503399
cmp byte [esi + 0x51], 0
jne 0x503399
mov al, byte [esi + 0x54]
test al, al
js 0x503264
movsx eax, al
jmp 0x50326d
push ebx
call fcn.004e6680
add esp, 4
push eax
push edi
call fcn.004e8070
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp + 8]
mov byte [esi + 0xa4], al
push esi
call fcn.004cb030
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x5033a3
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.004cb030
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5033a3
push dword [ebp - 0xc]
mov byte [esi + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push dword [ebp + 8]
push esi
call fcn.004cb030
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5033a3
push dword [ebp - 0xc]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp + 8]
push esi
call fcn.004cb030
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5033a3
xor ebx, ebx
lea eax, [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x586ca8]
push eax
push dword [ebp - 0x10]
call fcn.004e66f0
movzx eax, byte [ebx + 0x586ca9]
add eax, dword [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x586ca8]
push eax
push dword [ebp - 8]
call fcn.004e85c0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x5033a0
add ebx, 2
cmp ebx, 0xa
jl 0x503301
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x50335b
push dword [ebp - 8]
push ebx
call fcn.004e5f80
mov edi, eax
add esp, 8
test edi, edi
jne 0x5033a3
push dword [ebp - 8]
call fcn.004e5da0
mov edi, eax
add esp, 4
test edi, edi
jne 0x5033a3
cmp dword [ebp + 0x14], eax
jne 0x5033a3
mov edi, dword [ebp - 8]
push edi
call fcn.004e6680
push eax
push ebx
call fcn.004e8070
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x20]
push ebx
call fcn.004e8180
add esp, 0x1c
mov edi, eax
jmp 0x5033a3
mov edi, 7
jmp 0x5033a3
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x30]
push 1
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x34]
push 0xffffffffffffffff
mov dword [esi + 0x68], eax
mov al, byte [ebp - 1]
push 0xffffffffffffffff
push ebx
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.004e8180
mov ebx, dword [ebp - 0x24]
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x503401
push dword [ebx + 4]
call fcn.004e5b40
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.00501e60
add esp, 4
mov eax, edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret