Function at 0x466ab9
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, 0x48
xor edi, edi
cmp edx, 1
mov rbx, rcx
mov r13d, edx
setne dil
add edi, r8d
movsxd rsi, edi
mov ebp, edi
imul rsi, rsi, 0x38
mov r12, rsi
cmp ebp, dword [rbx + 0x80]
jge 0x466b05
mov rax, qword [rbx + 0x78]
inc ebp
mov rcx, qword [rax + r12 + 0x10]
add r12, 0x38
call sym.sqlite3BitvecDestroy
jmp 0x466ae7
dec r13d
mov dword [rbx + 0x80], edi
jne 0x466b61
add rsi, qword [rbx + 0x78]
mov ebp, dword [rsi + 0x20]
test ebp, ebp
je 0x466e5d
mov rcx, qword [rbx + 0x58]
xor ebp, ebp
mov rax, qword [rcx]
test rax, rax
je 0x466e5d
lea rdx, [0x004f4ac0]
cmp rax, rdx
jne 0x466b56
mov rax, qword [rbx + 0xc8]
lea rdx, [rax + 4]
mov eax, dword [rsi + 0x1c]
imul rdx, rax
call sym.sqlite3OsTruncate
mov ebp, eax
mov eax, dword [rsi + 0x1c]
mov dword [rbx + 0x3c], eax
jmp 0x466e5d
cmp qword [rbx + 0x128], 0
jne 0x466b7b
mov rax, qword [rbx + 0x50]
xor ebp, ebp
cmp qword [rax], 0
je 0x466e5d
test edi, edi
je 0x466e51
mov rax, qword [rbx + 0x78]
lea rsi, [rax + rsi - 0x38]
test rsi, rsi
je 0x466e51
mov ecx, dword [rsi + 0x18]
mov ebp, 7
call sym.sqlite3BitvecCreate
test rax, rax
mov rdi, rax
je 0x466e5d
mov eax, dword [rsi + 0x18]
mov dword [rbx + 0x20], eax
mov al, byte [rbx + 0x10]
test rsi, rsi
mov byte [rbx + 0x17], al
jne 0x466ca8
mov r12, qword [rbx + 0x128]
test r12, r12
je 0x466ca8
mov eax, dword [rbx + 0x24]
xor ebp, ebp
mov dword [rbx + 0x20], eax
cmp byte [r12 + 0x40], 0
je 0x466c72
mov rdx, qword [r12 + 0x30]
lea rax, [r12 + 0x48]
mov ecx, 0xc
mov rdi, rax
mov r13d, dword [r12 + 0x58]
mov rsi, qword [rdx]
rep movsd dword [rdi], dword [rsi]
mov eax, dword [r12 + 0x58]
lea esi, [rax + 1]
test ebp, ebp
jne 0x466c63
cmp r13d, esi
jb 0x466c63
lea eax, [rsi + 0x1000]
mov rcx, qword [r12 + 0x30]
sub rax, 0xfdf
shr rax, 0xc
test eax, eax
jne 0x466c3c
mov rdx, qword [rcx]
mov eax, esi
lea rax, [rdx + rax*4 + 0x84]
jmp 0x466c53
lea rdx, [rsi*4 + 0x84]
cdqe
and edx, 0x3ffc
add rdx, qword [rcx + rax*8]
mov rax, rdx
mov edx, dword [rax]
mov rcx, rbx
inc esi
call sym.pagerUndoCallback
mov ebp, eax
jmp 0x466c0b
cmp r13d, dword [r12 + 0x58]
je 0x466c72
mov rcx, r12
call sym.walCleanupHash
mov rax, qword [rbx + 0x120]
mov rcx, qword [rax]
call sym.sqlite3PcacheDirtyList.isra.319
test rax, rax
je 0x466e5d
test ebp, ebp
jne 0x466e5d
mov edx, dword [rax + 0x30]
mov rcx, rbx
mov rsi, qword [rax + 0x20]
call sym.pagerUndoCallback
mov ebp, eax
mov rax, rsi
jmp 0x466c81
test rsi, rsi
mov r12, qword [rbx + 0x60]
je 0x466cfe
cmp qword [rbx + 0x128], 0
jne 0x466cfe
mov r13, qword [rsi + 8]
lea r14, [rbx + 0x60]
mov rax, qword [rsi]
test r13, r13
cmove r13, r12
mov qword [rbx + 0x60], rax
cmp qword [rbx + 0x60], r13
jge 0x466d06
mov dword [rsp + 0x20], 1
mov r9d, 1
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call sym.pager_playback_one_page
test eax, eax
mov ebp, eax
je 0x466cd1
jmp 0x466db3
mov qword [rbx + 0x60], 0
lea r13, [rsp + 0x34]
lea r14, [rbx + 0x60]
cmp r12, qword [rbx + 0x60]
jle 0x466da8
xor edx, edx
mov r9, r13
mov r8, r12
mov dword [rsp + 0x34], 0
lea rax, [rsp + 0x38]
mov rcx, rbx
mov qword [rsp + 0x20], rax
call sym.readJournalHdr
cmp dword [rsp + 0x34], 0
mov ebp, eax
jne 0x466d71
mov eax, dword [rbx + 0xb8]
add rax, qword [rbx + 0x68]
cmp rax, qword [rbx + 0x60]
jne 0x466d71
mov rdx, r12
sub rdx, rax
mov rax, rdx
mov rdx, qword [rbx + 0xc8]
lea rcx, [rdx + 8]
cqo
idiv rcx
mov dword [rsp + 0x34], eax
xor r15d, r15d
test ebp, ebp
jne 0x466daa
cmp r15d, dword [rsp + 0x34]
jae 0x466d0f
cmp r12, qword [rbx + 0x60]
jle 0x466d0f
mov dword [rsp + 0x20], 1
mov r9d, 1
mov r8, rdi
mov rdx, r14
mov rcx, rbx
inc r15d
call sym.pager_playback_one_page
mov ebp, eax
jmp 0x466d74
xor ebp, ebp
test rsi, rsi
je 0x466e3f
mov rax, qword [rbx + 0xc8]
mov edx, dword [rsi + 0x1c]
mov rcx, qword [rbx + 0x128]
add rax, 4
imul rax, rdx
test rcx, rcx
mov qword [rsp + 0x38], rax
je 0x466e0f
mov eax, dword [rcx + 0x88]
cmp dword [rsi + 0x30], eax
je 0x466df1
mov dword [rsi + 0x24], 0
mov eax, dword [rcx + 0x88]
mov dword [rsi + 0x30], eax
mov eax, dword [rsi + 0x24]
xor ebp, ebp
cmp eax, dword [rcx + 0x58]
jae 0x466e0f
mov dword [rcx + 0x58], eax
mov eax, dword [rsi + 0x28]
mov dword [rcx + 0x60], eax
mov eax, dword [rsi + 0x2c]
mov dword [rcx + 0x64], eax
call sym.walCleanupHash
mov esi, dword [rsi + 0x1c]
lea r13, [rsp + 0x38]
test ebp, ebp
jne 0x466e3f
cmp esi, dword [rbx + 0x3c]
jae 0x466e3f
mov dword [rsp + 0x20], 1
xor r9d, r9d
mov r8, rdi
inc esi
mov rdx, r13
mov rcx, rbx
call sym.pager_playback_one_page
mov ebp, eax
jmp 0x466e17
mov rcx, rdi
call sym.sqlite3BitvecDestroy
test ebp, ebp
jne 0x466e5d
mov qword [rbx + 0x60], r12
jmp 0x466e5d
mov eax, dword [rbx + 0x24]
xor esi, esi
xor edi, edi
jmp 0x466bb1
mov eax, ebp
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret