Function at 0x1402d37e0
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, 0x58
mov rbx, qword [rcx + 8]
cmp byte [rcx + 0x11], 0
mov r14, qword [rbx]
mov rsi, rcx
mov r12d, edx
mov r13, r8
je 0x1402d3814
add dword [rcx + 0x14], 1
cmp byte [rcx + 0x12], 0
je 0x1402d3930
movzx eax, byte [rsi + 0x10]
cmp al, 2
je 0x1402d3941
cmp al, 1
jne 0x1402d382d
test r12d, r12d
je 0x1402d3d61
mov rax, qword [rsi]
movzx edx, word [rbx + 0x28]
test byte [rax + 0x33], 2
je 0x1402d3890
cmp byte [r14 + 0x12], 0
jne 0x1402d3890
and edx, 0xfffffffe
mov word [rbx + 0x28], dx
test r12d, r12d
je 0x1402d38a3
cmp byte [rbx + 0x24], 2
je 0x1402d38a8
test dl, 0x80
jne 0x1402d38a8
cmp r12d, 1
jle 0x1402d38bb
mov rax, qword [rbx + 0x78]
test rax, rax
jne 0x1402d3879
jmp 0x1402d38bb
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1402d38bb
mov rcx, qword [rax]
cmp rcx, rsi
je 0x1402d3870
mov rax, qword [rcx]
jmp 0x1402d38b2
mov eax, edx
and eax, 1
test ax, ax
je 0x1402d3848
test r12d, r12d
jne 0x1402d39ba
test dl, 0x80
je 0x1402d38bb
mov rax, qword [rbx + 0x80]
mov rax, qword [rax]
test rax, rax
jne 0x1402d3d88
cmp byte [rsi + 0x11], 0
mov rax, qword [rsi + 8]
je 0x1402d3980
cmp rsi, qword [rax + 0x80]
je 0x1402d38d8
test byte [rax + 0x28], 0x40
jne 0x1402d390e
mov rax, qword [rax + 0x78]
test rax, rax
jne 0x1402d38fd
jmp 0x1402d3980
mov rax, qword [rax + 0x10]
test rax, rax
je 0x1402d3980
cmp rsi, qword [rax]
je 0x1402d38f0
cmp dword [rax + 8], 1
jne 0x1402d38f0
cmp byte [rax + 0xc], 1
je 0x1402d38f0
mov ebp, 0x106
sub dword [rsi + 0x14], 1
jne 0x1402d3b5f
mov rcx, rsi
call sym.unlockBtreeMutex
jmp 0x1402d3b5f
call sym.btreeLockCarefully
movzx eax, byte [rsi + 0x10]
cmp al, 2
jne 0x1402d3820
test r13, r13
je 0x1402d3957
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
test r12d, r12d
je 0x1402d3979
mov rax, qword [rsi]
mov edx, dword [rax + 0x2f0]
cmp edx, dword [r14 + 0x80]
jle 0x1402d3979
cmp byte [r14 + 0xa], 0
jne 0x1402d3e00
xor ebp, ebp
jmp 0x1402d3b55
mov r11d, dword [rbx + 0x40]
and edx, 0xffffffef
mov word [rbx + 0x28], dx
test r11d, r11d
je 0x1402d3d18
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1402d39c8
test r12d, r12d
je 0x1402d3d28
test byte [rbx + 0x28], 1
je 0x1402d3ba0
cmp byte [rbx + 0x24], 0
je 0x1402d3b90
mov ebp, 8
jmp 0x1402d3b55
mov rcx, qword [rbx]
call sym.sqlite3PagerSharedLock
test eax, eax
mov ebp, eax
movzx r15d, al
jne 0x1402d3ade
xor r9d, r9d
mov edx, 1
mov rcx, rbx
lea r8, [rsp + 0x48]
call sym.btreeGetPage
test eax, eax
mov ebp, eax
jne 0x1402d3ada
mov rdi, qword [rsp + 0x48]
mov rcx, qword [rbx]
mov r8, qword [rdi + 0x50]
mov r9d, dword [rcx + 0x20]
mov eax, dword [r8 + 0x1c]
mov r15d, r9d
test eax, eax
je 0x1402d3a26
mov edx, dword [r8 + 0x18]
cmp dword [r8 + 0x5c], edx
je 0x1402d3e10
mov rax, qword [rbx + 8]
test byte [rax + 0x33], 2
jne 0x1402d3a39
test r15d, r15d
jne 0x1402d3eb8
mov eax, dword [rbx + 0x38]
xor r15d, r15d
lea ecx, [rax - 0xc]
mov r8d, 0x80808081
mov qword [rbx + 0x18], rdi
movq xmm0, qword [0x140478650]
mov edx, ecx
shl ecx, 6
mov dword [rbx + 0x40], r15d
imul rcx, r8
shl edx, 5
imul rdx, r8
movzx r8d, ax
shr rcx, 0x27
shr rdx, 0x27
movzx ecx, cx
movzx edx, dx
mov rax, rdx
shl rax, 0x10
or rax, r8
shl rax, 0x10
or rax, rdx
mov edx, 0x7f
shl rax, 0x10
or rax, rcx
movq xmm1, rax
paddw xmm0, xmm1
pextrw eax, xmm0, 0
cmp ax, dx
movq qword [rbx + 0x2a], xmm0
cmova eax, edx
mov byte [rbx + 0x25], al
jmp 0x1402d3998
add dword [rdi + 0x298], 1
cmp qword [rbx + 0x18], 0
je 0x1402d39c8
test ebp, ebp
je 0x1402d3d28
movzx r15d, bpl
cmp byte [rbx + 0x24], 0
jne 0x1402d3b14
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1402d3b14
mov rcx, qword [rdi + 0x70]
mov qword [rbx + 0x18], 0
mov rdi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
je 0x1402d3cd0
cmp r15d, 5
jne 0x1402d3b55
cmp byte [rbx + 0x24], 0
jne 0x1402d3b55
mov rdi, qword [rbx + 8]
mov rax, qword [rdi + 0x288]
test rax, rax
je 0x1402d3b55
mov edx, dword [rdi + 0x298]
test edx, edx
js 0x1402d3b55
mov rcx, qword [rdi + 0x290]
call rax
test eax, eax
jne 0x1402d3ac0
mov dword [rdi + 0x298], 0xffffffff
cmp byte [rsi + 0x11], 0
jne 0x1402d3913
mov eax, ebp
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [rbx + 0x24], 0
jne 0x1402d39ba
mov rdi, qword [rbx + 0x18]
test rdi, rdi
je 0x1402d39ba
nop dword [rax]
mov r15d, 8
mov ebp, 8
jmp 0x1402d3aed
mov ebp, dword [r14 + 0x30]
mov rax, qword [rsi]
test ebp, ebp
movzx eax, byte [rax + 0x66]
jne 0x1402d3c68
cmp al, 2
sete byte [r14 + 0x1a]
cmp byte [r14 + 0x15], 1
je 0x1402d3bd0
mov rcx, rbx
call sym.newDatabase
mov ebp, eax
jmp 0x1402d3ad2
mov rdi, qword [r14 + 0x128]
test rdi, rdi
je 0x1402d3f0c
cmp byte [r14 + 8], 0
je 0x1402d3c2f
cmp byte [rdi + 0x3f], 0
jne 0x1402d3e20
mov edx, 4
mov rcx, r14
call sym.pagerLockDb
test eax, eax
mov ebp, eax
jne 0x1402d3c68
mov rbp, qword [r14 + 0x128]
cmp byte [rbp + 0x3f], 0
mov rdi, rbp
jne 0x1402d3c2b
movsx edx, word [rbp + 0x3c]
mov rcx, qword [rbp + 8]
add edx, 3
call sym.walUnlockShared.part.0.isra.0
mov rdi, qword [r14 + 0x128]
mov byte [rbp + 0x3f], 1
cmp byte [rdi + 0x42], 0
jne 0x1402d3b72
cmp byte [rdi + 0x3f], 0
jne 0x1402d3e2a
mov rcx, qword [rdi + 8]
xor edx, edx
mov r9d, 0xa
mov r8d, 1
mov rax, qword [rcx]
call qword [rax + 0x70]
test eax, eax
mov ebp, eax
je 0x1402d3e2a
nop dword [rax]
cmp ebp, 0x205
jne 0x1402d3ada
cmp byte [rbx + 0x24], 0
jne 0x1402d3df0
mov rax, qword [rbx + 0x18]
mov ebp, 5
test rax, rax
je 0x1402d3b20
mov rcx, qword [rax + 0x70]
mov qword [rbx + 0x18], 0
mov ebp, 5
mov rdi, qword [rcx + 0x28]
call sym.sqlite3PcacheRelease
mov rax, qword [rdi + 0x120]
cmp qword [rax + 0x18], 0
jne 0x1402d3b1a
mov r15d, 5
mov ebp, 5
nop word [rax + rax]
movzx eax, byte [rdi + 0x15]
cmp al, 6
je 0x1402d3d08
test al, al
je 0x1402d3d08
cmp al, 1
je 0x1402d3ef0
mov rax, qword [0x1403952e0]
test rax, rax
je 0x1402d3cf2
call rax
mov rcx, rdi
call sym.sqlite3PagerRollback
mov rax, qword [0x1403952e8]
test rax, rax
je 0x1402d3d08
call rax
mov rcx, rdi
call sym.pager_unlock
jmp 0x1402d3b14
or edx, 0x10
mov word [rbx + 0x28], dx
jmp 0x1402d3994
cmp byte [rsi + 0x10], 0
jne 0x1402d3d4c
add dword [rbx + 0x3c], 1
cmp byte [rsi + 0x11], 0
je 0x1402d3d4c
mov byte [rsi + 0x3c], 1
mov rax, qword [rbx + 0x78]
mov qword [rsi + 0x40], rax
lea rax, [rsi + 0x30]
mov qword [rbx + 0x78], rax
test r12d, r12d
movzx eax, byte [rbx + 0x24]
jne 0x1402d3d98
test al, al
mov byte [rsi + 0x10], 1
jne 0x1402d3d61
mov byte [rbx + 0x24], 1
test r13, r13
je 0x1402d3979
mov rax, qword [rbx + 0x18]
xor ebp, ebp
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1402d3b55
mov ebp, 0x106
jmp 0x1402d3b55
cmp al, 1
mov byte [rsi + 0x10], 2
ja 0x1402d3da4
mov byte [rbx + 0x24], 2
movzx eax, word [rbx + 0x28]
mov qword [rbx + 0x80], rsi
mov rdi, qword [rbx + 0x18]
mov edx, eax
or eax, 0x40
and edx, 0xffffffbf
cmp r12d, 1
cmovg edx, eax
mov word [rbx + 0x28], dx
mov rdx, qword [rdi + 0x50]
mov eax, dword [rdx + 0x1c]
bswap eax
cmp dword [rbx + 0x40], eax
jne 0x1402d3e75
test r13, r13
je 0x1402d395c
mov eax, dword [rdx + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1402d395c
mov ebp, 0x205
jmp 0x1402d3b55
mov rcx, r14
call sym.pagerOpenSavepoint
mov ebp, eax
jmp 0x1402d3b55
bswap eax
mov r15d, eax
jmp 0x1402d3a26
cmp byte [rdi + 0x42], 0
jne 0x1402d3b72
mov rax, qword [rdi + 0x30]
mov byte [rdi + 0x40], 1
lea rcx, [rdi + 0x48]
mov r8d, 0x30
mov rdx, qword [rax]
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x1402d3f85
movd xmm0, dword [r14 + 0x20]
mov byte [r14 + 0x15], 2
mov qword [r14 + 0x60], 0
movd dword [r14 + 0x2c], xmm0
pshufd xmm0, xmm0, 0xe0
movq qword [r14 + 0x24], xmm0
jmp 0x1402d3bc1
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerWrite
test eax, eax
mov ebp, eax
jne 0x1402d3b55
mov eax, dword [rbx + 0x40]
test r13, r13
mov rdx, qword [rdi + 0x50]
bswap eax
mov dword [rdx + 0x1c], eax
je 0x1402d395c
mov rax, qword [rbx + 0x18]
mov rax, qword [rax + 0x50]
mov eax, dword [rax + 0x28]
bswap eax
mov dword [r13], eax
jmp 0x1402d395c
movabs rax, 0x66206574694c5153
cmp qword [r8], rax
je 0x1402d3fac
mov r15d, 0x1a
mov ebp, 0x1a
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov qword [rbx + 0x18], 0
jmp 0x1402d3b14
cmp byte [rdi + 8], 0
jne 0x1402d3d08
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call sym.pager_end_transaction
jmp 0x1402d3d08
mov edx, 2
mov rcx, r14
call sym.pagerLockDb
cmp r12d, 1
mov ebp, eax
jle 0x1402d418f
test eax, eax
jne 0x1402d3c68
jmp 0x1402d3f63
mov rcx, qword [r14 + 0x48]
mov edx, 4
mov rax, qword [rcx]
call qword [rax + 0x38]
test eax, eax
mov ebp, eax
je 0x1402d3f7b
cmp eax, 5
jne 0x1402d3c68
mov rcx, qword [r14 + 0xf0]
call qword [r14 + 0xe8]
test eax, eax
je 0x1402d3ada
movzx eax, byte [r14 + 0x16]
cmp al, 5
je 0x1402d3f74
cmp al, 3
ja 0x1402d3e4c
cmp byte [r14 + 0x11], 0
je 0x1402d3f2f
mov byte [r14 + 0x16], 4
jmp 0x1402d3e4c
cmp byte [rdi + 0x3f], 0
jne 0x1402d3fa3
mov rcx, qword [rdi + 8]
mov r9d, 9
mov r8d, 1
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x70]
mov byte [rdi + 0x40], 0
jmp 0x1402d3c74
movabs rax, 0x332074616d726f
cmp qword [r8 + 8], rax
jne 0x1402d3ecb
cmp byte [r8 + 0x12], 2
jbe 0x1402d3fcc
or word [rbx + 0x28], 1
cmp byte [r8 + 0x13], 2
ja 0x1402d3ecb
je 0x1402d4081
cmp word [r8 + 0x15], 0x2040
jne 0x1402d3ecb
cmp byte [r8 + 0x17], 0x20
jne 0x1402d3ecb
movzx edx, byte [r8 + 0x10]
movzx eax, byte [r8 + 0x11]
shl edx, 8
shl eax, 0x10
or edx, eax
lea eax, [rdx - 1]
test eax, edx
jne 0x1402d3ecb
lea eax, [rdx - 0x101]
cmp eax, 0xfeff
ja 0x1402d3ecb
or word [rbx + 0x28], 2
mov eax, edx
movzx ebp, byte [r8 + 0x14]
sub eax, ebp
cmp edx, dword [rbx + 0x34]
jne 0x1402d40db
cmp r9d, r15d
jae 0x1402d405a
mov rdx, qword [rbx + 8]
mov r15d, r9d
mov rdx, qword [rdx + 0x30]
and edx, 0x10000001
cmp rdx, 1
jne 0x1402d4155
cmp eax, 0x1df
jbe 0x1402d3ecb
mov dword [rbx + 0x38], eax
mov edx, dword [r8 + 0x34]
test edx, edx
setne byte [rbx + 0x21]
mov ecx, dword [r8 + 0x40]
test ecx, ecx
setne byte [rbx + 0x22]
jmp 0x1402d3a3f
test byte [rbx + 0x28], 0x20
jne 0x1402d3fdd
lea rdx, [rsp + 0x44]
mov dword [rsp + 0x3c], r9d
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x44], 0
call sym.sqlite3PagerOpenWal
mov r8, qword [rsp + 0x30]
test eax, eax
mov r9d, dword [rsp + 0x3c]
mov ebp, eax
jne 0x1402d414c
mov r10d, dword [rsp + 0x44]
test r10d, r10d
jne 0x1402d3fdd
mov rcx, qword [rdi + 0x70]
call sym.sqlite3PagerUnrefPageOne
mov rdi, qword [rbx + 0x18]
jmp 0x1402d3998
mov rcx, qword [rdi + 0x70]
mov dword [rsp + 0x3c], eax
lea rdi, [rbx + 0x34]
mov dword [rsp + 0x30], edx
call sym.sqlite3PagerUnrefPageOne
mov edx, dword [rsp + 0x30]
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rbx + 0x88]
movd xmm0, edx
movd xmm2, eax
test rcx, rcx
punpckldq xmm0, xmm2
movq qword [rbx + 0x34], xmm0
je 0x1402d412f
sub rcx, 4
mov qword [rbx + 0x88], rcx
call sym.pcache1Free
xor r8d, r8d
mov qword [rbx + 0x88], r8
mov rcx, qword [rbx]
mov r8d, ebp
mov rdx, rdi
call sym.sqlite3PagerSetPagesize
test eax, eax
mov ebp, eax
je 0x1402d3994
jmp 0x1402d3ada
movzx r15d, al
jmp 0x1402d3ed6
mov r9d, 0x1182e
mov ecx, 0xb
mov r15d, 0xb
lea rax, [0x14046bfcc]
mov ebp, 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 0x1402d3ed6
test eax, eax
je 0x1402d3e4c
jmp 0x1402d3c68