Function at 0x4cd0f0
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 0x4cd15a
push ebp
push 0x28
push edi
call fcn.004aebd0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4cd137
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x68c144]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x68c154]
movq qword [esi + 0x20], xmm0
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x4cd14b
push eax
push edi
call fcn.004aeac0
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 0x4cd1cd
push 0
push 0x2b
push edi
call fcn.004aebd0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4cd1aa
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [esi], xmm0
movups xmm0, xmmword [0x68c16c]
movups xmmword [esi + 0x10], xmm0
movq xmm0, qword [0x68c17c]
movq qword [esi + 0x20], xmm0
mov ax, word [0x68c184]
mov word [esi + 0x28], ax
mov al, byte [0x68c186]
mov byte [esi + 0x2a], al
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x4cd14b
push eax
push edi
call fcn.004aeac0
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 0x4cd296
movzx edx, word [ecx + 0x10]
mov eax, edx
and eax, 0x3f
cmp byte [eax + 0x684f80], 3
je 0x4cd241
push 0
push 0x12
push edi
call fcn.004aebd0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4cd21a
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [esi], xmm0
mov cx, word [0x68c198]
mov word [esi + 0x10], cx
mov ebx, dword [esp + 0x50]
mov eax, dword [ebx]
test eax, eax
je 0x4cd14b
push eax
push edi
call fcn.004aeac0
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 0x4cd266
cmp byte [ecx + 0x12], 1
jne 0x4cd266
mov edx, dword [ecx + 8]
mov ecx, dword [edi + 0x3c]
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4cd29b
test dl, 1
je 0x4cd27b
mov ecx, dword [edi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4cd29b
push 1
push ecx
call fcn.004f2fd0
mov ecx, dword [edi + 0x3c]
add esp, 8
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4cd29b
mov edx, 0x70ce08
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 0x4cd324
cmp byte [eax + 0x10], 0
mov dword [esp + 0x20], ebp
je 0x4cd32c
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.0047b6a0
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x3c], eax
test ebx, ebx
jne 0x4cd69c
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 0x4cd436
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 0x4cd3ba
lea ecx, [esp + 0x2c]
push ecx
push eax
mov eax, dword [edx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4cd3d4
cmp dword [esp + 0x30], eax
jg 0x4cd3d4
jl 0x4cd3b3
cmp dword [esp + 0x2c], eax
ja 0x4cd3d4
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 0x4cd43b
push 0
push 0x1b
push edi
mov ebx, 1
call fcn.004aebd0
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x4cd417
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [ebp], xmm0
movq xmm0, qword [0x68c1c4]
movq qword [ebp + 0x10], xmm0
mov cx, word [0x68c1cc]
mov word [ebp + 0x18], cx
mov al, byte [0x68c1ce]
mov byte [ebp + 0x1a], al
mov eax, dword [esp + 0x50]
mov ecx, dword [eax]
test ecx, ecx
je 0x4cd42f
push ecx
push edi
call fcn.004aeac0
mov eax, dword [esp + 0x58]
add esp, 8
mov dword [eax], ebp
jmp 0x4cd698
mov ebx, 1
push esi
call fcn.004a7790
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.004a95a0
push 0
push esi
call fcn.004a9770
push eax
push ebp
call fcn.004a9770
or ebx, 0x20
push ebx
push ebp
call fcn.004a9720
push str.BEGIN
push dword [esp + 0x78]
push edi
call fcn.0047b4c0
mov ebx, eax
add esp, 0x30
test ebx, ebx
jne 0x4cd698
cmp dword [esp + 0x5c], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push esi
call fcn.004a6770
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4cd698
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4cd4c3
cmp dword [esp + 0x5c], ebx
jne 0x4cd4c3
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.004a9640
add esp, 0x10
test eax, eax
jne 0x4cd693
cmp dword [esp + 0x20], eax
jne 0x4cd4fd
push eax
push ebx
push dword [edi + 0x64]
push ebp
call fcn.004a9640
add esp, 0x10
test eax, eax
jne 0x4cd693
cmp byte [edi + 0x57], 0
jne 0x4cd693
mov al, byte [edi + 0x5a]
test al, al
js 0x4cd513
movsx eax, al
jmp 0x4cd51c
push esi
call fcn.004a76e0
add esp, 4
push eax
push ebp
call fcn.004a9520
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.0047b6a0
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x4cd698
push dword [esp + 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebp
push edi
call fcn.0047b6a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4cd698
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.0047b6a0
and dword [edi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4cd698
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.0047b6a0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4cd698
xor ebp, ebp
cmp byte [esi + 9], 0
mov eax, dword [esi + 4]
movzx ebx, byte [ebp + 0x6846e4]
mov dword [esp + 0x2c], eax
je 0x4cd5db
inc dword [esi + 0xc]
cmp byte [esi + 0xa], 0
jne 0x4cd5db
push esi
call fcn.00472c10
mov eax, dword [esp + 0x30]
add esp, 4
cmp ebx, 0xf
jne 0x4cd5ea
mov eax, dword [eax]
mov ebx, dword [eax + 0x6c]
add ebx, dword [esi + 0x14]
jmp 0x4cd5f6
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 0x4cd60b
add dword [esi + 0xc], 0xffffffff
jne 0x4cd60b
push esi
call fcn.004f08e0
add esp, 4
movzx eax, byte [ebp + 0x6846e5]
add eax, ebx
push eax
movzx eax, byte [ebp + 0x6846e4]
push eax
push dword [esp + 0x24]
call fcn.004aa070
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x4cd698
add ebp, 2
cmp ebp, 0xa
jl 0x4cd5b1
mov ebp, dword [esp + 0x1c]
cmp dword [esp + 0x5c], eax
jne 0x4cd655
push ebp
push esi
call fcn.004a6ec0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4cd698
push ebp
call fcn.004a6cf0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4cd698
cmp dword [esp + 0x5c], eax
jne 0x4cd698
push ebp
call fcn.004a76e0
push eax
push esi
call fcn.004a9520
push ebp
call fcn.004a7790
mov ecx, dword [ebp + 4]
push 1
push eax
push dword [ecx + 0x24]
push esi
call fcn.004a9640
add esp, 0x20
mov ebx, eax
jmp 0x4cd698
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.004a9640
add esp, 0x10
mov byte [edi + 0x55], 1
test ebp, ebp
je 0x4cd70b
push dword [ebp + 4]
call fcn.004a6900
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push edi
call fcn.004cbec0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret