Function at 0x5257e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x24], 0
cmp byte [esi + 0x4f], 0
jne 0x525839
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x52580c
push eax
push esi
call fcn.0050c300
add esp, 8
push 0
push 0x28
push esi
call fcn.0050c410
add esp, 0xc
test eax, eax
je 0x52582b
mov ecx, 0xa
mov esi, str.cannot_VACUUM_from_within_a_transaction
mov edi, eax
rep movsd dword es:[edi], dword [esi]
pop edi
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x525885
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x525855
push eax
push esi
call fcn.0050c300
add esp, 8
push 0
push 0x2b
push esi
call fcn.0050c410
add esp, 0xc
test eax, eax
je 0x525877
mov ecx, 0xa
mov esi, str.cannot_VACUUM___SQL_statements_in_progress
mov edi, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
pop edi
mov dword [ebx], eax
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x14]
mov ebx, dword [esi + 0x3c]
mov dword [ebp - 0x14], ebx
test edx, edx
je 0x52595b
movzx ecx, word [edx + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x58cc88], 3
je 0x525908
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x5258bb
push eax
push esi
call fcn.0050c300
add esp, 8
push 0
push 0x12
push esi
call fcn.0050c410
mov edx, eax
add esp, 0xc
test edx, edx
je 0x5258fa
mov ecx, dword [str.non_text_filename]
mov dword [edx], ecx
mov ecx, dword [0x595340]
mov dword [edx + 4], ecx
mov ecx, dword [0x595344]
mov dword [edx + 8], ecx
mov eax, dword [0x595348]
mov dword [edx + 0xc], eax
mov ax, word [0x59534c]
mov word [edx + 0x10], ax
mov dword [edi], edx
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, ecx
and eax, 0x202
cmp eax, 0x202
jne 0x52592c
cmp byte [edx + 0xa], 1
jne 0x52592c
mov edx, dword [edx + 0x10]
mov eax, ebx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525960
test cl, 1
je 0x525940
mov eax, ebx
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525960
push 1
push edx
call fcn.00547760
mov edx, eax
add esp, 8
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525960
mov edx, 0x56beb0
mov ecx, dword [esi + 0x20]
mov ebx, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov edi, dword [esi + 0x64]
mov dword [ebp - 0x20], ecx
mov cl, byte [esi + 0x58]
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 dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov byte [ebp - 2], cl
mov ecx, dword [ebp - 0x20]
and ecx, 0xefffafff
shl ebx, 4
mov byte [esi + 0x58], 0
or ecx, 0x201
mov dword [esi + 0x20], ecx
mov dword [ebp + 0x10], ebx
mov ecx, dword [ebx + eax]
mov ebx, dword [ebx + eax + 4]
push edx
push str.ATTACH__Q_AS_vacuum_db
push dword [ebp + 8]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x30], edi
mov edi, dword [esi + 0x68]
push esi
mov eax, dword [eax]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0xc], ecx
mov al, byte [eax + 0xc]
mov byte [ebp - 1], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.004e6b80
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x525e52
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 0x525a97
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov ecx, dword [eax]
test ecx, ecx
je 0x525a93
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x525a44
cmp dword [ebp - 0x14], eax
jl 0x525a93
jg 0x525a44
cmp dword [ebp - 0x18], eax
jbe 0x525a93
mov eax, dword [ebp + 8]
mov edi, 1
mov dword [ebp - 0x1c], edi
mov eax, dword [eax]
test eax, eax
je 0x525a5f
push eax
push esi
call fcn.0050c300
add esp, 8
push 0
push 0x1b
push esi
call fcn.0050c410
mov edx, eax
add esp, 0xc
test edx, edx
je 0x525a89
mov ecx, 6
mov esi, str.output_file_already_exists
mov edi, edx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov dword [eax], edx
jmp 0x525e52
or dword [esi + 0x18], 8
push ebx
call fcn.00506360
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], eax
mov ecx, dword [edx + ecx + 0xc]
push dword [ecx + 0x50]
push edi
call fcn.005081f0
push 0
push ebx
call fcn.00508420
push eax
push edi
call fcn.00508420
push 0x21
push edi
call fcn.00508350
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.004e6990
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x525e52
cmp dword [ebp + 0x14], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push ebx
call fcn.00505410
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525e52
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x525b16
mov dword [esi + 0x5c], edi
mov ecx, dword [ebx + 4]
mov edi, dword [ebp - 8]
push 0
push dword [ebp - 0x14]
push dword [ecx + 0x24]
push edi
call fcn.00508280
add esp, 0x10
test eax, eax
jne 0x525e4d
cmp byte [ebp - 1], al
jne 0x525b4f
push eax
push dword [ebp - 0x14]
push dword [esi + 0x5c]
push edi
call fcn.00508280
add esp, 0x10
test eax, eax
jne 0x525e4d
cmp byte [esi + 0x51], 0
jne 0x525e4d
mov al, byte [esi + 0x54]
test al, al
js 0x525b65
movsx eax, al
jmp 0x525b6e
push ebx
call fcn.005062b0
add esp, 4
push eax
push edi
call fcn.00508170
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.004e6b80
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x525e52
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.004e6b80
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e52
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.004e6b80
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e52
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.004e6b80
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e52
mov dword [ebp + 0xc], eax
mov cl, byte [ebx + 9]
movzx edi, byte [eax + 0x58cd80]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x525c2f
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x525c2f
push ebx
call fcn.004df2d0
mov cl, byte [ebx + 9]
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp edi, 0xf
jne 0x525c3e
mov eax, dword [eax]
mov edi, dword [eax + 0x64]
add edi, dword [ebx + 0x14]
jmp 0x525c4a
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov edi, dword [eax + edi*4 + 0x24]
bswap edi
test cl, cl
je 0x525c5d
add dword [ebx + 0xc], 0xffffffff
jne 0x525c5d
push ebx
call fcn.005464e0
add esp, 4
mov ecx, dword [ebp + 0xc]
movzx eax, byte [ecx + 0x58cd81]
add eax, edi
push eax
movzx eax, byte [ecx + 0x58cd80]
push eax
push dword [ebp - 8]
call fcn.00508650
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525e52
mov eax, dword [ebp + 0xc]
add eax, 2
mov dword [ebp + 0xc], eax
cmp eax, 0xa
jl 0x525c03
cmp dword [ebp + 0x14], edi
jne 0x525e0f
cmp byte [ebx + 9], 0
je 0x525cba
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x525cba
push ebx
call fcn.004df2d0
add esp, 4
mov edi, dword [ebp - 8]
cmp byte [edi + 9], 0
je 0x525cd5
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x525cd5
push edi
call fcn.004df2d0
add esp, 4
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [ebp + 0xc], eax
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x525d30
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x24]
and ecx, 0x7fffffff
cdq
push edx
push eax
push 0
push ecx
call fcn.0048cb10
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x1c]
push 0xb
push dword [ebp + 0xc]
mov dword [ebp - 0xc], edx
mov eax, dword [eax + 0x28]
call eax
xor edi, edi
add esp, 0xc
cmp eax, 0xc
cmovne edi, eax
test edi, edi
jne 0x525dde
mov edi, dword [ebp - 8]
mov eax, dword [edi]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x64]
push 0x7fffffff
push eax
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x54], 1
call fcn.004d7050
lea eax, [ebp - 0x64]
push eax
call fcn.004d7a10
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525da8
mov eax, dword [ebx + 4]
mov ecx, 0xfffd
and word [eax + 0x18], cx
jmp 0x525dde
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xc], 0
jne 0x525dde
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x525dce
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x525dc0
push 0
push dword [ecx + 0xd4]
call fcn.005200c0
add esp, 8
mov eax, dword [ebp - 8]
cmp byte [eax + 9], 0
je 0x525df6
add dword [eax + 0xc], 0xffffffff
jne 0x525df6
push eax
call fcn.005464e0
add esp, 4
cmp byte [ebx + 9], 0
je 0x525e0b
add dword [ebx + 0xc], 0xffffffff
jne 0x525e0b
push ebx
call fcn.005464e0
add esp, 4
test edi, edi
jne 0x525e52
push dword [ebp - 8]
call fcn.00505c40
mov edi, eax
add esp, 4
test edi, edi
jne 0x525e52
cmp dword [ebp + 0x14], eax
jne 0x525e52
mov edi, dword [ebp - 8]
push edi
call fcn.005062b0
push eax
push ebx
call fcn.00508170
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x24]
push ebx
call fcn.00508280
add esp, 0x1c
mov edi, eax
jmp 0x525e52
mov edi, 7
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 0
mov dword [esi + 0x68], eax
mov al, byte [ebp - 2]
push 0xffffffffffffffff
push ebx
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.00508280
mov ebx, dword [ebp - 0x24]
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x525eb0
push dword [ebx + 4]
call fcn.00505850
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.00524510
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret