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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov r15, qword [rcx + 8]
mov rax, qword [rcx]
mov edi, edx
mov rsi, rcx
mov rbp, r8
mov rbx, qword [r15]
mov qword [r15 + 8], rax
mov dl, byte [rcx + 0x10]
cmp dl, 2
je 0x468f02
dec dl
jne 0x46894e
test edi, edi
je 0x468f49
test byte [rax + 0x33], 2
je 0x468960
cmp byte [rbx + 0x12], 0
jne 0x468960
and word [r15 + 0x28], 0xfffe
mov eax, dword [r15 + 0x28]
test al, 1
je 0x468977
test edi, edi
mov r14d, 8
je 0x468982
jmp 0x468f58
test edi, edi
je 0x468982
cmp byte [r15 + 0x24], 2
je 0x468986
test al, 0x80
je 0x468992
mov rax, qword [r15 + 0x80]
mov rax, qword [rax]
jmp 0x4689b3
cmp edi, 1
jle 0x4689c2
mov rax, qword [r15 + 0x78]
test rax, rax
je 0x4689c2
mov rdx, qword [rax]
cmp rdx, rsi
je 0x4689ad
mov rax, qword [rdx]
jmp 0x4689b3
mov rax, qword [rax + 0x10]
jmp 0x46899b
test rax, rax
mov r14d, 0x106
jne 0x468f58
mov r8d, 1
mov edx, 1
mov rcx, rsi
call sym.querySharedCacheTableLock
test eax, eax
mov r14d, eax
jne 0x468f58
mov eax, dword [r15 + 0x28]
and eax, 0xffffffef
cmp dword [r15 + 0x40], 0
mov word [r15 + 0x28], ax
jne 0x4689fb
or eax, 0x10
mov word [r15 + 0x28], ax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], rax
cmp qword [r15 + 0x18], 0
jne 0x468cbc
mov rcx, qword [r15]
call sym.sqlite3PagerSharedLock
test eax, eax
jne 0x468f50
mov r8, qword [rsp + 0x28]
xor r9d, r9d
mov edx, 1
mov rcx, r15
call sym.btreeGetPage
test eax, eax
jne 0x468f50
mov rax, qword [rsp + 0x48]
mov r14, qword [r15]
mov r13, qword [rax + 0x50]
mov eax, dword [r14 + 0x20]
mov r11d, dword [r13 + 0x1c]
mov dword [rsp + 0x38], eax
bswap r11d
test r11d, r11d
mov r12d, r11d
je 0x468a87
lea rdx, [r13 + 0x5c]
mov r8d, 4
lea rcx, [r13 + 0x18]
call sym.memcmp
test eax, eax
cmovne r12d, dword [rsp + 0x38]
jmp 0x468a8c
mov r12d, dword [rsp + 0x38]
mov rax, qword [r15 + 8]
test byte [rax + 0x33], 2
jne 0x468c24
test r12d, r12d
je 0x468c24
lea rdx, [0x004f4be0]
mov r8d, 0x10
mov rcx, r13
call sym.memcmp
test eax, eax
jne 0x468c92
cmp byte [r13 + 0x12], 2
jbe 0x468acd
or word [r15 + 0x28], 1
cmp byte [r13 + 0x13], 2
ja 0x468c92
jne 0x468b1e
test byte [r15 + 0x28], 0x20
jne 0x468b1e
mov rdx, qword [rsp + 0x30]
mov rcx, r14
mov dword [rsp + 0x44], 0
call sym.sqlite3PagerOpenWal
test eax, eax
mov r14d, eax
jne 0x468c98
mov r14d, dword [rsp + 0x44]
test r14d, r14d
jne 0x468b1e
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x70]
call sym.sqlite3PagerUnrefPageOne
jmp 0x468a0f
lea rcx, [r13 + 0x15]
mov r8d, 3
lea rdx, [0x004e2fcf]
call sym.memcmp
test eax, eax
jne 0x468c92
movzx r14d, byte [r13 + 0x10]
movzx eax, byte [r13 + 0x11]
shl r14d, 8
shl eax, 0x10
or r14d, eax
lea eax, [r14 - 1]
test eax, r14d
jne 0x468c92
lea eax, [r14 - 0x101]
cmp eax, 0xfeff
ja 0x468c92
or word [r15 + 0x28], 2
mov eax, r14d
movzx r8d, byte [r13 + 0x14]
sub eax, r8d
cmp r14d, dword [r15 + 0x34]
je 0x468bce
mov rdx, qword [rsp + 0x48]
mov dword [rsp + 0x3c], r8d
mov dword [rsp + 0x38], eax
mov rcx, qword [rdx + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov eax, dword [rsp + 0x38]
mov dword [r15 + 0x34], r14d
lea rcx, [r15 + 0x88]
mov dword [r15 + 0x38], eax
call sym.freeTempSpace.isra.77
mov r8d, dword [rsp + 0x3c]
lea rdx, [r15 + 0x34]
mov rcx, qword [r15]
call sym.sqlite3PagerSetPagesize
mov r14d, eax
jmp 0x468cae
cmp dword [rsp + 0x38], r12d
jae 0x468bff
mov rdx, qword [r15 + 8]
mov r12d, dword [rsp + 0x38]
mov rdx, qword [rdx + 0x30]
and edx, 0x10000001
dec rdx
je 0x468bff
mov ecx, 0x11994
call sym.sqlite3CorruptError
mov r14d, eax
jmp 0x468c98
cmp eax, 0x1df
jbe 0x468c92
mov dword [r15 + 0x38], eax
cmp dword [r13 + 0x34], 0
setne byte [r15 + 0x21]
cmp dword [r13 + 0x40], 0
setne byte [r15 + 0x22]
jmp 0x468c27
xor r12d, r12d
mov r8d, dword [r15 + 0x38]
mov r10d, 0xff
xor edx, edx
mov dword [r15 + 0x40], r12d
lea eax, [r8 + 0x3fffff4]
shl eax, 6
div r10d
xor edx, edx
lea ecx, [rax - 0x17]
lea eax, [r8 + 0x7fffff4]
sub r8d, 0x23
mov word [r15 + 0x2a], cx
shl eax, 5
mov word [r15 + 0x2e], r8w
div r10d
sub eax, 0x17
cmp cx, 0x7f
mov word [r15 + 0x2c], ax
mov word [r15 + 0x30], ax
mov eax, 0x7f
cmova ecx, eax
mov rax, qword [rsp + 0x48]
xor r14d, r14d
mov byte [r15 + 0x25], cl
mov qword [r15 + 0x18], rax
jmp 0x468a0f
mov r14d, 0x1a
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov qword [r15 + 0x18], 0
test r14d, r14d
je 0x468a0f
jmp 0x468e43
test r14d, r14d
jne 0x468e3e
test edi, edi
je 0x468e3e
test byte [r15 + 0x28], 1
je 0x468cdf
mov r14d, 8
jmp 0x468e43
mov r14d, dword [rbx + 0x30]
test r14d, r14d
jne 0x468e1d
mov rax, qword [rsi]
cmp byte [rax + 0x66], 2
sete byte [rbx + 0x1a]
cmp byte [rbx + 0x15], 1
jne 0x468dfe
mov rax, qword [rbx + 0x128]
test rax, rax
je 0x468dce
cmp byte [rbx + 8], 0
je 0x468d51
cmp byte [rax + 0x3f], 0
jne 0x468d51
mov edx, 4
mov rcx, rbx
call sym.pagerLockDb
test eax, eax
mov r14d, eax
jne 0x468e1d
mov r13, qword [rbx + 0x128]
movsx edx, word [r13 + 0x3c]
mov rcx, r13
add edx, 3
call sym.walUnlockShared
mov byte [r13 + 0x3f], 1
mov r13, qword [rbx + 0x128]
cmp byte [r13 + 0x42], 0
jne 0x468cd4
xor edx, edx
mov r8d, 1
mov rcx, r13
call sym.walLockExclusive
test eax, eax
mov r14d, eax
jne 0x468e1d
mov rax, qword [r13 + 0x30]
mov byte [r13 + 0x40], 1
lea rcx, [r13 + 0x48]
mov r8d, 0x30
mov rdx, qword [rax]
call sym.memcmp
test eax, eax
jne 0x468db7
mov eax, dword [rbx + 0x20]
mov byte [rbx + 0x15], 2
mov qword [rbx + 0x60], 0
mov dword [rbx + 0x2c], eax
mov dword [rbx + 0x28], eax
mov dword [rbx + 0x24], eax
jmp 0x468dfe
mov r8d, 1
xor edx, edx
mov rcx, r13
call sym.walUnlockExclusive
mov byte [r13 + 0x40], 0
jmp 0x468e26
mov edx, 2
mov rcx, rbx
call sym.pagerLockDb
cmp edi, 1
mov r14d, eax
jle 0x468df7
test eax, eax
jne 0x468df7
mov edx, 4
mov rcx, rbx
call sym.pager_wait_on_lock
mov r14d, eax
test r14d, r14d
je 0x468d9d
jmp 0x468e1d
cmp dword [r15 + 0x40], 0
je 0x468e10
cmp byte [rsi + 0x10], 0
je 0x468e75
jmp 0x468e93
mov rcx, r15
call sym.newDatabase.part.597
mov r14d, eax
jmp 0x468e3e
cmp r14d, 0x205
jne 0x468e43
cmp byte [r15 + 0x24], 1
sbb r14d, r14d
and r14d, 0xfffffe00
add r14d, 0x205
jmp 0x468e43
test r14d, r14d
je 0x468e05
mov rcx, r15
call sym.unlockBtreeIfUnused
cmp r14b, 5
jne 0x468f58
cmp byte [r15 + 0x24], 0
jne 0x468f58
mov rcx, r15
call sym.btreeInvokeBusyHandler
test eax, eax
jne 0x468a0f
jmp 0x468f58
inc dword [r15 + 0x3c]
cmp byte [rsi + 0x11], 0
je 0x468e93
mov byte [rsi + 0x3c], 1
mov rax, qword [r15 + 0x78]
mov qword [rsi + 0x40], rax
lea rax, [rsi + 0x30]
mov qword [r15 + 0x78], rax
test edi, edi
setne al
inc eax
mov byte [rsi + 0x10], al
cmp byte [r15 + 0x24], al
jae 0x468ea7
mov byte [r15 + 0x24], al
test edi, edi
je 0x468f49
mov eax, dword [r15 + 0x28]
mov qword [r15 + 0x80], rsi
mov r12, qword [r15 + 0x18]
and eax, 0xffffffbf
mov edx, eax
or edx, 0x40
cmp edi, 2
cmovge eax, edx
mov word [r15 + 0x28], ax
mov rax, qword [r12 + 0x50]
mov eax, dword [rax + 0x1c]
bswap eax
cmp dword [r15 + 0x40], eax
je 0x468f20
mov rcx, qword [r12 + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
mov r14d, eax
jne 0x468f58
mov eax, dword [r15 + 0x40]
mov rdx, qword [r12 + 0x50]
bswap eax
mov dword [rdx + 0x1c], eax
jmp 0x468f20
test r8, r8
je 0x468f17
mov rax, qword [r15 + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [rbp], eax
test edi, edi
jne 0x468f25
xor r14d, r14d
jmp 0x468f58
test rbp, rbp
jne 0x468f07
mov rax, qword [rsi]
mov edx, dword [rax + 0x2f0]
cmp edx, dword [rbx + 0x80]
jle 0x468f1b
cmp byte [rbx + 0xa], 0
je 0x468f1b
mov rcx, rbx
call sym.pagerOpenSavepoint
mov r14d, eax
jmp 0x468f58
test rbp, rbp
jne 0x468f07
jmp 0x468f1b
mov r14d, eax
jmp 0x468e43
mov eax, r14d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret