Function at 0x413923
Capabilities:
Reference sql statements

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov rbp, qword [rcx]
test r8, r8
mov rbx, rcx
mov rdi, rdx
mov qword [rsp + 0x78], 0
mov r12, r8
je 0x413957
mov qword [r8], 0
xor esi, esi
cmp qword [rbx + 0x360], 0
je 0x413a07
test r12, r12
je 0x41398c
cmp qword [r12], 0
je 0x41398c
lea rdx, str.src_shell.c
mov r8d, 0x4bec
lea rcx, str.pzErr0__pzErr0
call sym._assert
mov rcx, qword [rbx + 0x360]
mov r8, r12
mov rdx, rdi
call sym.sqlite3_expert_sql
xor edx, edx
mov r8, r12
mov rcx, rbx
test eax, eax
setne dl
call sym.expertFinish
mov esi, eax
jmp 0x414022
test esi, esi
jne 0x414022
lea rax, [rsp + 0x80]
or r8d, 0xffffffff
mov rdx, rdi
lea r15, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov rcx, rbp
mov r9, r15
call sym.sqlite3_prepare_v2
test eax, eax
mov esi, eax
je 0x413a11
test r12, r12
je 0x413a07
mov r9, rdi
mov r8d, eax
mov rcx, rbp
lea rdx, str.in_prepare
call sym.save_err_msg
mov qword [r12], rax
cmp byte [rdi], 0
jne 0x4139b7
jmp 0x414022
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x413a37
mov rdi, qword [rsp + 0x80]
movzx ecx, byte [rdi]
call qword [sym.imp.msvcrt.dll_isspace]
test eax, eax
mov esi, eax
je 0x413a07
inc rdi
jmp 0x413a23
call sym.sqlite3_sql
test rax, rax
jne 0x413a48
lea rax, [0x004d4196]
mov qword [0x00509050], rax
mov r13, qword [0x00509050]
movzx ecx, byte [r13]
call qword [sym.imp.msvcrt.dll_isspace]
test eax, eax
mov esi, eax
je 0x413a73
inc r13
mov qword [0x00509050], r13
jmp 0x413a4f
mov rcx, qword [rsp + 0x78]
mov dword [rbx + 0x2c], 0
cmp byte [rbx + 9], 0
mov qword [rbx + 0x240], rcx
je 0x413d55
call sym.sqlite3_stmt_isexplain
test eax, eax
jne 0x413d55
lea r8, [0x00509060]
xor edx, edx
mov ecx, 0x1f
mov dword [rsp + 0x88], 0
lea r13, [rsp + 0x90]
mov dword [rsp + 0x90], 0
call sym.sqlite3_test_control
mov r8, r13
mov edx, 1
mov ecx, 0x1f
call sym.sqlite3_test_control
mov edx, 2
mov ecx, 0x1f
lea r8, [0x0050905c]
call sym.sqlite3_test_control
mov r8, r13
mov edx, 3
mov ecx, 0x1f
call sym.sqlite3_test_control
or r8d, 0xffffffff
mov edx, 0x3f0
mov rcx, rbp
lea r9, [rsp + 0x88]
call sym.sqlite3_db_config
cmp byte [rbx + 9], 1
jbe 0x413b3d
xor r9d, r9d
mov r8d, 1
mov edx, 0x3f0
mov rcx, rbp
call sym.sqlite3_db_config
mov rdx, qword [0x00509050]
lea rcx, str.EXPLAIN_QUERY_PLAN__s
call sym.sqlite3_mprintf
mov r14, rax
mov rcx, rax
call sym.shell_check_oom
or r8d, 0xffffffff
mov r9, r13
mov rdx, r14
mov qword [rsp + 0x20], 0
mov rcx, rbp
call sym.sqlite3_prepare_v2
test eax, eax
mov esi, eax
jne 0x413c19
mov rcx, qword [rsp + 0x90]
call sym.sqlite3_step
cmp eax, 0x64
jne 0x413c11
mov rcx, qword [rsp + 0x90]
mov edx, 3
call sym.sqlite3_column_text
mov rcx, qword [rsp + 0x90]
xor edx, edx
mov qword [rsp + 0x60], rax
call sym.sqlite3_column_int
mov rcx, qword [rsp + 0x90]
mov edx, 1
mov dword [rsp + 0x5c], eax
call sym.sqlite3_column_int
mov r9, qword [rsp + 0x60]
mov r8d, eax
test r9, r9
je 0x413bf9
cmp byte [r9], 0x2d
jne 0x413c00
mov rcx, rbx
mov dword [rsp + 0x68], eax
call sym.eqp_render.constprop.94
mov r9, qword [rsp + 0x60]
mov r8d, dword [rsp + 0x68]
jmp 0x413c00
lea r9, [0x004d4196]
mov edx, dword [rsp + 0x5c]
mov rcx, rbx
call sym.eqp_append
jmp 0x413b80
mov rcx, rbx
call sym.eqp_render.constprop.94
mov rcx, qword [rsp + 0x90]
call sym.sqlite3_finalize
mov rcx, r14
call sym.sqlite3_free
cmp byte [rbx + 9], 2
jbe 0x413cd5
mov rdx, qword [0x00509050]
lea rcx, str.EXPLAIN__s
call sym.sqlite3_mprintf
mov r14, rax
mov rcx, rax
call sym.shell_check_oom
or r8d, 0xffffffff
mov r9, r13
mov rdx, r14
mov qword [rsp + 0x20], 0
mov rcx, rbp
call sym.sqlite3_prepare_v2
test eax, eax
mov esi, eax
jne 0x413cc0
mov rdx, qword [rsp + 0x90]
mov rcx, rbx
mov dword [rbx + 0x5c], 9
call sym.explain_data_prepare
mov rdx, qword [rsp + 0x90]
mov rcx, rbx
call sym.exec_prepared_stmt
mov rcx, qword [rbx + 0x2d0]
call sym.sqlite3_free
mov qword [rbx + 0x2d0], 0
mov qword [rbx + 0x2d8], 0
mov rcx, qword [rsp + 0x90]
call sym.sqlite3_finalize
mov rcx, r14
call sym.sqlite3_free
cmp byte [rbx + 9], 1
jbe 0x413d29
cmp dword [rsp + 0x88], 0
jne 0x413d29
xor r9d, r9d
xor r8d, r8d
mov edx, 0x3f0
mov rcx, rbp
call sym.sqlite3_db_config
mov rcx, qword [rsp + 0x78]
call sym.sqlite3_finalize
mov r9, r15
or r8d, 0xffffffff
mov rdx, rdi
mov qword [rsp + 0x20], 0
mov rcx, rbp
call sym.sqlite3_prepare_v2
mov rax, qword [rsp + 0x78]
mov qword [rbx + 0x240], rax
lea r8, [0x00509060]
mov edx, 1
mov ecx, 0x1f
call sym.sqlite3_test_control
mov edx, 3
mov ecx, 0x1f
lea r8, [0x0050905c]
call sym.sqlite3_test_control
mov eax, dword [rbx + 0x54]
cmp byte [rbx + 8], 0
mov dword [rbx + 0x5c], eax
je 0x413d8e
mov rcx, qword [rsp + 0x78]
call sym.sqlite3_stmt_isexplain
dec eax
jne 0x413d76
mov dword [rbx + 0x5c], 9
mov rcx, qword [rsp + 0x78]
call sym.sqlite3_stmt_isexplain
cmp eax, 2
jne 0x413d8e
mov dword [rbx + 0x5c], 0xc
jmp 0x413da1
cmp dword [rbx + 0x5c], 9
jne 0x413da1
mov rdx, qword [rsp + 0x78]
mov rcx, rbx
call sym.explain_data_prepare
mov r14, qword [rsp + 0x78]
mov qword [rsp + 0x88], 0
mov rcx, r14
call sym.sqlite3_bind_parameter_count
test eax, eax
mov dword [rsp + 0x5c], eax
je 0x413f7b
mov rcx, qword [rbx]
lea r9, [0x004d6883]
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
lea r8, str.sqlite_parameters
mov qword [rsp + 0x30], 0
lea rdx, str.TEMP
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call sym.sqlite3_table_column_metadata
test eax, eax
je 0x413e2a
mov qword [rsp + 0x88], 0
mov dword [rsp + 0x60], 0xc
jmp 0x413e52
mov rcx, qword [rbx]
lea r9, [rsp + 0x88]
or r8d, 0xffffffff
mov qword [rsp + 0x20], 0
lea rdx, str.SELECT_value_FROM_temp.sqlite_parameters_WHERE_key_1
call sym.sqlite3_prepare_v2
mov dword [rsp + 0x60], eax
lea rax, [rsp + 0x90]
mov r13d, 1
mov qword [rsp + 0x68], rax
cmp dword [rsp + 0x5c], r13d
jl 0x413f6e
mov edx, r13d
mov rcx, r14
call sym.sqlite3_bind_parameter_name
test rax, rax
mov r15, rax
jne 0x413ea1
mov rdx, qword [rsp + 0x68]
mov r9d, r13d
mov ecx, 0x1e
lea r8, [0x004d68d4]
call sym.sqlite3_snprintf
mov r15, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x88]
or r9d, 0xffffffff
mov r8, r15
mov edx, 1
mov qword [rsp + 0x20], 0
call sym.sqlite3_bind_text
cmp dword [rsp + 0x60], 0
jne 0x413f00
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x413f00
call sym.sqlite3_step
cmp eax, 0x64
jne 0x413f00
mov rcx, qword [rsp + 0x88]
xor edx, edx
call sym.sqlite3_column_value
mov edx, r13d
mov rcx, r14
mov r8, rax
call sym.sqlite3_bind_value
jmp 0x413f59
lea rcx, str._NAN
xor r8d, r8d
mov rdx, r15
call sym.sqlite3_strlike
test eax, eax
jne 0x413f1f
mov rax, qword [0x004e0530]
jmp 0x413f3c
lea rcx, str._INF
xor r8d, r8d
mov rdx, r15
call sym.sqlite3_strlike
test eax, eax
jne 0x413f4e
mov rax, qword [0x004e0538]
movq xmm2, rax
mov edx, r13d
mov rcx, r14
call sym.sqlite3_bind_double
jmp 0x413f59
mov edx, r13d
mov rcx, r14
call sym.sqlite3_bind_null
mov rcx, qword [rsp + 0x88]
inc r13d
call sym.sqlite3_reset
jmp 0x413e65
mov rcx, qword [rsp + 0x88]
call sym.sqlite3_finalize
mov rdx, qword [rsp + 0x78]
mov rcx, rbx
call sym.exec_prepared_stmt
mov rcx, qword [rbx + 0x2d0]
call sym.sqlite3_free
mov rcx, rbx
mov qword [rbx + 0x2d0], 0
mov qword [rbx + 0x2d8], 0
call sym.eqp_render.constprop.94
cmp dword [rbx + 0x1c], 0
je 0x413fc3
mov rdx, rbx
mov rcx, rbp
call sym.display_stats.constprop.95
mov rcx, qword [rsp + 0x78]
call sym.sqlite3_finalize
cmp esi, 7
je 0x413ff4
test eax, eax
mov esi, eax
jne 0x413ff4
mov rdi, qword [rsp + 0x80]
movzx ecx, byte [rdi]
call qword [sym.imp.msvcrt.dll_isspace]
test eax, eax
mov esi, eax
je 0x414012
inc rdi
jmp 0x413fe0
test r12, r12
je 0x414012
xor r9d, r9d
mov r8d, esi
mov rcx, rbp
lea rdx, str.stepping
call sym.save_err_msg
mov qword [r12], rax
mov qword [rbx + 0x240], 0
jmp 0x413a07
mov eax, esi
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret