Function at 0x1402153a0
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]
mov dword [rsp + 0x58], r8d
mov rbx, rcx
mov r12, rdx
mov esi, r9d
mov dword [rsp + 0x84], r9d
mov qword [rsp + 0x40], rax
test byte [rcx + 1], 0x20
je 0x140215410
mov rax, qword [rax + 8]
mov edx, dword [rcx + 0x50]
mov r8, rbx
mov rcx, qword [rax + 0x10]
call sym.saveAllCursors.isra.0
mov dword [rsp + 0x80], eax
mov r14d, eax
test eax, eax
jne 0x140215e6e
test esi, esi
je 0x140215410
cmp byte [rbx + 0x54], 0
mov ecx, 0x1349a
js 0x140215a28
cmp byte [rbx], 2
ja 0x140215427
mov rdx, qword [rbx + 0x80]
test rdx, rdx
jne 0x1402154f1
jmp 0x140215445
mov rcx, rbx
call sym.moveToRoot
mov dword [rsp + 0x80], eax
mov r14d, eax
test eax, 0xffffffef
je 0x140215415
jmp 0x140215e6e
mov rax, qword [rsp + 0x40]
cmp byte [rax + 0x13], 0
je 0x140215463
mov edx, dword [rbx + 0x50]
mov r8, qword [r12 + 8]
xor r9d, r9d
mov rcx, rax
call sym.invalidateIncrblobCursors
test byte [rbx + 1], 2
je 0x1402154b0
mov rax, qword [rbx + 0x30]
cmp qword [r12 + 8], rax
jne 0x1402154b0
cmp word [rbx + 0x46], 0
je 0x1402155e2
mov eax, dword [r12 + 0x28]
add eax, dword [r12 + 0x24]
cmp dword [rbx + 0x40], eax
jne 0x1402155e2
mov rdx, r12
mov rcx, rbx
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.btreeOverwriteCell
test esi, esi
jne 0x1402155e2
mov r8d, dword [rsp + 0x58]
mov rdx, qword [r12 + 8]
lea r9, [rsp + 0x84]
mov rcx, rbx
shr r8d, 3
and r8d, 1
call sym.sqlite3BtreeTableMoveto
mov dword [rsp + 0x80], eax
mov r14d, eax
test eax, eax
je 0x1402155e2
jmp 0x140215e6e
test esi, esi
jne 0x1402155e2
test byte [rsp + 0x58], 2
je 0x140215548
mov rcx, rbx
call sym.getCellInfo
mov rax, qword [r12 + 8]
cmp qword [rbx + 0x30], rax
jne 0x1402155e2
mov rdx, qword [r12]
xor edi, edi
mov rcx, rbx
mov dword [rsp + 0xb4], eax
mov dword [rsp + 0xb8], edi
mov qword [rsp + 0xa0], rdx
lea rdx, [rsp + 0x90]
call sym.btreeOverwriteCell
jmp 0x140215b4d
mov eax, dword [r12 + 0x20]
lea r8, [rsp + 0x84]
test ax, ax
je 0x140215599
mov qword [rsp + 0x90], rdx
mov rdx, qword [r12 + 0x18]
mov rcx, rbx
mov word [rsp + 0xac], ax
mov qword [rsp + 0x98], rdx
lea rdx, [rsp + 0x90]
mov byte [rsp + 0xae], 0
mov byte [rsp + 0xb2], 0
call sym.sqlite3BtreeIndexMoveto
jmp 0x1402155bc
mov r9d, dword [rsp + 0x58]
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 r14d, dword [rsp + 0x80]
test r14d, r14d
jne 0x140215e6e
cmp dword [rsp + 0x84], 0
je 0x140215500
mov r15, qword [rbx + 0x88]
cmp dword [r15 + 0x14], 0
js 0x14021561a
mov rax, qword [rsp + 0x40]
mov edi, dword [rsp + 0x58]
mov rax, qword [rax + 8]
and edi, 0x80
mov dword [rsp + 0x5c], edi
mov rsi, qword [rax + 0x88]
mov qword [rsp + 0x30], rsi
jne 0x140215646
jmp 0x1402156e2
cmp byte [rbx], 1
jbe 0x14021562b
mov ecx, 0x13515
call sym.sqlite3CorruptError
jmp 0x140215633
mov rcx, r15
call sym.btreeComputeFreeSpace
mov dword [rsp + 0x80], eax
mov r14d, eax
test eax, eax
je 0x1402155f0
jmp 0x140215e6e
mov ebp, dword [rax + 0x90]
mov edx, 4
xor esi, esi
mov dword [rsp + 0x80], esi
cmp ebp, edx
cmovl ebp, edx
cmp byte [rax + 0x21], 0
je 0x140215a00
movzx eax, word [r15 + 0xe]
cmp eax, ebp
jge 0x140215a00
mov rdx, qword [rsp + 0x30]
lea r8, [rsp + 0x90]
mov rcx, r15
call qword [r15 + pe_nt_image_headers64]
movzx eax, word [rsp + 0xa4]
cmp dword [rsp + 0xa0], eax
je 0x140215a00
mov rdi, qword [rsp + 0x30]
movsxd rax, ebp
mov r9d, dword [r15 + 4]
mov r8d, 3
mov edx, dword [rdi + rax - 4]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 8]
lea rax, [rsp + 0x80]
bswap edx
mov qword [rsp + 0x20], rax
call sym.ptrmapPut
cmp dword [rsp + 0x80], 0
jmp 0x1402159fa
movzx r11d, byte [r15 + 0xa]
mov rax, qword [rsp + 0x30]
mov rcx, r11
add rcx, rax
cmp byte [r15 + 1], 0
je 0x140215742
mov r14d, dword [r12 + 0x24]
mov r13d, dword [r12 + 0x28]
mov rax, qword [r12 + 0x10]
add r13d, r14d
mov qword [rsp + 0x50], rax
cmp r13d, 0x7f
ja 0x14021571d
mov byte [rcx], r13b
mov al, 1
jmp 0x140215725
movsxd rdx, r13d
call sym.sqlite3PutVarint
movzx eax, al
mov rdx, qword [r12 + 8]
add r11d, eax
mov rax, qword [rsp + 0x30]
movsxd rcx, r11d
add rcx, rax
call sym.sqlite3PutVarint
jmp 0x14021576b
mov r14, qword [r12 + 8]
mov rax, qword [r12]
mov r13d, r14d
mov qword [rsp + 0x50], rax
cmp r14d, 0x7f
ja 0x140215760
mov byte [rcx], r14b
mov al, 1
jmp 0x140215768
movsxd rdx, r14d
call sym.sqlite3PutVarint
movzx eax, al
lea ecx, [rax + r11]
mov rax, qword [rsp + 0x30]
movzx r11d, word [r15 + 0xe]
movsxd r8, ecx
add r8, rax
cmp r11d, r13d
jl 0x1402157ae
lea ebp, [rcx + r13]
mov rsi, qword [rsp + 0x50]
movsxd rcx, r14d
mov rdi, r8
rep movsb byte [rdi], byte [rsi]
mov eax, 4
cmp ebp, eax
cmovl ebp, eax
sub r13d, r14d
xor eax, eax
movsxd rcx, r13d
rep stosb byte [rdi], al
jmp 0x1402159ed
mov rax, qword [r15 + 0x48]
movzx r9d, word [r15 + 0x10]
xor edx, edx
mov qword [rsp + 0x38], rax
mov rsi, qword [rsp + 0x38]
mov eax, r13d
sub eax, r9d
mov esi, dword [rsi + 0x38]
sub esi, 4
div esi
mov rax, qword [rsp + 0x30]
add edx, r9d
cmp r11d, edx
cmovge r9d, edx
xor r10d, r10d
xor r11d, r11d
mov dword [rsp + 0x8c], r10d
add ecx, r9d
mov qword [rsp + 0x48], r11
lea ebp, [rcx + 4]
movsxd rcx, ecx
add rax, rcx
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x78], rax
cmp r13d, r9d
mov edx, r9d
cmovle edx, r13d
cmp edx, r14d
jg 0x14021583c
mov rsi, qword [rsp + 0x50]
movsxd rcx, edx
mov rdi, r8
rep movsb byte [rdi], byte [rsi]
jmp 0x14021585d
test r14d, r14d
jle 0x140215853
mov rsi, qword [rsp + 0x50]
mov ecx, r14d
mov rdi, r8
mov edx, r14d
rep movsb byte [rdi], byte [rsi]
jmp 0x14021585d
movsxd rcx, edx
mov rdi, r8
xor eax, eax
rep stosb byte [rdi], al
sub r13d, edx
test r13d, r13d
jle 0x1402159e3
movsxd rax, edx
sub r14d, edx
add qword [rsp + 0x50], rax
sub r9d, edx
je 0x14021587e
add r8, rax
jmp 0x14021581e
mov rax, qword [rsp + 0x38]
xor r9d, r9d
mov esi, dword [rsp + 0x8c]
mov qword [rsp + 0x90], r9
cmp byte [rax + 0x21], 0
jne 0x1402158df
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x38]
mov dword [rsp + 0x20], r8d
mov r9d, dword [rsp + 0x8c]
mov r8, qword [rsp + 0x70]
call sym.allocateBtreePage
mov rdi, qword [rsp + 0x38]
mov dword [rsp + 0x88], eax
cmp byte [rdi + 0x21], 0
je 0x14021596d
test eax, eax
jne 0x14021596d
jmp 0x140215928
mov eax, dword [0x140276d80]
mov dword [rsp + 0x68], eax
mov rax, qword [rsp + 0x38]
mov r11d, dword [rax + 0x34]
mov r10d, dword [rsp + 0x8c]
mov rcx, qword [rsp + 0x38]
lea edi, [r10 + 1]
mov edx, edi
mov dword [rsp + 0x8c], edi
call sym.ptrmapPageno
cmp edi, eax
je 0x1402158f2
mov eax, dword [rsp + 0x68]
xor edx, edx
div r11d
cmp r10d, eax
je 0x1402158f2
jmp 0x14021589b
lea rax, [rsp + 0x88]
cmp esi, 1
mov rcx, qword [rsp + 0x38]
mov r9d, esi
mov qword [rsp + 0x20], rax
mov edx, dword [rsp + 0x8c]
mov r8d, 3
sbb r8d, 0xffffffff
call sym.ptrmapPut
cmp dword [rsp + 0x88], 0
je 0x14021596d
mov rcx, qword [rsp + 0x90]
call sym.releasePage
mov esi, dword [rsp + 0x88]
test esi, esi
je 0x140215988
mov rcx, qword [rsp + 0x48]
call sym.releasePage
mov dword [rsp + 0x5c], esi
jmp 0x1402159ed
mov eax, dword [rsp + 0x8c]
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
bswap eax
mov dword [rsi], eax
call sym.releasePage
mov rax, qword [rsp + 0x90]
xor ecx, ecx
mov qword [rsp + 0x48], rax
mov rax, qword [rax + 0x50]
mov qword [rsp + 0x60], rax
mov dword [rax], ecx
mov rax, qword [rsp + 0x48]
mov rax, qword [rax + 0x50]
mov qword [rsp + 0x68], rax
lea r8, [rax + 4]
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0x38]
mov dword [rsp + 0x68], eax
lea r9d, [rax - 4]
jmp 0x14021581e
mov rcx, qword [rsp + 0x48]
call sym.releasePage
mov eax, dword [rsp + 0x5c]
mov dword [rsp + 0x80], eax
test eax, eax
jne 0x140215e66
movzx r13d, word [rbx + 0x56]
cmp dword [rsp + 0x84], 0
mov word [rbx + 0x46], 0
mov eax, r13d
jne 0x140215b88
cmp r13w, word [r15 + 0x18]
jb 0x140215a40
mov ecx, 0x1353c
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.sqlite3CorruptError
mov rcx, qword [r15 + 0x70]
call sym.sqlite3PagerWrite
mov dword [rsp + 0x80], eax
mov r14d, eax
test eax, eax
jne 0x140215e66
mov rdx, qword [r15 + 0x60]
lea eax, [r13 + r13]
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 rdx, rdi
jne 0x140215a8d
mov eax, dword [rdi]
mov rdi, qword [rsp + 0x30]
mov dword [rdi], eax
mov qword [rsp + 0x38], rdx
lea r8, [rsp + 0x90]
mov rcx, r15
call qword [r15 + pe_nt_image_headers64]
xor eax, eax
movzx ecx, word [rsp + 0xa4]
mov r8d, dword [rsp + 0xa0]
mov rdx, qword [rsp + 0x38]
cmp ecx, r8d
mov r9d, ecx
je 0x140215add
mov ax, word [rsp + 0xa6]
mov rcx, r15
mov word [rsp + 0x20], ax
call sym.clearCellOverflow.isra.0
mov rdx, qword [rsp + 0x38]
movzx r8d, word [rsp + 0xa6]
and byte [rbx + 1], 0xfb
mov dword [rsp + 0x80], eax
cmp r8d, ebp
jne 0x140215b66
movzx eax, word [rsp + 0xa4]
cmp eax, dword [rsp + 0xa0]
jne 0x140215b66
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 8]
cmp byte [rax + 0x21], 0
je 0x140215b1f
movzx eax, word [r15 + 0x10]
cmp eax, ebp
jle 0x140215b66
mov rcx, qword [r15 + 0x50]
movzx eax, byte [r15 + 9]
lea rax, [rcx + rax + 0xa]
mov ecx, 0x13557
cmp rdx, rax
jb 0x140215b48
movsxd rax, ebp
add rax, rdx
cmp qword [r15 + 0x58], rax
jae 0x140215b55
mov ecx, 0x1355a
call sym.sqlite3CorruptError
mov r14d, eax
jmp 0x140215e6e
mov rsi, qword [rsp + 0x30]
mov ecx, ebp
mov rdi, rdx
rep movsb byte [rdi], byte [rsi]
jmp 0x140215e6e
lea r9, [rsp + 0x80]
mov edx, r13d
mov rcx, r15
call sym.dropCell
cmp dword [rsp + 0x80], 0
je 0x140215ba0
jmp 0x140215e66
jns 0x140215ba0
cmp word [r15 + 0x18], 0
je 0x140215ba0
inc eax
and byte [rbx + 1], 0xfd
mov word [rbx + 0x56], ax
movzx r13d, ax
lea eax, [rbp + 1]
cmp eax, dword [r15 + 0x14]
jl 0x140215bca
movzx eax, byte [r15 + 0xc]
mov rsi, qword [rsp + 0x30]
lea edx, [rax + 1]
mov byte [r15 + 0xc], dl
mov qword [r15 + rax*8 + 0x28], rsi
mov word [r15 + rax*2 + 0x1c], r13w
jmp 0x140215db0
mov rcx, qword [r15 + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
jne 0x140215de0
mov r14, qword [r15 + 0x50]
movzx esi, byte [r15 + 9]
xor edx, edx
mov dword [rsp + 0x90], edx
movzx eax, word [r15 + 0x12]
lea r11, [r14 + rsi + 5]
movzx edx, word [r15 + 0x18]
mov r9w, word [r11]
lea edi, [rax + rdx*2]
rol r9w, 8
movzx r9d, r9w
cmp edi, r9d
jle 0x140215c2a
test r9d, r9d
jne 0x140215c23
mov rax, qword [r15 + 0x48]
cmp dword [rax + 0x38], 0x10000
je 0x140215c46
mov ecx, 0x1176f
jmp 0x140215c39
mov rax, qword [r15 + 0x48]
cmp r9d, dword [rax + 0x38]
jle 0x140215c4c
mov ecx, 0x11772
call sym.sqlite3CorruptError
xor r9d, r9d
jmp 0x140215d2b
mov r9d, 0x10000
cmp byte [r14 + rsi + 2], 0
jne 0x140215c6b
cmp byte [r14 + rsi + 1], 0
jne 0x140215c6b
lea eax, [rbp + rdi + 2]
cmp r9d, eax
jge 0x140215d18
jmp 0x140215cd1
lea eax, [rdi + 1]
cmp eax, r9d
jge 0x140215c5c
lea r8, [rsp + 0x90]
mov edx, ebp
mov rcx, r15
mov dword [rsp + 0x40], r9d
mov qword [rsp + 0x38], r11
call sym.pageFindSlot
mov r11, qword [rsp + 0x38]
mov r9d, dword [rsp + 0x40]
test rax, rax
je 0x140215cc1
sub rax, r14
mov r9d, eax
cmp edi, eax
jl 0x140215d33
mov ecx, 0x11783
mov dword [rsp + 0x38], eax
call sym.sqlite3CorruptError
mov r9d, dword [rsp + 0x38]
jmp 0x140215d2b
mov eax, dword [rsp + 0x90]
test eax, eax
je 0x140215c5c
jmp 0x140215de0
mov edx, dword [r15 + 0x14]
lea eax, [rbp + 2]
mov rcx, r15
mov qword [rsp + 0x38], r11
sub edx, eax
mov eax, 4
cmp edx, eax
cmovg edx, eax
call sym.defragmentPage
test eax, eax
jne 0x140215de0
mov r11, qword [rsp + 0x38]
movzx r9d, byte [r14 + rsi + 6]
movzx eax, byte [r11]
shl eax, 8
or r9d, eax
dec r9d
movzx r9d, r9w
inc r9d
sub r9d, ebp
mov eax, r9d
movzx eax, ah
mov byte [r11], al
mov byte [r14 + rsi + 6], r9b
jmp 0x140215d33
test eax, eax
jne 0x140215de0
lea eax, [rbp + 2]
mov rsi, qword [rsp + 0x30]
movsxd rcx, ebp
mov dword [rsp + 0x38], r9d
movzx eax, ax
sub dword [r15 + 0x14], eax
movsxd rax, r9d
add rax, r14
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
lea esi, [r13 + r13]
movsxd rsi, esi
movzx r8d, word [r15 + 0x18]
add rsi, qword [r15 + 0x60]
mov rdx, rsi
lea rcx, [rsi + 2]
sub r8d, r13d
add r8d, r8d
movsxd r8, r8d
call sub.msvcrt.dll_memmove
mov r9d, dword [rsp + 0x38]
rol r9w, 8
mov word [rsi], r9w
movzx eax, byte [r15 + 9]
inc word [r15 + 0x18]
lea rdx, [r14 + rax + 4]
inc byte [rdx]
jne 0x140215da6
movzx eax, byte [r15 + 9]
inc byte [r14 + rax + 3]
mov rax, qword [r15 + 0x48]
cmp byte [rax + 0x21], 0
jne 0x140215db4
xor eax, eax
jmp 0x140215de0
mov r8, qword [rsp + 0x30]
xor eax, eax
mov rdx, r15
mov rcx, r15
lea r9, [rsp + 0x90]
mov dword [rsp + 0x90], eax
call sym.ptrmapPutOvflPtr
mov eax, dword [rsp + 0x90]
test eax, eax
je 0x140215db0
cmp byte [r15 + 0xc], 0
mov dword [rsp + 0x80], eax
je 0x140215e66
and byte [rbx + 1], 0xfd
mov rcx, rbx
call sym.balance
mov rdx, qword [rbx + 0x88]
mov dword [rsp + 0x80], eax
mov byte [rdx + 0xc], 0
mov byte [rbx], 1
test byte [rsp + 0x58], 2
je 0x140215e66
test eax, eax
jne 0x140215e66
mov rcx, rbx
call sym.btreeReleaseAllCursorPages
cmp qword [rbx + 0x80], 0
je 0x140215e5a
mov rcx, qword [r12 + 8]
call sym.sqlite3Malloc
mov qword [rbx + 0x18], rax
test rax, rax
jne 0x140215e4c
mov dword [rsp + 0x80], 7
jmp 0x140215e5a
mov rsi, qword [r12]
mov rcx, qword [r12 + 8]
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
mov byte [rbx], 3
mov rax, qword [r12 + 8]
mov qword [rbx + 0x48], rax
mov r14d, dword [rsp + 0x80]
mov eax, r14d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret