Function at 0x1402304c0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x58
mov r13, rcx
mov rcx, qword [rcx + 0x128]
test rcx, rcx
je 0x1402305e0
mov dword [rsp + 0x40], 0
xor ebx, ebx
lea r14, [rsp + 0x40]
call sym.sqlite3WalEndReadTransaction
mov rsi, qword [r13 + 0x128]
nop dword [rax]
add ebx, 1
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
mov r9d, ebx
call sym.walTryBeginRead
mov r12d, eax
cmp eax, 0xffffffff
je 0x140230500
or eax, dword [rsp + 0x40]
jne 0x140230560
movabs rax, 0xff00000000ff
and rax, qword [r13 + 0x10]
jne 0x1402305c3
test r12d, r12d
je 0x140230840
mov rcx, r13
call sym.pager_unlock
mov eax, r12d
add rsp, 0x58
pop rbx
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r13 + 0x70]
add dword [r13 + 0x84], 1
test rax, rax
je 0x140230588
nop dword [rax]
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x140230578
mov rcx, qword [r13 + 0x120]
xor edx, edx
call sym.sqlite3PcacheTruncate
cmp byte [r13 + 0x1b], 0
je 0x140230522
mov rcx, qword [r13 + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
movabs rax, 0xff00000000ff
and rax, qword [r13 + 0x10]
je 0x140230536
test r12d, r12d
jne 0x14023053f
mov byte [r13 + 0x15], 1
xor r12d, r12d
mov byte [r13 + 0x1c], 1
jmp 0x140230547
cmp byte [r13 + 0x15], 0
je 0x1402306a1
movabs rax, 0xff00000000ff
and rax, qword [r13 + 0x10]
jne 0x1402305cc
mov rcx, qword [r13 + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x14023064b
mov qword [rsp + 0x40], 0
lea rdx, [rsp + 0x40]
call qword [rax + 0x30]
mov r12d, eax
test eax, eax
jne 0x14023053f
mov rcx, qword [r13 + 0xc8]
mov rax, qword [rsp + 0x40]
add rax, rcx
sub rax, 1
cqo
idiv rcx
cmp dword [r13 + 0xbc], eax
jae 0x14023064b
mov dword [r13 + 0xbc], eax
mov dword [r13 + 0x20], eax
xor r12d, r12d
mov byte [r13 + 0x15], 1
mov byte [r13 + 0x1c], 1
jmp 0x140230547
mov rcx, qword [r13 + 0x48]
mov edx, 1
mov rax, qword [rcx]
call qword [rax + 0x38]
mov r12d, eax
test eax, eax
je 0x14023086b
cmp eax, 5
jne 0x14023053f
mov rcx, qword [r13 + 0xf0]
call qword [r13 + 0xe8]
test eax, eax
je 0x14023053f
movzx eax, byte [r13 + 0x16]
cmp al, 5
je 0x1402306c0
test al, al
je 0x1402306c0
cmp al, 1
jne 0x140230876
jmp 0x1402306d4
cmp byte [r13 + 0x11], 0
je 0x140230668
cmp al, 5
je 0x140230876
mov byte [r13 + 0x16], 1
mov rax, qword [r13 + 0x50]
mov r15, qword [r13]
mov dword [rsp + 0x34], 1
mov rsi, qword [rax]
test rsi, rsi
je 0x140230902
mov rcx, qword [r13 + 0x48]
mov dword [rsp + 0x38], 0
lea rdx, [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + 0x48]
mov r12d, eax
test eax, eax
jne 0x14023053f
mov r9d, dword [rsp + 0x38]
test r9d, r9d
je 0x140230ab7
cmp byte [r13 + 0x10], 0
jne 0x140230938
cmp byte [r13 + 0x1c], 0
je 0x1402307e8
mov rcx, qword [r13 + 0x48]
lea r14, [rsp + 0x40]
mov r9d, 0x18
mov r8d, 0x10
mov rdx, r14
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r12d, eax
test eax, eax
je 0x140230778
cmp eax, 0x20a
jne 0x14023053f
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov rax, qword [r13 + 0x88]
mov rdx, qword [r13 + 0x90]
xor rax, qword [rsp + 0x40]
xor rdx, qword [rsp + 0x48]
or rdx, rax
je 0x1402307dd
mov rax, qword [r13 + 0x70]
add dword [r13 + 0x84], 1
test rax, rax
je 0x1402307b6
mov dword [rax + 0x18], 1
mov rax, qword [rax + 0x40]
test rax, rax
jne 0x1402307a6
mov rcx, qword [r13 + 0x120]
xor edx, edx
call sym.sqlite3PcacheTruncate
cmp byte [r13 + 0x1b], 0
je 0x1402307dd
mov rcx, qword [r13 + 0x48]
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
cmp byte [r13 + 0x10], 0
jne 0x140230938
mov rax, qword [r13]
mov rdx, qword [r13 + 0x130]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rcx, rax
call qword [rax + 0x38]
mov r12d, eax
test eax, eax
jne 0x140230822
mov r12d, dword [rsp + 0x3c]
test r12d, r12d
jne 0x140230a30
cmp byte [r13 + 9], 5
jne 0x140230822
mov byte [r13 + 9], 0
mov rcx, qword [r13 + 0x128]
test rcx, rcx
jne 0x1402304e1
jmp 0x140230522
mov rax, qword [r13 + 0x128]
test rax, rax
je 0x1402305fb
cmp word [rax + 0x3c], 0
js 0x1402305fb
mov eax, dword [rax + 0x5c]
test eax, eax
je 0x1402305fb
jmp 0x14023063b
cmp byte [r13 + 0x16], 5
jne 0x1402306cf
cmp byte [r13 + 0x12], 0
jne 0x14023094d
movzx eax, byte [r13 + 0x16]
cmp al, 3
jbe 0x14023088e
cmp al, 5
jne 0x1402308a6
mov edx, 4
mov rcx, r13
call sym.pagerLockDb.part.0
mov r12d, eax
test eax, eax
jne 0x14023053f
mov rcx, qword [r13 + 0x50]
mov rax, qword [rcx]
test rax, rax
je 0x140230958
cmp byte [r13 + 0xb], 0
je 0x140230a98
lea rdx, [r13 + 0x68]
call qword [rax + 0x30]
mov r12d, eax
test eax, eax
je 0x140230a7c
movzx eax, r12b
cmp r12b, 0xd
je 0x1402308e6
cmp eax, 0xa
jne 0x14023053f
lea rax, [sym.getPageError]
mov dword [r13 + 0x30], r12d
mov byte [r13 + 0x15], 6
mov qword [r13 + 0x110], rax
jmp 0x14023053f
mov rdx, qword [r13 + 0xe0]
lea r9, [rsp + 0x34]
xor r8d, r8d
mov rcx, r15
call qword [r15 + 0x38]
mov r12d, eax
test eax, eax
jne 0x14023053f
mov eax, dword [rsp + 0x34]
test eax, eax
je 0x140230720
jmp 0x1402306f0
mov rcx, qword [r13 + 0x128]
test rcx, rcx
jne 0x1402304e1
jmp 0x1402305eb
mov r12d, 0x308
jmp 0x14023053f
cmp byte [r13 + 9], 2
je 0x1402309e3
mov rbx, qword [r13]
mov rdx, qword [r13 + 0xe0]
lea r9, [rsp + 0x3c]
xor r8d, r8d
mov rcx, rbx
call qword [rbx + 0x38]
mov r12d, eax
test eax, eax
jne 0x140230b20
mov r8d, dword [rsp + 0x3c]
mov rcx, qword [r13 + 0x50]
test r8d, r8d
je 0x1402309d7
lea r14, [rsp + 0x40]
mov r8, rcx
mov rcx, rbx
mov dword [rsp + 0x40], 0
mov qword [rsp + 0x20], r14
mov rdx, qword [r13 + 0xe0]
mov r9d, 0x802
call qword [rbx + 0x28]
mov r12d, eax
test eax, eax
jne 0x140230b20
test byte [rsp + 0x40], 1
jne 0x140230ca2
mov rcx, qword [r13 + 0x50]
mov rax, qword [rcx]
test rax, rax
jne 0x1402308b6
xor r12d, r12d
cmp byte [r13 + 8], 0
jne 0x140230720
mov rcx, qword [r13 + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x140230a18
cmp byte [r13 + 0x11], 0
jne 0x140230a0c
mov edx, 1
call qword [rax + 0x40]
cmp byte [r13 + 0x16], 5
je 0x140230a18
mov byte [r13 + 0x16], 1
movzx eax, byte [r13 + 0x10]
mov byte [r13 + 0x17], al
test r12d, r12d
je 0x140230720
jmp 0x1402308d3
lea r14, [rsp + 0x40]
mov rcx, r13
mov rdx, r14
call sym.pagerPagecount
mov r12d, eax
test eax, eax
jne 0x140230822
mov edx, dword [rsp + 0x40]
test edx, edx
jne 0x140230b40
mov rcx, qword [r13]
mov rax, qword [rcx + 0x30]
test rax, rax
je 0x140230822
mov rdx, qword [r13 + 0x130]
xor r8d, r8d
call rax
mov r12d, eax
jmp 0x140230822
xor edx, edx
cmp byte [r13 + 0x10], 0
mov rcx, r13
sete dl
call sym.pager_playback
mov byte [r13 + 0x15], 0
mov r12d, eax
jmp 0x140230a21
mov edx, 2
call qword [rax + 0x28]
mov r12d, eax
test eax, eax
jne 0x1402308d3
mov rcx, qword [r13 + 0x50]
mov rax, qword [rcx]
jmp 0x1402308c1
lea rdx, [rsp + 0x3c]
mov rcx, r13
call sym.pagerPagecount
mov r12d, eax
test eax, eax
jne 0x14023053f
cmp dword [rsp + 0x3c], 0
jne 0x140230b52
test rsi, rsi
je 0x140230b9c
mov rcx, qword [r13 + 0x50]
mov byte [rsp + 0x40], 0
lea r14, [rsp + 0x40]
xor r9d, r9d
mov r8d, 1
mov rdx, r14
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r12d, eax
cmp eax, 0x20a
jne 0x140230c74
cmp byte [rsp + 0x40], 0
je 0x140230720
jmp 0x140230876
mov rcx, qword [r13 + 0x50]
mov rax, qword [rcx]
test rax, rax
jne 0x1402308b6
cmp byte [r13 + 8], 0
jne 0x1402308d3
jmp 0x1402309f1
xor edx, edx
mov rcx, r13
call sym.sqlite3PagerOpenWal
mov r12d, eax
jmp 0x140230822
test rsi, rsi
jne 0x140230adf
lea r14, [rsp + 0x40]
mov dword [rsp + 0x40], 0x801
mov r8, qword [r13 + 0x50]
mov rcx, r15
mov qword [rsp + 0x20], r14
mov rdx, qword [r13 + 0xe0]
mov r9d, 0x801
call qword [r15 + 0x28]
mov ebx, eax
test eax, eax
je 0x140230c30
mov r12d, eax
cmp eax, 0xe
jne 0x14023053f
jmp 0x140230876
mov rax, qword [0x1402ba880]
test rax, rax
je 0x140230baa
call rax
movzx eax, byte [r13 + 0x16]
cmp al, 1
jbe 0x140230c1d
cmp al, 5
je 0x140230c1d
mov rax, qword [r15 + 0x30]
test rax, rax
je 0x140230bcf
mov rdx, qword [r13 + 0xe0]
xor r8d, r8d
mov rcx, r15
call rax
cmp byte [r13 + 8], 0
jne 0x140230c06
mov rcx, qword [r13 + 0x48]
mov rax, qword [rcx]
test rax, rax
je 0x140230bfd
cmp byte [r13 + 0x11], 0
jne 0x140230bf1
mov edx, 1
call qword [rax + 0x40]
cmp byte [r13 + 0x16], 5
je 0x140230bfd
mov byte [r13 + 0x16], 1
movzx eax, byte [r13 + 0x10]
mov byte [r13 + 0x17], al
mov rax, qword [0x1402ba888]
test rax, rax
je 0x140230720
call rax
jmp 0x140230720
mov edx, 2
mov rcx, r13
call sym.pagerLockDb.part.0
test eax, eax
je 0x140230bb7
jmp 0x140230c06
mov rcx, qword [r13 + 0x50]
mov byte [rsp + 0x40], 0
xor r9d, r9d
mov rdx, r14
mov r8d, 1
mov rax, qword [rcx]
call qword [rax + 0x10]
mov r12d, eax
cmp eax, 0x20a
je 0x140230c8f
mov rsi, qword [r13 + 0x50]
mov ebx, r12d
mov rax, qword [rsi]
test rax, rax
je 0x140230c74
mov rcx, rsi
mov r12d, ebx
call qword [rax + 8]
mov qword [rsi], 0
movzx eax, byte [rsp + 0x40]
test r12d, r12d
jne 0x14023053f
test al, al
je 0x140230720
jmp 0x140230876
mov rsi, qword [r13 + 0x50]
mov rax, qword [rsi]
test rax, rax
jne 0x140230c64
movzx eax, byte [rsp + 0x40]
jmp 0x140230c82
lea rax, [0x14033123c]
mov r9d, 0xf0fd
lea r8, str.cannot_open_file
mov ecx, 0xe
mov qword [rsp + 0x20], rax
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
mov rbx, qword [r13 + 0x50]
mov rax, qword [rbx]
test rax, rax
je 0x140230cf5
mov rcx, rbx
call qword [rax + 8]
mov rcx, qword [r13 + 0x50]
mov qword [rbx], 0
mov rax, qword [rcx]
test rax, rax
jne 0x1402308b6
cmp byte [r13 + 8], 0
mov r12d, 0xe
je 0x1402309f1
jmp 0x14023053f