Function at 0x1402d4c20
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, 0x88
movzx eax, byte [rcx]
mov r15, qword [rcx + 8]
test al, al
mov rbx, rcx
mov esi, edx
mov r12, qword [r15 + 8]
je 0x1402d4c69
cmp al, 2
jbe 0x1402d4f30
call sym.btreeRestoreCursorPosition
test eax, eax
mov dword [rsp + 0x5c], eax
jne 0x1402d4d69
cmp byte [rbx], 0
jne 0x1402d4d69
mov r13, qword [rbx + 0x88]
movzx ebp, word [rbx + 0x56]
movzx eax, byte [rbx + 0x54]
cmp bp, word [r13 + 0x18]
mov edi, ebp
mov byte [rsp + 0x3c], al
jae 0x1402d5200
mov rdx, qword [r13 + 0x60]
lea eax, [rbp + rbp]
cdqe
mov ecx, dword [r13 + 0x14]
movzx r14d, word [rdx + rax]
rol r14w, 8
and r14w, word [r13 + 0x1a]
movzx r14d, r14w
add r14, qword [r13 + 0x50]
test ecx, ecx
js 0x1402d4e80
and esi, 2
movzx eax, byte [r13 + 8]
jne 0x1402d4d80
cmp byte [r13 + 8], 0
movzx eax, byte [rbx + 1]
je 0x1402d4dfe
test al, 0x20
jne 0x1402d5100
cmp qword [rbx + 0x80], 0
je 0x1402d5170
mov rcx, qword [r13 + 0x70]
test byte [rcx + 0x34], 4
mov rdx, qword [rcx + 0x28]
je 0x1402d4e48
mov eax, dword [rcx + 0x30]
cmp dword [rdx + 0x20], eax
jb 0x1402d4e48
mov eax, dword [rdx + 0x80]
test eax, eax
jne 0x1402d5330
lea r8, [rsp + 0x60]
mov rdx, r14
mov rcx, r13
call qword [r13 + pe_nt_image_headers64]
movzx edx, word [rsp + 0x74]
mov r9d, dword [rsp + 0x70]
mov eax, edx
cmp edx, r9d
je 0x1402d4f68
movzx r8d, word [rsp + 0x76]
mov rdx, qword [r13 + 0x58]
mov rcx, qword [r13 + 0x48]
mov word [rsp + 0x20], ax
mov word [rsp + 0x28], r8w
mov r8, r14
call sym.clearCellOverflow.isra.0
test eax, eax
mov dword [rsp + 0x5c], eax
je 0x1402d4f70
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test al, al
je 0x1402d4dc8
mov esi, dword [r13 + 0x14]
mov rdx, r14
mov rcx, r13
call qword [r13 + 0x78]
mov ecx, 0xaaaaaaab
movzx eax, ax
lea edx, [rsi + rax + 1]
mov eax, dword [r12 + 0x38]
add eax, eax
mov eax, eax
imul rax, rcx
shr rax, 0x21
cmp edx, eax
jge 0x1402d4dc8
cmp word [r13 + 0x18], 1
mov esi, 2
jne 0x1402d4cc4
nop dword [rax]
cmp byte [rbx + 0x55], 0
je 0x1402d4ec0
mov rcx, rbx
call sym.getCellInfo
mov rax, qword [rbx + 0x30]
mov qword [rbx + 0x48], rax
cmp byte [r13 + 8], 0
mov dword [rsp + 0x5c], 0
mov esi, 1
movzx eax, byte [rbx + 1]
jne 0x1402d4cd3
and eax, 0xfffffff1
xor edx, edx
cmp byte [rbx], 0
mov byte [rbx + 1], al
mov word [rbx + 0x46], dx
jne 0x1402d51d0
movzx edx, word [rbx + 0x56]
test dx, dx
je 0x1402d51d0
mov rcx, qword [rbx + 0x88]
cmp byte [rcx + 8], 0
je 0x1402d51d0
sub edx, 1
mov dword [rsp + 0x5c], 0
mov word [rbx + 0x56], dx
jmp 0x1402d4cd3
mov eax, dword [rdx + 0x30]
test eax, eax
jne 0x1402d4d69
mov eax, dword [rdx + 0xb8]
cmp dword [rdx + 0xc8], eax
jae 0x1402d51f0
call sym.pagerWriteLargeSector
test eax, eax
mov dword [rsp + 0x5c], eax
je 0x1402d4d15
jmp 0x1402d4d69
mov rcx, r13
call sym.btreeComputeFreeSpace
test eax, eax
je 0x1402d4cb6
lea rax, [0x14046bfcc]
mov r9d, 0x13057
mov ecx, 0xb
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
jmp 0x1402d4f5a
mov rcx, rbx
call sym.getCellInfo
mov ecx, dword [rbx + 0x40]
mov qword [rbx + 0x48], rcx
add rcx, 0x11
call sym.sqlite3Malloc
mov rsi, rax
mov eax, 7
test rsi, rsi
je 0x1402d4d69
mov dword [rsp + 0x20], 0
xor edx, edx
mov r9, rsi
mov rcx, rbx
mov r8d, dword [rbx + 0x48]
call sym.accessPayload
test eax, eax
jne 0x1402d5270
mov rax, qword [rbx + 0x48]
add rax, rsi
mov qword [rax], 0
mov qword [rax + 8], 0
mov byte [rax + 0x10], 0
mov qword [rbx + 0x18], rsi
jmp 0x1402d4de2
lea rax, [0x14046bfcc]
mov r9d, 0x1304a
mov ecx, 0xb
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
mov eax, 0xb
jmp 0x1402d4d69
mov dword [rsp + 0x5c], 0
movzx r8d, word [rsp + 0x76]
lea r14, [rsp + 0x5c]
mov edx, ebp
mov rcx, r13
mov r9, r14
call sym.dropCell.part.0
mov eax, dword [rsp + 0x5c]
test eax, eax
jne 0x1402d4d69
mov r15, qword [rbx + 0x88]
cmp byte [r13 + 8], 0
mov eax, dword [r15 + 0x14]
jne 0x1402d509c
test eax, eax
js 0x1402d5340
movsx edx, byte [rbx + 0x54]
movsx eax, byte [rsp + 0x3c]
sub edx, 1
cmp edx, eax
jg 0x1402d5250
mov rax, qword [rbx + 0x88]
mov eax, dword [rax + 4]
mov dword [rsp + 0x48], eax
movzx edx, word [r15 + 0x18]
mov rcx, qword [r15 + 0x60]
mov rax, qword [r15 + 0x50]
lea edx, [rdx + rdx - 2]
movsxd rdx, edx
movzx edx, word [rcx + rdx]
rol dx, 8
and dx, word [r15 + 0x1a]
movzx edx, dx
add rdx, rax
add rax, 4
cmp rdx, rax
jb 0x1402d5367
mov qword [rsp + 0x40], rdx
mov rcx, r15
call qword [r15 + 0x78]
mov rcx, qword [r15 + 0x70]
mov r12, qword [r12 + 0x88]
mov word [rsp + 0x4e], ax
call sym.sqlite3PagerWrite
mov rdx, qword [rsp + 0x40]
test eax, eax
mov dword [rsp + 0x5c], eax
jne 0x1402d4d69
mov eax, dword [rsp + 0x48]
lea r8, [rdx - 4]
mov qword [rsp + 0x20], r12
mov edx, ebp
movzx r10d, word [rsp + 0x4e]
mov rcx, r13
mov dword [rsp + 0x28], eax
lea r9d, [r10 + 4]
mov dword [rsp + 0x40], r10d
call sym.insertCell
movzx edx, word [r15 + 0x18]
mov dword [rsp + 0x5c], eax
sub edx, 1
test eax, eax
jne 0x1402d4d69
mov r8d, dword [rsp + 0x40]
mov r9, r14
mov rcx, r15
call sym.dropCell.part.0
mov eax, dword [rsp + 0x5c]
test eax, eax
jne 0x1402d4d69
mov r15, qword [rbx + 0x88]
mov eax, dword [r15 + 0x14]
lea edx, [rax + rax*2]
mov rax, qword [rbx + 0x20]
mov eax, dword [rax + 0x38]
add eax, eax
cmp edx, eax
jg 0x1402d5230
mov dword [rsp + 0x5c], 0
movzx eax, byte [rsp + 0x3c]
cmp al, byte [rbx + 0x54]
jl 0x1402d52c0
cmp sil, 2
jne 0x1402d5288
mov byte [rbx], 2
movzx eax, word [r13 + 0x18]
cmp di, ax
jb 0x1402d5359
sub eax, 1
mov dword [rbx + 4], 0xffffffff
mov word [rbx + 0x56], ax
xor eax, eax
jmp 0x1402d4d69
mov rcx, qword [r12 + 0x10]
mov edx, dword [rbx + 0x50]
test rcx, rcx
je 0x1402d512b
test edx, edx
je 0x1402d5149
nop dword [rax]
cmp rcx, rbx
je 0x1402d5122
cmp edx, dword [rcx + 0x50]
je 0x1402d514e
mov rcx, qword [rcx + 0x28]
test rcx, rcx
jne 0x1402d5118
and eax, 0xffffffdf
mov dword [rsp + 0x5c], 0
mov byte [rbx + 1], al
jmp 0x1402d4cdb
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x1402d512b
cmp rbx, rcx
je 0x1402d5140
mov r8, rbx
call sym.saveCursorsOnList
test eax, eax
mov dword [rsp + 0x5c], eax
jne 0x1402d4d69
jmp 0x1402d4cdb
cmp byte [r15 + 0x13], 0
je 0x1402d4ce9
mov rax, qword [r15 + 8]
mov rcx, qword [rbx + 0x30]
mov edx, dword [rbx + 0x50]
mov byte [r15 + 0x13], 0
mov rax, qword [rax + 0x10]
test rax, rax
jne 0x1402d51ad
jmp 0x1402d4ce9
mov rax, qword [rax + 0x28]
test rax, rax
je 0x1402d4ce9
test byte [rax + 1], 0x10
je 0x1402d51a0
mov byte [r15 + 0x13], 1
cmp edx, dword [rax + 0x50]
jne 0x1402d51a0
cmp rcx, qword [rax + 0x30]
jne 0x1402d51a0
mov byte [rax], 1
jmp 0x1402d51a0
mov rcx, rbx
call sym.btreePrevious.constprop.0
test eax, eax
mov dword [rsp + 0x5c], eax
jne 0x1402d4d69
movzx eax, byte [rbx + 1]
jmp 0x1402d4cd3
call sym.pager_write
jmp 0x1402d4e6a
lea rax, [0x14046bfcc]
mov r9d, 0x13053
mov ecx, 0xb
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
jmp 0x1402d4f5a
mov rcx, rbx
call sym.balance
test eax, eax
mov dword [rsp + 0x5c], eax
jne 0x1402d4d69
jmp 0x1402d50bc
add eax, 1
cdqe
mov rax, qword [rbx + rax*8 + 0x90]
mov eax, dword [rax + 4]
mov dword [rsp + 0x48], eax
jmp 0x1402d4fd4
mov rcx, rsi
mov dword [rsp + 0x3c], eax
call sym.sqlite3_free
mov eax, dword [rsp + 0x3c]
jmp 0x1402d4d69
mov rcx, rbx
call sym.moveToRoot
test sil, sil
mov dword [rsp + 0x5c], eax
je 0x1402d52b2
cmp byte [rbx + 0x54], 0
js 0x1402d52af
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call sym.btreeReleaseAllCursorPages.part.0
mov eax, dword [rsp + 0x3c]
mov byte [rbx], 3
cmp eax, 0x10
jne 0x1402d4d69
jmp 0x1402d50f3
mov rax, qword [rbx + 0x88]
mov rcx, qword [rax + 0x70]
call sym.sqlite3PagerUnrefNotNull
movzx eax, byte [rbx + 0x54]
sub eax, 1
mov byte [rbx + 0x54], al
jmp 0x1402d52fc
lea ecx, [rax - 1]
sub rax, 1
test rdx, rdx
mov byte [rbx + 0x54], cl
je 0x1402d5300
mov rcx, qword [rdx + 0x70]
call sym.sqlite3PagerUnrefNotNull
movzx eax, byte [rbx + 0x54]
movsx rax, al
cmp byte [rsp + 0x3c], al
mov rdx, qword [rbx + rax*8 + 0x90]
jl 0x1402d52e0
mov qword [rbx + 0x88], rdx
mov rcx, rbx
call sym.balance
test eax, eax
mov dword [rsp + 0x5c], eax
je 0x1402d50ca
jmp 0x1402d4d69
call sym.subjournalPageIfRequired
jmp 0x1402d4e6a
mov rcx, r15
call sym.btreeComputeFreeSpace
test eax, eax
mov dword [rsp + 0x5c], eax
je 0x1402d4fb2
jmp 0x1402d4d69
mov dword [rbx + 4], 1
xor eax, eax
jmp 0x1402d4d69
lea rax, [0x14046bfcc]
mov r9d, 0x130b2
mov ecx, 0xb
mov qword [rsp + 0x20], rax
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
call sym.sqlite3_log
jmp 0x1402d4f5a