Function at 0x609448b0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push edi
push esi
push ebx
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x20], 0
cmp byte [edi + 0x1c], 0
jne 0x609448e4
add esp, 0xfffffffc
push 0x609443f0
push edi
push dword [ebp + 8]
call sym._sqlite3SetString
mov eax, 1
jmp 0x60944c07
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x10], eax
mov edx, dword [edi + 0x3c]
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + 0x40]
mov dword [ebp - 0x18], ecx
mov eax, dword [edi + 0x94]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
or eax, 0x50000
and eax, 0xfbffffff
mov dword [edi + 0xc], eax
mov dword [edi + 0x94], 0
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 8], eax
add esp, 0xfffffff4
add esp, 0xfffffff4
push eax
call sym._sqlite3BtreePager
push eax
call sym._sqlite3PagerIsMemdb
mov esi, eax
add esp, 0x20
add esp, 0xfffffff8
push 0x60944418
push edi
call sym._execSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
mov edx, dword [edi + 4]
shl edx, 4
mov eax, dword [edi + 8]
lea ecx, [eax + edx - 0x10]
mov dword [ebp - 0x20], ecx
mov eax, dword [eax + edx - 0xc]
mov dword [ebp - 0xc], eax
add esp, 0xfffffff4
push eax
call sym._sqlite3BtreeCommit
add esp, 0xfffffff4
mov eax, dword [ebp - 8]
push eax
call sym._sqlite3BtreeGetReserve
mov dword [ebp - 0x24], eax
add esp, 0x20
push 0
mov edx, eax
push edx
add esp, 0xfffffff4
mov ecx, dword [ebp - 8]
push ecx
call sym._sqlite3BtreeGetPageSize
add esp, 0x10
push eax
mov eax, dword [ebp - 0xc]
push eax
call sym._sqlite3BtreeSetPageSize
add esp, 0x10
test eax, eax
jne 0x609449ce
test esi, esi
jne 0x609449c8
push 0
mov edx, dword [ebp - 0x24]
push edx
push dword [edi + 0x24]
mov ecx, dword [ebp - 0xc]
push ecx
call sym._sqlite3BtreeSetPageSize
add esp, 0x10
test eax, eax
jne 0x609449ce
cmp byte [edi + 0x1e], 0
je 0x609449d8
mov ebx, 7
jmp 0x60944bb3
add esp, 0xfffffff8
push 0x60944430
push edi
call sym._execSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
cmp byte [edi + 0x21], 0
jl 0x60944a04
movsx eax, byte [edi + 0x21]
jmp 0x60944a13
add esp, 0xfffffff4
mov eax, dword [ebp - 8]
push eax
call sym._sqlite3BtreeGetAutoVacuum
add esp, 0x10
push eax
mov edx, dword [ebp - 0xc]
push edx
call sym._sqlite3BtreeSetAutoVacuum
add esp, 0xfffffff8
push 0x60944451
push edi
call sym._execSql
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x60944470
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x60944510
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x60944590
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x60944610
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x609446d0
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x60944750
push edi
call sym._execExecSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
push 0x609447f0
push edi
call sym._execSql
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
mov dword [ebp - 0x28], 0
add esp, 0xfffffffc
lea eax, [ebp - 4]
push eax
mov ebx, 0x609448a8
mov ecx, dword [ebp - 0x28]
movzx esi, byte [ecx + ebx]
push esi
mov eax, dword [ebp - 8]
push eax
call sym._sqlite3BtreeGetMeta
add esp, 0xfffffffc
mov edx, dword [ebp - 0x28]
movzx eax, byte [ebx + edx + 1]
add eax, dword [ebp - 4]
push eax
push esi
mov ecx, dword [ebp - 0xc]
push ecx
call sym._sqlite3BtreeUpdateMeta
mov ebx, eax
add esp, 0x20
test ebx, ebx
jne 0x60944bb3
add dword [ebp - 0x28], 2
cmp dword [ebp - 0x28], 7
jle 0x60944afc
add esp, 0xfffffff8
mov eax, dword [ebp - 0xc]
push eax
mov edx, dword [ebp - 8]
push edx
call sym._sqlite3BtreeCopyFile
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff4
mov ecx, dword [ebp - 0xc]
push ecx
call sym._sqlite3BtreeCommit
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x60944bb3
add esp, 0xfffffff8
add esp, 0xfffffff4
mov eax, dword [ebp - 0xc]
push eax
call sym._sqlite3BtreeGetAutoVacuum
push eax
mov edx, dword [ebp - 8]
push edx
call sym._sqlite3BtreeSetAutoVacuum
add esp, 0x20
push 1
mov ecx, dword [ebp - 0x24]
push ecx
add esp, 0xfffffff4
mov eax, dword [ebp - 0xc]
push eax
call sym._sqlite3BtreeGetPageSize
add esp, 0x10
push eax
mov edx, dword [ebp - 8]
push edx
call sym._sqlite3BtreeSetPageSize
mov ebx, eax
add esp, 0x10
mov ecx, dword [ebp - 0x10]
mov dword [edi + 0xc], ecx
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x3c], eax
mov edx, dword [ebp - 0x18]
mov dword [edi + 0x40], edx
mov ecx, dword [ebp - 0x1c]
mov dword [edi + 0x94], ecx
mov byte [edi + 0x1c], 1
cmp dword [ebp - 0x20], 0
je 0x60944bfa
add esp, 0xfffffff4
mov eax, dword [ebp - 0x20]
push dword [eax + 4]
call sym._sqlite3BtreeClose
mov edx, dword [ebp - 0x20]
mov dword [edx + 4], 0
mov dword [edx + 0xc], 0
add esp, 0x10
add esp, 0xfffffff8
push 0
push edi
call sym._sqlite3ResetInternalSchema
mov eax, ebx
lea esp, [ebp - 0x48]
pop ebx
pop esi
pop edi
leave
ret