Function at 0x140170350
Capabilities:
Reference sql statements

Disassembly:
mov r11, rsp
push rbx
push rsi
sub rsp, 0x98
mov rax, qword [0x14023c8a0]
xor rax, rsp
mov qword [rsp + 0x68], rax
cmp dword [rcx + 0x30], 0
mov rbx, rcx
mov rsi, qword [rcx]
mov qword [rsp + 0x48], rdx
jne 0x1401708f6
mov qword [r11 + 0x18], rbp
xor edx, edx
mov qword [r11 - 0x20], r12
mov ebp, 0xffff8000
mov qword [r11 - 0x28], r13
mov qword [r11 - 0x30], r14
mov r14, qword [rcx + 0x160]
mov qword [r11 - 0x38], r15
mov rcx, qword [r14 + 0x60]
test rcx, rcx
je 0x1401703cb
mov rax, qword [rsi + 0x20]
mov ebp, edx
add rax, 0x18
cmp qword [rax], rcx
je 0x1401703cb
nop word [rax + rax]
inc ebp
lea rax, [rax + 0x20]
cmp qword [rax], rcx
jne 0x1401703c0
mov rax, qword [rsi + 0x20]
mov r15, qword [r14]
movsxd rcx, ebp
add r15, 0x10
shl rcx, 5
mov qword [rsp + 0x90], rdi
mov r12, qword [rcx + rax]
movsx rax, word [r14 + 0x36]
mov qword [rsp + 0x40], r12
lea r13, [rax + rax*2]
mov rax, qword [r14 + 8]
lea r13, [r13 - 3]
lea r13, [rax + r13*8]
movzx eax, word [r13 + 0x10]
mov qword [rsp + 0x50], r13
test ax, ax
jne 0x140170417
mov rdi, rdx
jmp 0x140170442
cmp byte [r14 + 0x3f], dl
je 0x140170422
mov rdi, rdx
jmp 0x140170442
mov rdi, qword [r14 + 0x50]
test rdi, rdi
jne 0x140170430
mov rdi, rdx
jmp 0x140170442
cmp dword [rdi], eax
jge 0x140170439
mov rdi, rdx
jmp 0x140170442
shl rax, 5
mov rdi, qword [rax + rdi - 0x18]
mov r8, r12
mov rdx, r15
mov rcx, rsi
call fcn.1401665c0
mov r8, r12
mov qword [rsp + 0x58], rax
mov edx, 0x1a
mov qword [rsp + 0x20], 0
mov rcx, rbx
mov r9, qword [rax]
call fcn.1401677b0
test eax, eax
jne 0x1401708cc
movzx ecx, word [r13 + 0x12]
test cl, 1
je 0x140170497
lea rdx, str.Cannot_add_a_PRIMARY_KEY_column
mov rcx, rbx
call fcn.1401c8980
jmp 0x1401708cc
cmp qword [r14 + 0x10], 0
je 0x1401704b2
lea rdx, str.Cannot_add_a_UNIQUE_column
mov rcx, rbx
call fcn.1401c8980
jmp 0x1401708cc
test cl, 0x60
jne 0x140170685
test rdi, rdi
je 0x1401704d0
mov rax, qword [rdi + 0x10]
cmp byte [rax], 0x79
mov eax, 0
cmove rdi, rax
mov eax, dword [rsi + 0x30]
bt rax, 0xe
jae 0x140170504
cmp qword [r14 + 0x48], 0
je 0x140170504
test rdi, rdi
je 0x140170504
mov r9, r12
mov qword [rsp + 0x20], r15
lea r8, str.Cannot_add_a_REFERENCES_column_with_non_NULL_default_value
mov rcx, rbx
lea rdx, str.SELECT_raise_ABORT__Q__FROM___w_.__w_
call fcn.140166c30
test byte [r13 + 8], 0xf
je 0x14017051c
test rdi, rdi
jne 0x140170525
lea r8, str.Cannot_add_a_NOT_NULL_column_with_default_value_NULL
jmp 0x140170691
test rdi, rdi
je 0x1401706a8
xor eax, eax
mov r9b, 0x41
mov qword [rsp + 0x60], rax
mov r8b, 1
lea rax, [rsp + 0x60]
mov rdx, rdi
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.14019b4e0
test eax, eax
jne 0x1401708cc
mov rdi, qword [rsp + 0x60]
test rdi, rdi
jne 0x140170585
mov r9, r12
mov qword [rsp + 0x20], r15
lea r8, str.Cannot_add_a_column_with_non_constant_default
mov rcx, rbx
lea rdx, str.SELECT_raise_ABORT__Q__FROM___w_.__w_
call fcn.140166c30
mov rdi, qword [rsp + 0x60]
test rdi, rdi
je 0x1401706a8
mov eax, 0x9000
test word [rdi + 0x14], ax
jne 0x140170596
cmp dword [rdi + 0x20], 0
je 0x14017059e
mov rcx, rdi
call fcn.14019cec0
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x140170605
cmp rdi, qword [rcx + 0x1f0]
jae 0x1401705ee
cmp rdi, qword [rcx + 0x1e0]
jb 0x1401705cf
mov rax, qword [rcx + 0x1d8]
mov qword [rdi], rax
mov qword [rcx + 0x1d8], rdi
jmp 0x1401706a8
cmp rdi, qword [rcx + 0x1e8]
jb 0x1401705ee
mov rax, qword [rcx + 0x1c8]
mov qword [rdi], rax
mov qword [rcx + 0x1c8], rdi
jmp 0x1401706a8
cmp qword [rcx + 0x308], 0
je 0x140170605
mov rdx, rdi
call fcn.1401cd4c0
jmp 0x1401706a8
cmp dword [reloc.WS2_32.dll_accept], 0
je 0x140170673
mov rcx, qword [0x140247198]
test rcx, rcx
je 0x140170627
mov rax, qword [0x14023d750]
call qword [case.0x1400faf48.0]
mov rax, qword [0x14023d708]
mov rcx, rdi
call qword [case.0x1400faf48.0]
dec qword [0x140246f88]
movsxd rcx, eax
sub qword [0x140246f40], rcx
mov rcx, rdi
mov rax, qword [0x14023d6f8]
call qword [case.0x1400faf48.0]
mov rcx, qword [0x140247198]
test rcx, rcx
je 0x1401706a8
mov rax, qword [0x14023d760]
call qword [case.0x1400faf48.0]
jmp 0x1401706a8
mov rax, qword [0x14023d6f8]
mov rcx, rdi
call qword [case.0x1400faf48.0]
jmp 0x1401706a8
test cl, 0x40
je 0x1401706a8
lea r8, str.cannot_add_a_STORED_column
mov r9, r12
mov qword [rsp + 0x20], r15
lea rdx, str.SELECT_raise_ABORT__Q__FROM___w_.__w_
mov rcx, rbx
call fcn.140166c30
mov rax, qword [rsp + 0x48]
mov r12, qword [rax]
mov r13d, dword [rax + 8]
test r12, r12
je 0x1401707a5
lea rdx, [r13 + 1]
mov rcx, rsi
call fcn.1401ccf60
mov rdi, rax
test rax, rax
je 0x1401707a5
mov r8d, r13d
mov rdx, r12
mov rcx, rax
call fcn.1400b4460
mov rdx, qword [rsp + 0x48]
mov byte [rdi + r13], 0
mov edx, dword [rdx + 8]
dec edx
add rdx, rdi
cmp rdx, rdi
jbe 0x140170719
lea rcx, [0x140206d50]
movzx eax, byte [rdx]
cmp al, 0x3b
je 0x14017070e
test byte [rax + rcx], 1
je 0x140170719
mov byte [rdx], 0
dec rdx
cmp rdx, rdi
ja 0x140170701
mov r9d, dword [r14 + 0x40]
lea rdx, str.UPDATE___w_.sqlite_master_SET_sql__printf___._ds___sql____Q__substr_sql_1length_printf___._ds_sql____WHERE_type__table_AND_name___Q
mov r12, qword [rsp + 0x40]
mov rcx, rbx
mov qword [rsp + 0x30], r15
mov r8, r12
mov dword [rsp + 0x28], r9d
mov qword [rsp + 0x20], rdi
call fcn.140166c30
cmp rdi, qword [rsi + 0x1f0]
jae 0x140170784
cmp rdi, qword [rsi + 0x1e0]
jb 0x140170768
mov rax, qword [rsi + 0x1d8]
mov qword [rdi], rax
mov qword [rsi + 0x1d8], rdi
jmp 0x1401707aa
cmp rdi, qword [rsi + 0x1e8]
jb 0x140170784
mov rax, qword [rsi + 0x1c8]
mov qword [rdi], rax
mov qword [rsi + 0x1c8], rdi
jmp 0x1401707aa
cmp qword [rsi + 0x308], 0
je 0x14017079b
mov rdx, rdi
mov rcx, rsi
call fcn.1401cd4c0
jmp 0x1401707aa
mov rcx, rdi
call fcn.1401cd540
jmp 0x1401707aa
mov r12, qword [rsp + 0x40]
mov rdi, qword [rbx + 0x10]
test rdi, rdi
jne 0x1401707dd
cmp qword [rbx + 0xb0], rdi
jne 0x1401707c9
mov rax, qword [rbx]
test byte [rax + 0x60], 8
jne 0x1401707c9
mov byte [rbx + 0x23], 1
mov rcx, rbx
call fcn.14019b1f0
mov rdi, rax
test rax, rax
je 0x1401708cc
movzx eax, byte [rbx + 0x1f]
test al, al
jne 0x1401707ed
inc dword [rbx + 0x38]
mov esi, dword [rbx + 0x38]
jmp 0x1401707fc
dec al
movzx eax, al
mov byte [rbx + 0x1f], al
mov esi, dword [rbx + rax*4 + 0xe8]
mov r9d, esi
mov dword [rsp + 0x20], 2
mov r8d, ebp
mov edx, 0x63
mov rcx, rdi
call fcn.14019aa50
mov edx, ebp
mov rcx, rdi
call fcn.140198a90
mov r9d, 0xfffffffe
mov r8d, esi
lea edx, [r9 + 0x58]
call fcn.14019aad0
mov r9d, dword [rdi + 0x90]
mov r8d, esi
add r9d, 2
mov edx, 0x3b
mov rcx, rdi
call fcn.14019aad0
mov r9d, 2
mov dword [rsp + 0x20], 3
mov r8d, ebp
mov rcx, rdi
lea edx, [r9 + 0x62]
call fcn.14019aa50
test esi, esi
je 0x140170881
movzx eax, byte [rbx + 0x1f]
cmp al, 8
jae 0x140170881
mov dword [rbx + rax*4 + 0xe8], esi
inc byte [rbx + 0x1f]
mov r8d, 3
mov edx, ebp
mov rcx, rbx
call fcn.140170e10
cmp qword [r14 + 0x20], 0
jne 0x1401708b7
mov rax, qword [rsp + 0x50]
test byte [rax + 8], 0xf
je 0x1401708a9
test byte [rax + 0x12], 0x60
jne 0x1401708b7
mov rax, qword [rsp + 0x58]
test dword [rax + 0x30], 0x10000
je 0x1401708cc
mov r9, r12
lea rdx, str.SELECT_CASE_WHEN_quick_check_GLOB_CHECK_THEN_raise_ABORT_CHECK_constraint_failed__WHEN_quick_check_GLOB_non__value_in_THEN_raise_ABORT_type_mismatch_on_DEFAULT__ELSE_raise_ABORT_NOT_NULL_constraint_failed__END__FROM_pragma_quick_check__Q__Q__WHERE_quick_check_GLOB_CHECK_OR_quick_check_GLOB_NULL_OR_quick_check_GLOB_non__value_in
mov r8, r15
mov rcx, rbx
call fcn.140166c30
mov rdi, qword [rsp + 0x90]
mov r13, qword [rsp + 0x80]
mov r12, qword [rsp + 0x88]
mov r14, qword [rsp + 0x78]
mov rbp, qword [rsp + 0xc0]
mov r15, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.1400b1c90
add rsp, 0x98
pop rsi
pop rbx
ret