Function at 0x1401f1cd0
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, 0x198
mov ebx, 8
mov qword [rsp + 0x1f8], r9
xor r9d, r9d
cmp byte [rcx + 0x42], 0
mov rsi, rcx
mov qword [rsp + 0x1e8], rdx
mov dword [rsp + 0x1f0], r8d
mov dword [rsp + 0x98], r9d
jne 0x1401f25c4
mov r8d, 1
mov edx, 1
call sym.walLockExclusive
test eax, eax
mov dword [rsp + 0x38], eax
jne 0x1401f25b3
cmp dword [rsp + 0x1f0], 0
mov byte [rsi + 0x41], 1
je 0x1401f1d8f
mov r8, qword [rsp + 0x200]
xor r9d, r9d
mov rcx, rsi
mov dword [rsp + 0x20], 1
mov rdx, qword [rsp + 0x1f8]
call sym.walBusyLock
test eax, eax
mov ebx, eax
jne 0x1401f1d7c
mov eax, dword [rsp + 0x1f0]
mov byte [rsi + 0x40], 1
mov dword [rsp + 0x38], eax
jmp 0x1401f1d8f
cmp eax, 5
jne 0x1401f25b7
xor eax, eax
mov qword [rsp + 0x1f8], rax
lea rdx, [rsp + 0x98]
mov rcx, rsi
call sym.walIndexReadHdr
cmp dword [rsp + 0x98], 0
mov ebx, eax
je 0x1401f1dc1
mov rcx, qword [rsi + 8]
mov rax, qword [rcx]
cmp dword [rax], 2
jle 0x1401f1dc1
xor r8d, r8d
xor edx, edx
call sym.sqlite3OsUnfetch.isra.0
test ebx, ebx
jne 0x1401f255b
mov ax, word [rsi + 0x56]
mov r14d, dword [rsi + 0x58]
mov edx, eax
and eax, 0xfe00
shl edx, 0x10
and edx, 0x10000
or edx, eax
test r14d, r14d
mov dword [rsp + 0x3c], edx
je 0x1401f1e06
cmp dword [rsp + 0x210], edx
je 0x1401f1e06
mov ecx, 0x10646
call sym.sqlite3CorruptError
mov ebx, eax
jmp 0x1401f251b
mov rax, qword [rsi + 0x30]
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
mov eax, dword [rax + 0x60]
cmp eax, r14d
jae 0x1401f2465
mov eax, dword [rsi + 0x5c]
xor ebx, ebx
mov edi, 1
mov dword [rsp + 0x64], eax
mov rax, qword [rsp + 0x30]
lea rbp, [rax + 0x68]
mov r12d, dword [rbp]
cmp r12d, r14d
jae 0x1401f1ea4
mov r8, qword [rsp + 0x200]
lea r13d, [rdi + 3]
mov rcx, rsi
mov dword [rsp + 0x20], 1
mov rdx, qword [rsp + 0x1f8]
mov r9d, r13d
call sym.walBusyLock
test eax, eax
mov ebx, eax
jne 0x1401f1e8d
cmp edi, 1
mov eax, 0xffffffff
mov r8d, 1
cmove eax, r14d
mov edx, r13d
mov rcx, rsi
mov dword [rbp], eax
call sym.walUnlockExclusive
jmp 0x1401f1ea4
cmp eax, 5
jne 0x1401f2511
xor r8d, r8d
mov r14d, r12d
mov qword [rsp + 0x1f8], r8
inc edi
add rbp, 4
cmp edi, 5
jne 0x1401f1e35
mov rax, qword [rsp + 0x30]
xor ebp, ebp
mov eax, dword [rax + 0x60]
cmp eax, r14d
jae 0x1401f245c
mov rax, qword [rsp + 0x30]
mov ebx, 7
mov r12d, dword [rax + 0x60]
mov eax, dword [rsi + 0x58]
mov dword [rsp + 0x60], eax
add eax, 0x1000
mov edx, dword [rsp + 0x60]
sub rax, 0xfdf
shr rax, 0xc
mov dword [rsp + 0x74], eax
lea edi, [rax + 1]
cdqe
shl rax, 4
mov dword [rsp + 0x70], edi
lea r13, [rdx + rax + 0x14]
add r13, r13
mov rcx, r13
call sym.sqlite3_malloc64
test rax, rax
mov rbp, rax
je 0x1401f2469
xor eax, eax
mov rcx, r13
mov rdi, rbp
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x70]
mov ecx, 0x1000
cmp dword [rsp + 0x60], ecx
cmovbe ecx, dword [rsp + 0x60]
mov ecx, ecx
mov dword [rbp + 4], eax
add rcx, rcx
call sym.sqlite3_malloc64
cmp rax, 1
mov qword [rsp + 0x40], rax
lea eax, [r12 + 0x1001]
sbb ebx, ebx
sub rax, 0xfdf
and ebx, 7
sar rax, 0xc
mov r13, rax
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0xa0]
shl r13, 5
add r13, rbp
mov qword [rsp + 0x68], rax
test ebx, ebx
mov edi, dword [rsp + 0x50]
jne 0x1401f21ad
cmp dword [rsp + 0x70], edi
jle 0x1401f21ad
lea r8, [rsp + 0xa8]
mov edx, edi
mov rcx, rsi
call sym.walHashGet
test eax, eax
mov ebx, eax
jne 0x1401f219f
mov rax, qword [rsp + 0xb0]
cmp dword [rsp + 0x74], edi
mov edx, dword [rsp + 0xb8]
mov qword [rsp + 0x48], rax
jne 0x1401f1fd2
mov r12d, dword [rsp + 0x60]
sub r12d, edx
jmp 0x1401f1fe6
mov r12, qword [rsp + 0xa8]
mov rax, qword [rsp + 0x48]
sub r12, rax
sar r12, 2
movsxd rcx, dword [rbp + 4]
mov eax, edx
add rax, rax
shl rcx, 5
lea rax, [rcx + rax + 8]
add rax, rbp
mov qword [rsp + 0x58], rax
lea eax, [rdx + 1]
mov dword [rsp + 0x88], eax
xor eax, eax
cmp r12d, eax
jle 0x1401f201f
mov rdi, qword [rsp + 0x58]
mov word [rdi + rax*2], ax
inc rax
jmp 0x1401f200c
xor edx, edx
xor ecx, ecx
xor eax, eax
mov dword [rsp + 0x9c], edx
lea rdx, [rsp + 0xc0]
xor r15d, r15d
mov rdi, rdx
mov qword [rsp + 0xa0], rcx
mov ecx, 0x34
xor edx, edx
rep stosd dword [rdi], eax
lea r10, [rsp + 0xc8]
cmp r12d, r15d
mov eax, r15d
jle 0x1401f2119
mov rdi, qword [rsp + 0x58]
lea rdx, [r15 + r15]
mov dword [rsp + 0x9c], 1
lea r11, [rsp + 0x9c]
add rdx, rdi
xor edi, edi
mov qword [rsp + 0xa0], rdx
bt eax, edi
mov edx, edi
jae 0x1401f20ed
mov dword [rsp + 0x8c], eax
mov rax, qword [rsp + 0x40]
mov rdx, rdi
inc rdi
shl rdx, 4
mov qword [rsp + 0x20], r11
mov r9, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x48]
mov qword [rsp + 0x80], r11
mov qword [rsp + 0x78], r10
mov qword [rsp + 0x28], rax
mov r8d, dword [rsp + rdx + 0xc0]
mov rdx, qword [r10 + rdx]
call sym.walMerge
mov eax, dword [rsp + 0x8c]
mov r11, qword [rsp + 0x80]
mov r10, qword [rsp + 0x78]
jmp 0x1401f2088
mov rax, qword [rsp + 0xa0]
mov edi, edi
inc r15
shl rdi, 4
mov qword [rsp + rdi + 0xc8], rax
mov eax, dword [rsp + 0x9c]
mov dword [rsp + rdi + 0xc0], eax
jmp 0x1401f2053
lea edi, [rdx + 1]
lea r15, [rsp + 0xc8]
lea rax, [rsp + 0x9c]
cmp edi, 0xc
ja 0x1401f2177
bt r12d, edi
jae 0x1401f2172
mov rcx, qword [rsp + 0x40]
mov rdx, rdi
mov qword [rsp + 0x20], rax
shl rdx, 4
mov r9, qword [rsp + 0x68]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x28], rcx
mov rcx, qword [rsp + 0x48]
mov r8d, dword [rsp + rdx + 0xc0]
mov rdx, qword [r15 + rdx]
call sym.walMerge
mov rax, qword [rsp + 0x78]
inc rdi
jmp 0x1401f212c
mov eax, dword [rsp + 0x88]
mov dword [r13 + 0x24], eax
mov eax, dword [rsp + 0x9c]
mov dword [r13 + 0x20], eax
mov rax, qword [rsp + 0x58]
mov qword [r13 + 0x10], rax
mov rax, qword [rsp + 0x48]
mov qword [r13 + 0x18], rax
inc qword [rsp + 0x50]
add r13, 0x20
jmp 0x1401f1f7c
mov rcx, qword [rsp + 0x40]
call sym.sqlite3_free
test ebx, ebx
jne 0x1401f21ed
mov r8, qword [rsp + 0x200]
mov r9d, 3
mov rcx, rsi
mov dword [rsp + 0x20], 1
mov rdx, qword [rsp + 0x1f8]
call sym.walBusyLock
test eax, eax
mov ebx, eax
jne 0x1401f245c
jmp 0x1401f21fc
mov rcx, rbp
xor ebp, ebp
call sym.sqlite3_free
jmp 0x1401f245c
mov rax, qword [rsp + 0x30]
mov rcx, qword [rsi + 0x10]
mov eax, dword [rax + 0x60]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x80], r14d
mov eax, dword [rsp + 0x208]
sar eax, 2
and eax, 3
mov edx, eax
mov dword [rsp + 0x60], eax
call sym.sqlite3OsSync
test eax, eax
mov ebx, eax
jne 0x1401f23ee
movsxd rdi, dword [rsp + 0x3c]
xor r8d, r8d
mov edx, 0x27
mov eax, dword [rsp + 0x64]
mov rcx, qword [rsi + 8]
imul rax, rdi
mov qword [rsp + 0xa8], rax
call sym.sqlite3OsFileControl
mov rcx, qword [rsi + 8]
lea rdx, [rsp + 0xc0]
call sym.sqlite3OsFileSize
test eax, eax
mov ebx, eax
jne 0x1401f23ee
mov rcx, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0xa8]
cmp rcx, rdx
jge 0x1401f22cd
mov eax, dword [rsi + 0x58]
imul rax, rdi
lea rax, [rcx + rax + 0x10000]
cmp rdx, rax
jle 0x1401f22b7
mov ecx, 0xff39
call sym.sqlite3CorruptError
test eax, eax
je 0x1401f22cd
jmp 0x1401f23ec
mov rcx, qword [rsi + 8]
lea r8, [rsp + 0xa8]
mov edx, 5
call sym.sqlite3OsFileControlHint
mov eax, dword [rsp + 0x3c]
xor r12d, r12d
add eax, 0x18
movsxd r15, eax
movsxd rax, dword [rsp + 0x3c]
mov qword [rsp + 0x48], rax
movsxd rax, dword [rbp + 4]
or edi, 0xffffffff
mov r10d, dword [rbp]
lea r8d, [rax - 1]
shl rax, 5
add rax, rbp
test r8d, r8d
js 0x1401f2346
mov r9d, dword [rax]
mov edx, dword [rax - 0x18]
cmp edx, r9d
jge 0x1401f233d
mov r11, qword [rax - 0x10]
movsxd rcx, edx
movzx r13d, word [r11 + rcx*2]
mov r11, qword [rax - 8]
mov rcx, r13
mov r11d, dword [r11 + r13*4]
cmp r10d, r11d
jae 0x1401f2336
cmp r11d, edi
jae 0x1401f233d
add ecx, dword [rax + 4]
mov edi, r11d
mov r12d, ecx
jmp 0x1401f233d
inc edx
mov dword [rax - 0x18], edx
jmp 0x1401f2302
dec r8d
sub rax, 0x20
jmp 0x1401f22fa
cmp edi, 0xffffffff
mov dword [rbp], edi
je 0x1401f23ee
mov rax, qword [rsp + 0x1e8]
mov eax, dword [rax + 0x198]
test eax, eax
je 0x1401f237a
mov rax, qword [rsp + 0x1e8]
cmp byte [rax + 0x67], 1
sbb ebx, ebx
and ebx, 2
add ebx, 7
jmp 0x1401f23ee
cmp dword [rsp + 0x40], r12d
setae al
cmp r14d, r12d
setb dl
or al, dl
jne 0x1401f22e4
cmp dword [rsp + 0x64], edi
jb 0x1401f22e4
lea eax, [r12 - 1]
mov rcx, qword [rsi + 0x10]
imul rax, r15
mov r8d, dword [rsp + 0x3c]
mov rdx, qword [rsp + 0x218]
lea r9, [rax + 0x38]
call sym.sqlite3OsRead
test eax, eax
jne 0x1401f23ec
mov rax, qword [rsp + 0x48]
lea r9d, [rdi - 1]
mov rcx, qword [rsi + 8]
mov r8d, dword [rsp + 0x3c]
mov rdx, qword [rsp + 0x218]
imul r9, rax
call sym.sqlite3OsWrite
test eax, eax
je 0x1401f22e4
mov ebx, eax
mov rcx, qword [rsi + 8]
xor r8d, r8d
mov edx, 0x25
call sym.sqlite3OsFileControl
test ebx, ebx
jne 0x1401f2449
mov rax, qword [rsi + 0x30]
mov rax, qword [rax]
mov eax, dword [rax + 0x10]
cmp eax, r14d
je 0x1401f241d
mov rax, qword [rsp + 0x30]
mov dword [rax + 0x60], r14d
jmp 0x1401f2449
mov edx, dword [rsi + 0x5c]
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsi + 8]
imul rdx, rax
call sym.sqlite3OsTruncate
test eax, eax
jne 0x1401f2447
mov rcx, qword [rsi + 8]
mov edx, dword [rsp + 0x60]
call sym.sqlite3OsSync
test eax, eax
je 0x1401f2412
mov ebx, eax
mov r8d, 1
mov edx, 3
mov rcx, rsi
call sym.walUnlockExclusive
cmp ebx, 5
jne 0x1401f2469
xor ebx, ebx
jmp 0x1401f2469
xor ebx, ebx
xor ebp, ebp
test ebx, ebx
jne 0x1401f2513
cmp dword [rsp + 0x38], 0
je 0x1401f2513
mov rax, qword [rsp + 0x30]
mov ebx, 5
mov eax, dword [rax + 0x60]
cmp eax, dword [rsi + 0x58]
jb 0x1401f2513
xor ebx, ebx
cmp dword [rsp + 0x38], 1
jle 0x1401f2513
lea rdx, [rsp + 0xc0]
mov ecx, 4
call sym.sqlite3_randomness
mov r8, qword [rsp + 0x200]
mov rcx, rsi
mov dword [rsp + 0x20], 4
mov rdx, qword [rsp + 0x1f8]
mov r9d, 4
call sym.walBusyLock
test eax, eax
mov ebx, eax
jne 0x1401f2513
cmp dword [rsp + 0x38], 3
jne 0x1401f24fc
mov edx, dword [rsp + 0xc0]
mov rcx, rsi
call sym.walRestartHdr
mov rcx, qword [rsi + 0x10]
xor edx, edx
call sym.sqlite3OsTruncate
mov ebx, eax
mov r8d, 4
mov edx, 4
mov rcx, rsi
call sym.walUnlockExclusive
jmp 0x1401f2513
xor ebp, ebp
mov rcx, rbp
call sym.sqlite3_free
test ebx, ebx
je 0x1401f2524
cmp ebx, 5
jne 0x1401f255b
cmp qword [rsp + 0x220], 0
je 0x1401f253c
mov eax, dword [rsi + 0x58]
mov rdi, qword [rsp + 0x220]
mov dword [rdi], eax
cmp qword [rsp + 0x228], 0
je 0x1401f255b
mov rax, qword [rsi + 0x30]
mov rdi, qword [rsp + 0x228]
mov rax, qword [rax]
mov eax, dword [rax + 0x60]
mov dword [rdi], eax
cmp dword [rsp + 0x98], 0
je 0x1401f2575
lea rdx, [rsi + 0x48]
mov ecx, 0xc
xor eax, eax
mov rdi, rdx
rep stosd dword [rdi], eax
mov rcx, rsi
call sym.sqlite3WalEndWriteTransaction
cmp byte [rsi + 0x41], 0
je 0x1401f259a
mov r8d, 1
mov edx, 1
mov rcx, rsi
call sym.walUnlockExclusive
mov byte [rsi + 0x41], 0
test ebx, ebx
jne 0x1401f25c4
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x1f0], eax
mov eax, 5
cmovne ebx, eax
jmp 0x1401f25c4
mov ebx, dword [rsp + 0x38]
mov eax, dword [rsp + 0x1f0]
mov dword [rsp + 0x38], eax
jmp 0x1401f255b
mov eax, ebx
add rsp, 0x198
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret