Function at 0x5003c0
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 0x50041b
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x5003eb
push eax
push esi
call fcn.004e8e10
add esp, 8
push 0
push 0x28
push esi
call fcn.004e8e80
mov esi, eax
add esp, 0xc
test esi, esi
je 0x50040e
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 0x500453
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x500437
push eax
push esi
call fcn.004e8e10
add esp, 8
push 0
push 0x2b
push esi
call fcn.004e8e80
mov esi, eax
add esp, 0xc
test esi, esi
je 0x50040e
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x500405
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x5004cf
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x583af0], 3
je 0x5004b6
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x500483
push eax
push esi
call fcn.004e8e10
add esp, 8
push 0
push 0x12
push esi
call fcn.004e8e80
add esp, 0xc
test eax, eax
je 0x5004a9
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x58c22c]
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.004b0bf0
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x5004d4
mov edx, 0x5969a7
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.004c84f0
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x500843
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 0x500604
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 0x500600
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x5005b7
cmp dword [ebp - 0x14], eax
jl 0x500600
jg 0x5005b7
cmp dword [ebp - 0x18], eax
jbe 0x500600
mov eax, dword [ebp + 8]
mov edi, 1
mov eax, dword [eax]
test eax, eax
je 0x5005cf
push eax
push esi
call fcn.004e8e10
add esp, 8
push 0
push 0x1b
push esi
call fcn.004e8e80
add esp, 0xc
mov dword [ebp + 0xc], eax
test eax, eax
je 0x5005f6
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 0x500843
or dword [esi + 0x18], 8
mov cl, byte [ebx + 9]
test cl, cl
je 0x500620
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x500620
push ebx
call fcn.004c1490
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 0x50063f
add dword [ebx + 0xc], 0xffffffff
jne 0x50063f
push ebx
call fcn.0051d640
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.004e5590
push 0
push ebx
call fcn.004e57c0
push eax
push edi
call fcn.004e57c0
push 0x21
push edi
call fcn.004e56f0
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.004c8420
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x500843
cmp dword [ebp + 0x14], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push ebx
call fcn.004e2c10
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x500843
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x5006b5
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.004e5620
add esp, 0x10
test eax, eax
jne 0x500839
cmp byte [ebp + 0xf], al
jne 0x5006ee
push eax
push dword [ebp - 0x14]
push dword [esi + 0x5c]
push edi
call fcn.004e5620
add esp, 0x10
test eax, eax
jne 0x500839
cmp byte [esi + 0x51], 0
jne 0x500839
mov al, byte [esi + 0x54]
test al, al
js 0x500704
movsx eax, al
jmp 0x50070d
push ebx
call fcn.004e3b10
add esp, 4
push eax
push edi
call fcn.004e5510
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.004c84f0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x500843
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.004c84f0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x500843
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.004c84f0
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x500843
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.004c84f0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x500843
xor ebx, ebx
lea eax, [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x583be8]
push eax
push dword [ebp - 0x10]
call fcn.004e3b80
movzx eax, byte [ebx + 0x583be9]
add eax, dword [ebp + 0xc]
push eax
movzx eax, byte [ebx + 0x583be8]
push eax
push dword [ebp - 8]
call fcn.004e5a60
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x500840
add ebx, 2
cmp ebx, 0xa
jl 0x5007a1
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x5007fb
push dword [ebp - 8]
push ebx
call fcn.004e3410
mov edi, eax
add esp, 8
test edi, edi
jne 0x500843
push dword [ebp - 8]
call fcn.004e3230
mov edi, eax
add esp, 4
test edi, edi
jne 0x500843
cmp dword [ebp + 0x14], eax
jne 0x500843
mov edi, dword [ebp - 8]
push edi
call fcn.004e3b10
push eax
push ebx
call fcn.004e5510
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x20]
push ebx
call fcn.004e5620
add esp, 0x1c
mov edi, eax
jmp 0x500843
mov edi, 7
jmp 0x500843
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.004e5620
mov ebx, dword [ebp - 0x24]
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x5008a1
push dword [ebx + 4]
call fcn.004e2fd0
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.004ff300
add esp, 4
mov eax, edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret