Function at 0x4a3960
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x14]
push ebp
push esi
push edi
push eax
xor ebp, ebp
push str.SELECT_name__sql_FROM_sqlite_master_WHERE__s
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
call fcn.004d30e0
mov esi, dword [esp + 0x24]
mov edx, dword [esi]
push ebp
lea ecx, [esp + 0x18]
push ecx
mov edi, eax
push 0xffffffffffffffff
push edi
push edx
mov dword [esp + 0x30], edi
call fcn.00521170
add esp, 0x1c
test eax, eax
je 0x4a39d5
mov eax, dword [esi]
push edi
push eax
call fcn.004f7d70
mov ecx, dword [esi]
add esp, 4
push eax
push ecx
call fcn.004f7ec0
add esp, 4
push eax
push str.Error:___d___s_on___s__n
call fcn.0058b93f
add eax, 0x40
push eax
call fcn.00495cb0
add esp, 0x14
jmp 0x4a3bb7
mov edx, dword [esp + 0xc]
push edx
call fcn.005277b0
add esp, 4
cmp eax, 0x64
jne 0x4a3a9b
jmp 0x4a39f0
mov eax, dword [esp + 0xc]
push ebp
push eax
call fcn.004cfe50
mov ecx, dword [esp + 0x14]
push 1
push ecx
mov edi, eax
call fcn.004cfe50
push edi
push str._s...
mov esi, eax
call fcn.00587659
call fcn.0058b93f
add eax, 0x20
push eax
call fcn.00586bb9
lea edx, [esp + 0x2c]
push edx
push ebp
push ebp
push esi
push ebx
call fcn.00527b30
mov eax, dword [esp + 0x40]
add esp, 0x30
cmp eax, ebp
je 0x4a3a63
push esi
push eax
push str.Error:__s_nSQL:___s__n
call fcn.0058b93f
add eax, 0x40
push eax
call fcn.00495cb0
mov eax, dword [esp + 0x20]
push eax
call fcn.004ac9a0
add esp, 0x14
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x4a3a77
mov ecx, dword [esp + 0x1c]
push edi
push ebx
push ecx
call eax
add esp, 0xc
push str.done_n
call fcn.00587659
mov edx, dword [esp + 0x10]
push edx
call fcn.005277b0
add esp, 8
cmp eax, 0x64
je 0x4a39f0
mov esi, dword [esp + 0x1c]
cmp eax, 0x65
je 0x4a3bb7
mov eax, dword [esp + 0xc]
push eax
call fcn.005125e0
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004ac9a0
mov edx, dword [esp + 0x28]
push edx
push str.SELECT_name__sql_FROM_sqlite_master_WHERE__s_ORDER_BY_rowid_DESC
call fcn.004d30e0
mov ecx, dword [esi]
mov edi, eax
push ebp
lea eax, [esp + 0x20]
push eax
push 0xffffffffffffffff
push edi
push ecx
mov dword [esp + 0x38], edi
call fcn.00521170
add esp, 0x24
test eax, eax
je 0x4a3afa
mov edx, dword [esi]
push edi
push edx
call fcn.004f7d70
add esp, 4
push eax
mov eax, dword [esi]
push eax
jmp 0x4a39b1
mov ecx, dword [esp + 0xc]
push ecx
call fcn.005277b0
add esp, 4
cmp eax, 0x64
jne 0x4a3bb7
mov edx, dword [esp + 0xc]
push ebp
push edx
call fcn.004cfe50
mov edi, eax
mov eax, dword [esp + 0x14]
push 1
push eax
call fcn.004cfe50
push edi
push str._s...
mov esi, eax
call fcn.00587659
call fcn.0058b93f
add eax, 0x20
push eax
call fcn.00586bb9
lea ecx, [esp + 0x2c]
push ecx
push ebp
push ebp
push esi
push ebx
call fcn.00527b30
mov eax, dword [esp + 0x40]
add esp, 0x30
cmp eax, ebp
je 0x4a3b83
push esi
push eax
push str.Error:__s_nSQL:___s__n
call fcn.0058b93f
add eax, 0x40
push eax
call fcn.00495cb0
mov edx, dword [esp + 0x20]
push edx
call fcn.004ac9a0
add esp, 0x14
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x4a3b97
mov ecx, dword [esp + 0x1c]
push edi
push ebx
push ecx
call eax
add esp, 0xc
push str.done_n
call fcn.00587659
mov edx, dword [esp + 0x10]
push edx
call fcn.005277b0
add esp, 8
cmp eax, 0x64
je 0x4a3b10
mov eax, dword [esp + 0xc]
push eax
call fcn.005125e0
mov ecx, dword [esp + 0x18]
push ecx
call fcn.004ac9a0
add esp, 8
pop edi
pop esi
pop ebp
add esp, 0xc
ret