Function at 0x46d7d0
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, 0xc8
mov rax, qword [rcx + 8]
test byte [rcx + 1], 0x20
mov rbx, rcx
mov r12, rdx
mov dword [rsp + 0x120], r8d
mov dword [rsp + 0x84], r9d
mov qword [rsp + 0x40], rax
je 0x46d846
mov rax, qword [rax + 8]
mov r8, rbx
mov edx, dword [rcx + 0x50]
mov rcx, qword [rax + 0x10]
call sym.saveAllCursors.isra.601
test eax, eax
mov r13d, eax
mov dword [rsp + 0x80], eax
jne 0x46e29d
cmp dword [rsp + 0x84], 0
je 0x46d846
cmp byte [rbx + 0x54], 0
mov ecx, 0x13071
js 0x46df63
cmp byte [rbx], 2
ja 0x46d85d
mov rdx, qword [rbx + 0x80]
test rdx, rdx
jne 0x46d91a
jmp 0x46d87b
mov rcx, rbx
call sym.moveToRoot
test eax, 0xffffffef
mov r13d, eax
mov dword [rsp + 0x80], eax
je 0x46d84b
jmp 0x46e29d
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x13], 0
je 0x46d899
mov edx, dword [rbx + 0x50]
xor r9d, r9d
mov rcx, rax
mov r8, qword [r12 + 8]
call sym.invalidateIncrblobCursors
test byte [rbx + 1], 2
je 0x46d8d0
mov rax, qword [rbx + 0x30]
cmp qword [r12 + 8], rax
jne 0x46d8d0
cmp word [rbx + 0x46], 0
je 0x46da1f
mov eax, dword [r12 + 0x28]
mov rdx, r12
add eax, dword [r12 + 0x24]
cmp dword [rbx + 0x40], eax
jne 0x46da1f
jmp 0x46da12
cmp dword [rsp + 0x84], 0
jne 0x46da1f
mov rdx, qword [r12 + 8]
lea r9, [rsp + 0x84]
mov rcx, rbx
mov r8d, dword [rsp + 0x120]
shr r8d, 3
and r8d, 1
call sym.sqlite3BtreeTableMoveto
test eax, eax
mov r13d, eax
mov dword [rsp + 0x80], eax
je 0x46da1f
jmp 0x46e29d
cmp dword [rsp + 0x84], 0
jne 0x46da1f
test byte [rsp + 0x120], 2
je 0x46d974
mov rcx, rbx
call sym.getCellInfo
mov rax, qword [r12 + 8]
cmp qword [rbx + 0x30], rax
jne 0x46da1f
mov rdx, qword [r12]
mov dword [rsp + 0xb4], eax
mov dword [rsp + 0xb8], 0
mov qword [rsp + 0xa0], rdx
lea rdx, [rsp + 0x90]
jmp 0x46da12
mov eax, dword [r12 + 0x20]
lea r8, [rsp + 0x84]
test ax, ax
je 0x46d9c5
mov qword [rsp + 0x90], rdx
mov rdx, qword [r12 + 0x18]
mov rcx, rbx
mov word [rsp + 0xac], ax
mov byte [rsp + 0xae], 0
mov byte [rsp + 0xb2], 0
mov qword [rsp + 0x98], rdx
lea rdx, [rsp + 0x90]
call sym.sqlite3BtreeIndexMoveto
jmp 0x46d9eb
mov r9d, dword [rsp + 0x120]
mov qword [rsp + 0x20], r8
mov rcx, rbx
mov r8, qword [r12 + 8]
mov rdx, qword [r12]
shr r9d, 3
and r9d, 1
call sym.btreeMoveto
mov dword [rsp + 0x80], eax
mov r13d, dword [rsp + 0x80]
test r13d, r13d
jne 0x46e29d
cmp dword [rsp + 0x84], 0
jne 0x46da1f
jmp 0x46d932
mov rcx, rbx
call sym.btreeOverwriteCell
jmp 0x46df68
mov r15, qword [rbx + 0x88]
cmp dword [r15 + 0x14], 0
js 0x46da59
mov rax, qword [rsp + 0x40]
mov rdx, qword [rax + 8]
mov rax, qword [rdx + 0x88]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x120]
and eax, 0x80
mov dword [rsp + 0x60], eax
jne 0x46da8b
jmp 0x46db2c
cmp byte [rbx], 1
jbe 0x46da6a
mov ecx, 0x130ec
call sym.sqlite3CorruptError
jmp 0x46da72
mov rcx, r15
call sym.btreeComputeFreeSpace
mov dword [rsp + 0x80], eax
mov r13d, dword [rsp + 0x80]
test r13d, r13d
je 0x46da2d
jmp 0x46e29d
cmp dword [rdx + 0x90], 4
mov ebp, 4
mov dword [rsp + 0x80], 0
cmovge ebp, dword [rdx + 0x90]
cmp byte [rdx + 0x21], 0
je 0x46de38
movzx eax, word [r15 + 0xe]
cmp eax, ebp
jge 0x46de38
lea r8, [rsp + 0x90]
mov rdx, qword [rsp + 0x30]
mov rcx, r15
call qword [r15 + pe_nt_image_headers64]
movzx eax, word [rsp + 0xa4]
cmp dword [rsp + 0xa0], eax
je 0x46de38
mov rsi, qword [rsp + 0x30]
movsxd rax, ebp
mov r8d, 3
mov r9d, dword [r15 + 4]
mov edx, dword [rsi + rax - 4]
mov rax, qword [rsp + 0x40]
bswap edx
mov rcx, qword [rax + 8]
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
call sym.ptrmapPut
cmp dword [rsp + 0x80], 0
jmp 0x46de32
movzx r14d, byte [r15 + 0xa]
mov rcx, qword [rsp + 0x30]
add rcx, r14
cmp byte [r15 + 1], 0
je 0x46db8c
mov eax, dword [r12 + 0x24]
mov r13d, dword [r12 + 0x28]
mov dword [rsp + 0x3c], eax
add r13d, eax
mov rax, qword [r12 + 0x10]
cmp r13d, 0x7f
mov qword [rsp + 0x48], rax
ja 0x46db68
mov byte [rcx], r13b
mov al, 1
jmp 0x46db70
movsxd rdx, r13d
call sym.sqlite3PutVarint
movzx ebp, al
mov rdx, qword [r12 + 8]
add ebp, r14d
movsxd rcx, ebp
add rcx, qword [rsp + 0x30]
call sym.sqlite3PutVarint
add ebp, eax
jmp 0x46dbbc
mov rsi, qword [r12 + 8]
mov rax, qword [r12]
cmp esi, 0x7f
mov r13d, esi
mov qword [rsp + 0x48], rax
ja 0x46dba9
mov byte [rcx], sil
mov al, 1
jmp 0x46dbb1
movsxd rdx, esi
call sym.sqlite3PutVarint
movzx eax, al
mov dword [rsp + 0x3c], esi
lea ebp, [rax + r14]
movzx r11d, word [r15 + 0xe]
movsxd r8, ebp
add r8, qword [rsp + 0x30]
cmp r11d, r13d
jl 0x46dbfc
add ebp, r13d
mov ecx, 4
mov rdi, r8
mov rsi, qword [rsp + 0x48]
cmp ebp, 4
cmovl ebp, ecx
movsxd rcx, dword [rsp + 0x3c]
xor eax, eax
rep movsb byte [rdi], byte [rsi]
sub r13d, dword [rsp + 0x3c]
movsxd rcx, r13d
rep stosb byte [rdi], al
jmp 0x46de25
mov r14, qword [r15 + 0x48]
mov eax, r13d
xor edx, edx
mov dword [rsp + 0x8c], 0
mov qword [rsp + 0x50], 0
movzx r9d, word [r15 + 0x10]
mov edi, dword [r14 + 0x38]
sub eax, r9d
lea ecx, [rdi - 4]
div ecx
add edx, r9d
cmp r11d, edx
cmovl edx, r9d
lea eax, [rbp + rdx]
lea ebp, [rax + 4]
cdqe
add rax, qword [rsp + 0x30]
mov qword [rsp + 0x58], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x78], rax
cmp r13d, edx
mov r9d, edx
cmovle r9d, r13d
cmp dword [rsp + 0x3c], r9d
jl 0x46dc8e
movsxd rcx, r9d
mov rdi, r8
mov rsi, qword [rsp + 0x48]
rep movsb byte [rdi], byte [rsi]
jmp 0x46dcb4
cmp dword [rsp + 0x3c], 0
jle 0x46dcaa
mov ecx, dword [rsp + 0x3c]
mov rdi, r8
mov rsi, qword [rsp + 0x48]
rep movsb byte [rdi], byte [rsi]
mov r9d, dword [rsp + 0x3c]
jmp 0x46dcb4
movsxd rcx, r9d
xor eax, eax
mov rdi, r8
rep stosb byte [rdi], al
sub r13d, r9d
test r13d, r13d
jle 0x46de1b
sub dword [rsp + 0x3c], r9d
movsxd rax, r9d
add qword [rsp + 0x48], rax
sub edx, r9d
je 0x46dcd7
add r8, rax
jmp 0x46dc6e
mov qword [rsp + 0x90], 0
cmp byte [r14 + 0x21], 0
mov esi, dword [rsp + 0x8c]
jne 0x46dd2b
mov r8, qword [rsp + 0x68]
mov dword [rsp + 0x20], 0
mov rcx, r14
mov r9d, dword [rsp + 0x8c]
mov rdx, qword [rsp + 0x70]
call sym.allocateBtreePage
cmp byte [r14 + 0x21], 0
mov dword [rsp + 0x88], eax
je 0x46dda8
test eax, eax
jne 0x46dda8
jmp 0x46dd67
mov eax, dword [0x004d3ad0]
mov dword [rsp + 0x64], eax
mov r11d, dword [rsp + 0x8c]
mov rcx, r14
lea edi, [r11 + 1]
mov edx, edi
mov dword [rsp + 0x8c], edi
call sym.ptrmapPageno
cmp edi, eax
je 0x46dd35
mov eax, dword [rsp + 0x64]
xor edx, edx
div dword [r14 + 0x34]
cmp r11d, eax
je 0x46dd35
jmp 0x46dcf1
mov rax, qword [rsp + 0x78]
test esi, esi
mov r9d, esi
mov rcx, r14
mov edx, dword [rsp + 0x8c]
setne r8b
add r8d, 3
and r8d, 7
mov qword [rsp + 0x20], rax
call sym.ptrmapPut
cmp dword [rsp + 0x88], 0
je 0x46ddc9
mov rcx, qword [rsp + 0x90]
call sym.releasePage
cmp dword [rsp + 0x88], 0
je 0x46ddc9
mov rcx, qword [rsp + 0x50]
call sym.releasePage
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0x60], eax
jmp 0x46de25
mov eax, dword [rsp + 0x8c]
mov rdi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
bswap eax
mov dword [rdi], eax
call sym.releasePage
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x50], rax
mov rax, qword [rax + 0x50]
mov dword [rax], 0
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x90]
mov r8, qword [rax + 0x50]
mov eax, dword [r14 + 0x38]
add r8, 4
lea edx, [rax - 4]
jmp 0x46dc6e
mov rcx, qword [rsp + 0x50]
call sym.releasePage
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x80], eax
test eax, eax
jne 0x46e295
movzx esi, word [rbx + 0x56]
mov word [rbx + 0x46], 0
cmp dword [rsp + 0x84], 0
mov eax, esi
mov dword [rsp + 0x3c], esi
jne 0x46dfa4
cmp si, word [r15 + 0x18]
mov ecx, 0x13113
jae 0x46df63
mov rcx, qword [r15 + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
mov r13d, eax
mov dword [rsp + 0x80], eax
jne 0x46e295
mov eax, dword [rsp + 0x3c]
mov rdx, qword [r15 + 0x60]
add eax, eax
cdqe
movzx edi, word [rdx + rax]
rol di, 8
and di, word [r15 + 0x1a]
movzx edi, di
add rdi, qword [r15 + 0x50]
cmp byte [r15 + 8], 0
mov r14, rdi
jne 0x46deb4
mov eax, dword [rdi]
mov rdi, qword [rsp + 0x30]
mov dword [rdi], eax
lea rsi, [rsp + 0x90]
mov rdx, r14
mov rcx, r15
mov r8, rsi
call qword [r15 + pe_nt_image_headers64]
movzx eax, word [rsp + 0xa4]
cmp eax, dword [rsp + 0xa0]
je 0x46def4
mov r8, rsi
mov rdx, r14
mov rcx, r15
call sym.clearCellOverflow
mov dword [rsp + 0x80], eax
jmp 0x46deff
mov dword [rsp + 0x80], 0
movzx r8d, word [rsp + 0xa6]
and byte [rbx + 1], 0xfb
cmp r8d, ebp
jne 0x46df81
movzx eax, word [rsp + 0xa4]
cmp eax, dword [rsp + 0xa0]
jne 0x46df81
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
cmp byte [rax + 0x21], 0
je 0x46df3a
movzx eax, word [r15 + 0x10]
cmp eax, ebp
jle 0x46df81
movzx eax, byte [r15 + 9]
mov ecx, 0x1312e
mov rdx, qword [r15 + 0x50]
lea rax, [rdx + rax + 0xa]
cmp r14, rax
jb 0x46df63
movsxd rax, ebp
add rax, r14
cmp qword [r15 + 0x58], rax
jae 0x46df70
mov ecx, 0x13131
call sym.sqlite3CorruptError
mov r13d, eax
jmp 0x46e29d
mov ecx, ebp
mov rdi, r14
mov rsi, qword [rsp + 0x30]
rep movsb byte [rdi], byte [rsi]
jmp 0x46e29d
mov edx, dword [rsp + 0x3c]
lea r9, [rsp + 0x80]
mov rcx, r15
call sym.dropCell
cmp dword [rsp + 0x80], 0
je 0x46dfbf
jmp 0x46e295
jns 0x46dfbf
cmp word [r15 + 0x18], 0
je 0x46dfbf
and byte [rbx + 1], 0xfd
inc eax
mov word [rbx + 0x56], ax
movzx eax, ax
mov dword [rsp + 0x3c], eax
lea eax, [rbp + 1]
cmp eax, dword [r15 + 0x14]
jl 0x46dff0
movzx eax, byte [r15 + 0xc]
xor r14d, r14d
mov rsi, qword [rsp + 0x30]
mov edi, dword [rsp + 0x3c]
lea edx, [rax + 1]
mov byte [r15 + 0xc], dl
mov qword [r15 + rax*8 + 0x28], rsi
mov word [r15 + rax*2 + 0x1c], di
jmp 0x46e20b
mov rcx, qword [r15 + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
mov r14d, eax
jne 0x46e20b
mov r13, qword [r15 + 0x50]
movzx esi, byte [r15 + 9]
mov dword [rsp + 0x90], 0
movzx edx, word [r15 + 0x18]
movzx eax, word [r15 + 0x12]
lea rdi, [r13 + rsi + 5]
mov r9w, word [rdi]
lea r11d, [rax + rdx*2]
rol r9w, 8
movzx r9d, r9w
cmp r11d, r9d
jle 0x46e056
test r9d, r9d
jne 0x46e04f
mov rax, qword [r15 + 0x48]
cmp dword [rax + 0x38], 0x10000
je 0x46e072
mov ecx, 0x11370
jmp 0x46e065
mov rax, qword [r15 + 0x48]
cmp r9d, dword [rax + 0x38]
jle 0x46e078
mov ecx, 0x11373
call sym.sqlite3CorruptError
xor r9d, r9d
jmp 0x46e153
mov r9d, 0x10000
cmp byte [r13 + rsi + 2], 0
jne 0x46e098
cmp byte [r13 + rsi + 1], 0
jne 0x46e098
lea eax, [rbp + r11 + 2]
cmp r9d, eax
jge 0x46e144
jmp 0x46e100
lea eax, [r11 + 1]
cmp eax, r9d
jge 0x46e088
lea r8, [rsp + 0x90]
mov edx, ebp
mov rcx, r15
mov dword [rsp + 0x48], r9d
mov dword [rsp + 0x40], r11d
call sym.pageFindSlot
mov r11d, dword [rsp + 0x40]
test rax, rax
mov r9d, dword [rsp + 0x48]
je 0x46e0f0
sub rax, r13
cmp r11d, eax
mov r9d, eax
jl 0x46e15b
mov ecx, 0x11384
mov dword [rsp + 0x40], eax
call sym.sqlite3CorruptError
mov r9d, dword [rsp + 0x40]
jmp 0x46e153
mov eax, dword [rsp + 0x90]
test eax, eax
je 0x46e088
jmp 0x46e208
mov edx, dword [r15 + 0x14]
lea eax, [rbp + 2]
mov rcx, r15
sub edx, eax
mov eax, 4
cmp edx, 4
cmovg edx, eax
call sym.defragmentPage
test eax, eax
mov dword [rsp + 0x90], eax
jne 0x46e208
movzx eax, byte [rdi]
movzx r9d, byte [r13 + rsi + 6]
shl eax, 8
or r9d, eax
dec r9d
movzx r9d, r9w
inc r9d
sub r9d, ebp
mov eax, r9d
mov byte [rdi], ah
mov byte [r13 + rsi + 6], r9b
jmp 0x46e15b
test eax, eax
jne 0x46e208
lea eax, [rbp + 2]
mov rsi, qword [rsp + 0x30]
movsxd rcx, ebp
mov dword [rsp + 0x40], r9d
movzx eax, ax
sub dword [r15 + 0x14], eax
movsxd rax, r9d
add rax, r13
mov rdi, rax
mov eax, dword [rsp + 0x3c]
rep movsb byte [rdi], byte [rsi]
movzx r8d, word [r15 + 0x18]
lea esi, [rax + rax]
movsxd rsi, esi
add rsi, qword [r15 + 0x60]
sub r8d, eax
add r8d, r8d
lea rcx, [rsi + 2]
mov rdx, rsi
movsxd r8, r8d
call sym.memmove
mov r9d, dword [rsp + 0x40]
rol r9w, 8
mov word [rsi], r9w
movzx eax, byte [r15 + 9]
inc word [r15 + 0x18]
lea rdx, [r13 + rax + 4]
inc byte [rdx]
jne 0x46e1d0
movzx eax, byte [r15 + 9]
inc byte [r13 + rax + 3]
mov rax, qword [r15 + 0x48]
cmp byte [rax + 0x21], 0
je 0x46e20b
mov r8, qword [rsp + 0x30]
lea rdx, [r15 + 0x58]
mov rcx, r15
mov dword [rsp + 0x90], 0
lea r9, [rsp + 0x90]
call sym.ptrmapPutOvflPtr.isra.613
mov r14d, dword [rsp + 0x90]
jmp 0x46e20b
mov r14d, eax
cmp byte [r15 + 0xc], 0
mov dword [rsp + 0x80], r14d
je 0x46e295
and byte [rbx + 1], 0xfd
mov rcx, rbx
call sym.balance
mov rdx, qword [rbx + 0x88]
test byte [rsp + 0x120], 2
mov dword [rsp + 0x80], eax
mov byte [rdx + 0xc], 0
mov byte [rbx], 1
je 0x46e295
test eax, eax
jne 0x46e295
mov rcx, rbx
call sym.btreeReleaseAllCursorPages
cmp qword [rbx + 0x80], 0
je 0x46e289
mov rcx, qword [r12 + 8]
call sym.sqlite3Malloc
test rax, rax
mov qword [rbx + 0x18], rax
jne 0x46e27b
mov dword [rsp + 0x80], 7
jmp 0x46e289
mov rsi, qword [r12]
mov rdi, rax
mov rcx, qword [r12 + 8]
rep movsb byte [rdi], byte [rsi]
mov byte [rbx], 3
mov rax, qword [r12 + 8]
mov qword [rbx + 0x48], rax
mov r13d, dword [rsp + 0x80]
mov eax, r13d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret