Function at 0x525790
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 0x5257e9
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x5257bc
push eax
push esi
call fcn.0050c2a0
add esp, 8
push 0
push 0x28
push esi
call fcn.0050c3b0
add esp, 0xc
test eax, eax
je 0x5257db
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 0x525835
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x525805
push eax
push esi
call fcn.0050c2a0
add esp, 8
push 0
push 0x2b
push esi
call fcn.0050c3b0
add esp, 0xc
test eax, eax
je 0x525827
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 0x52590b
movzx ecx, word [edx + 8]
mov eax, ecx
and eax, 0x3f
cmp byte [eax + 0x58cb18], 3
je 0x5258b8
mov edi, dword [ebp + 8]
mov eax, dword [edi]
test eax, eax
je 0x52586b
push eax
push esi
call fcn.0050c2a0
add esp, 8
push 0
push 0x12
push esi
call fcn.0050c3b0
mov edx, eax
add esp, 0xc
test edx, edx
je 0x5258aa
mov ecx, dword [str.non_text_filename]
mov dword [edx], ecx
mov ecx, dword [0x5951d0]
mov dword [edx + 4], ecx
mov ecx, dword [0x5951d4]
mov dword [edx + 8], ecx
mov eax, dword [0x5951d8]
mov dword [edx + 0xc], eax
mov ax, word [0x5951dc]
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 0x5258dc
cmp byte [edx + 0xa], 1
jne 0x5258dc
mov edx, dword [edx + 0x10]
mov eax, ebx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525910
test cl, 1
je 0x5258f0
mov eax, ebx
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525910
push 1
push edx
call fcn.005476f0
mov edx, eax
add esp, 8
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x525910
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.004e6b20
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x525e02
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 0x525a47
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 0x525a43
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x5259f4
cmp dword [ebp - 0x14], eax
jl 0x525a43
jg 0x5259f4
cmp dword [ebp - 0x18], eax
jbe 0x525a43
mov eax, dword [ebp + 8]
mov edi, 1
mov dword [ebp - 0x1c], edi
mov eax, dword [eax]
test eax, eax
je 0x525a0f
push eax
push esi
call fcn.0050c2a0
add esp, 8
push 0
push 0x1b
push esi
call fcn.0050c3b0
mov edx, eax
add esp, 0xc
test edx, edx
je 0x525a39
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 0x525e02
or dword [esi + 0x18], 8
push ebx
call fcn.005062f0
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.00508180
push 0
push ebx
call fcn.005083b0
push eax
push edi
call fcn.005083b0
push 0x21
push edi
call fcn.005082e0
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.004e6930
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x525e02
cmp dword [ebp + 0x14], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push ebx
call fcn.005053a0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525e02
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x525ac6
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.00508210
add esp, 0x10
test eax, eax
jne 0x525dfd
cmp byte [ebp - 1], al
jne 0x525aff
push eax
push dword [ebp - 0x14]
push dword [esi + 0x5c]
push edi
call fcn.00508210
add esp, 0x10
test eax, eax
jne 0x525dfd
cmp byte [esi + 0x51], 0
jne 0x525dfd
mov al, byte [esi + 0x54]
test al, al
js 0x525b15
movsx eax, al
jmp 0x525b1e
push ebx
call fcn.00506240
add esp, 4
push eax
push edi
call fcn.00508100
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.004e6b20
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x525e02
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.004e6b20
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e02
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.004e6b20
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e02
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.004e6b20
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x525e02
mov dword [ebp + 0xc], eax
mov cl, byte [ebx + 9]
movzx edi, byte [eax + 0x58cc10]
mov eax, dword [ebx + 4]
mov dword [ebp - 0x1c], eax
test cl, cl
je 0x525bdf
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x525bdf
push ebx
call fcn.004df280
mov cl, byte [ebx + 9]
add esp, 4
mov eax, dword [ebp - 0x1c]
cmp edi, 0xf
jne 0x525bee
mov eax, dword [eax]
mov edi, dword [eax + 0x64]
add edi, dword [ebx + 0x14]
jmp 0x525bfa
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov edi, dword [eax + edi*4 + 0x24]
bswap edi
test cl, cl
je 0x525c0d
add dword [ebx + 0xc], 0xffffffff
jne 0x525c0d
push ebx
call fcn.00546470
add esp, 4
mov ecx, dword [ebp + 0xc]
movzx eax, byte [ecx + 0x58cc11]
add eax, edi
push eax
movzx eax, byte [ecx + 0x58cc10]
push eax
push dword [ebp - 8]
call fcn.005085e0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525e02
mov eax, dword [ebp + 0xc]
add eax, 2
mov dword [ebp + 0xc], eax
cmp eax, 0xa
jl 0x525bb3
cmp dword [ebp + 0x14], edi
jne 0x525dbf
cmp byte [ebx + 9], 0
je 0x525c6a
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x525c6a
push ebx
call fcn.004df280
add esp, 4
mov edi, dword [ebp - 8]
cmp byte [edi + 9], 0
je 0x525c85
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x525c85
push edi
call fcn.004df280
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 0x525ce0
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.0048cab0
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 0x525d8e
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.004d7000
lea eax, [ebp - 0x64]
push eax
call fcn.004d79c0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x525d58
mov eax, dword [ebx + 4]
mov ecx, 0xfffd
and word [eax + 0x18], cx
jmp 0x525d8e
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov ecx, dword [eax]
cmp byte [ecx + 0xc], 0
jne 0x525d8e
inc dword [ecx + 0x64]
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x525d7e
mov dword [eax + 0x10], 1
mov eax, dword [eax + 0x2c]
test eax, eax
jne 0x525d70
push 0
push dword [ecx + 0xd4]
call fcn.00520070
add esp, 8
mov eax, dword [ebp - 8]
cmp byte [eax + 9], 0
je 0x525da6
add dword [eax + 0xc], 0xffffffff
jne 0x525da6
push eax
call fcn.00546470
add esp, 4
cmp byte [ebx + 9], 0
je 0x525dbb
add dword [ebx + 0xc], 0xffffffff
jne 0x525dbb
push ebx
call fcn.00546470
add esp, 4
test edi, edi
jne 0x525e02
push dword [ebp - 8]
call fcn.00505bd0
mov edi, eax
add esp, 4
test edi, edi
jne 0x525e02
cmp dword [ebp + 0x14], eax
jne 0x525e02
mov edi, dword [ebp - 8]
push edi
call fcn.00506240
push eax
push ebx
call fcn.00508100
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x24]
push ebx
call fcn.00508210
add esp, 0x1c
mov edi, eax
jmp 0x525e02
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.00508210
mov ebx, dword [ebp - 0x24]
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x525e60
push dword [ebx + 4]
call fcn.005057e0
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.005244c0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret