Function at 0x4a06f0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x1c]
push ebx
push esi
push edi
push eax
xor ebx, ebx
push str.SELECT_name__sql_FROM_sqlite_master_WHERE__s
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
call fcn.004ad880
mov edi, dword [esp + 0x28]
push ebx
lea ecx, [esp + 0x18]
push ecx
push ebx
mov esi, eax
mov eax, dword [edi]
push 0x80
push 0xffffffffffffffff
push esi
mov dword [esp + 0x38], esi
call fcn.00501540
add esp, 0x20
test eax, eax
je 0x4a076f
mov edx, dword [edi]
push esi
push edx
call fcn.005270e0
add esp, 4
push eax
mov eax, dword [edi]
push eax
call fcn.00527310
add esp, 4
push eax
push str.Error:___d___s_on___s__n
call fcn.00587376
mov ebx, eax
add ebx, 0x40
call fcn.004904d0
mov esi, dword [esp + 0x1c]
add esp, 0x10
jmp 0x4a0985
mov esi, dword [esp + 0xc]
push ebp
push esi
call fcn.004d1cc0
add esp, 4
cmp eax, 0x64
jne 0x4a0839
push 0
push esi
call fcn.004d2500
mov ebx, eax
push 1
push esi
mov dword [esp + 0x28], ebx
call fcn.004d2500
push ebx
push str._s...
mov edi, eax
call fcn.00583141
call fcn.00587376
add eax, 0x20
push eax
call fcn.00582dcf
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x30]
push ecx
push 0
push 0
push edi
push edx
call fcn.004fc670
mov ebp, dword [esp + 0x44]
add esp, 0x30
test ebp, ebp
je 0x4a0801
push edi
push ebp
push str.Error:__s_nSQL:___s__n
call fcn.00587376
mov ebx, eax
add ebx, 0x40
call fcn.004904d0
push ebp
call fcn.004ab490
mov ebx, dword [esp + 0x28]
add esp, 0x10
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a0819
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ebx
push ecx
push edx
call eax
add esp, 0xc
push str.done_n
call fcn.00583141
push esi
call fcn.004d1cc0
add esp, 8
cmp eax, 0x64
je 0x4a0786
mov edi, dword [esp + 0x24]
cmp eax, 0x65
je 0x4a0984
push esi
call fcn.004d0dd0
mov eax, dword [esp + 0x20]
push eax
call fcn.004ab490
mov ecx, dword [esp + 0x34]
push ecx
push str.SELECT_name__sql_FROM_sqlite_master_WHERE__s_ORDER_BY_rowid_DESC
call fcn.004ad880
push 0
lea edx, [esp + 0x24]
push edx
push 0
mov esi, eax
mov eax, dword [edi]
push 0x80
push 0xffffffffffffffff
push esi
mov dword [esp + 0x44], esi
call fcn.00501540
add esp, 0x28
test eax, eax
je 0x4a08bf
mov eax, dword [edi]
push esi
push eax
call fcn.005270e0
mov ecx, dword [edi]
add esp, 4
push eax
push ecx
call fcn.00527310
add esp, 4
push eax
push str.Error:___d___s_on___s__n
call fcn.00587376
mov ebx, eax
add ebx, 0x40
call fcn.004904d0
mov esi, dword [esp + 0x20]
add esp, 0x10
jmp 0x4a0984
mov esi, dword [esp + 0x10]
push esi
call fcn.004d1cc0
add esp, 4
cmp eax, 0x64
jne 0x4a0984
push 0
push esi
call fcn.004d2500
mov ebx, eax
push 1
push esi
mov dword [esp + 0x28], ebx
call fcn.004d2500
push ebx
push str._s...
mov edi, eax
call fcn.00583141
call fcn.00587376
add eax, 0x20
push eax
call fcn.00582dcf
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x30]
push edx
push 0
push 0
push edi
push eax
call fcn.004fc670
mov ebp, dword [esp + 0x44]
add esp, 0x30
test ebp, ebp
je 0x4a0950
push edi
push ebp
push str.Error:__s_nSQL:___s__n
call fcn.00587376
mov ebx, eax
add ebx, 0x40
call fcn.004904d0
push ebp
call fcn.004ab490
mov ebx, dword [esp + 0x28]
add esp, 0x10
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4a0968
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ebx
push ecx
push edx
call eax
add esp, 0xc
push str.done_n
call fcn.00583141
push esi
call fcn.004d1cc0
add esp, 8
cmp eax, 0x64
je 0x4a08d5
pop ebp
push esi
call fcn.004d0dd0
mov eax, dword [esp + 0x1c]
push eax
call fcn.004ab490
add esp, 8
pop edi
pop esi
pop ebx
add esp, 0x10
ret