Function at 0x140372af0
Capabilities:
Create thread

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movaps xmmword [rsp + 0x50], xmm6
mov rax, qword [rcx + 8]
cmp qword [rcx], rax
mov qword [rsp + 0x48], 0
mov rbx, rcx
jl 0x140372dc8
mov rsi, qword [rcx + 0x48]
test rsi, rsi
je 0x140372bec
mov ecx, dword [rsi + 0x20]
test ecx, ecx
je 0x140372df0
mov r13, qword [rsi]
mov rbp, qword [r13]
test rbp, rbp
je 0x140372bc2
cmp qword [rbp + 0x10], 0
je 0x140372ba0
mov r12, qword [rbp]
nop dword [rax]
mov r8d, 1
mov edx, 0xffffffff
mov rcx, r12
call qword [sym.WaitForSingleObjectEx]
cmp eax, 0xc0
mov edi, eax
je 0x140372b50
mov rcx, qword [rbp]
call qword [sym.imp.kernel32.dll_CloseHandle]
test edi, edi
je 0x140372ba0
mov rcx, rbp
mov ebp, 1
call sym.sqlite3_free
mov dword [r13 + 8], 0
mov qword [r13], 0
jmp 0x140372bee
mov rdi, qword [rbp + 0x20]
mov rcx, rbp
call sym.sqlite3_free
mov dword [r13 + 8], 0
mov qword [r13], 0
test edi, edi
mov ebp, edi
jne 0x140372bee
mov rax, qword [rsi + 0x30]
movdqu xmm0, xmmword [rsi + 0x38]
mov rdx, qword [rsi + 0x28]
movups xmmword [rsi + 0x28], xmm0
mov qword [rsi + 0x40], rax
mov rax, qword [rsi + 0x10]
cmp qword [rsi + 0x30], rax
mov qword [rsi + 0x38], rdx
jne 0x140372c38
mov dword [rsi + 0x1c], 1
xor ebp, ebp
mov rcx, qword [rbx + 0x20]
call sym.sqlite3_free
mov rcx, qword [rbx + 0x30]
call sym.sqlite3_free
mov r8, qword [rbx + 0x40]
test r8, r8
je 0x140372c18
mov rcx, qword [rbx + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov rcx, qword [rbx + 0x48]
mov rdi, rbx
call sym.vdbeIncrFree
mov ecx, 0xa
xor eax, eax
rep stosq qword [rdi], rax
jmp 0x140372ddb
mov edx, dword [0x140395120]
mov rbp, qword [rsi]
test edx, edx
mov qword [rbp], 0
je 0x140372f30
mov rcx, qword [0x140394dc0]
test rcx, rcx
je 0x140372c63
call qword [0x1403951a0]
mov ecx, 0x28
call sym.sqlite3Malloc.part.0
mov rdi, rax
test rdi, rdi
je 0x140372f58
cmp byte [0x140395124], 0
je 0x140372ee0
mov rax, qword [0x1403952b0]
test rax, rax
je 0x140372ca1
mov ecx, 0xc8
call rax
test eax, eax
jne 0x140372ee0
lea rax, [sym.vdbeIncrPopulateThread]
mov qword [rdi + 0x18], rsi
xor edx, edx
xor ecx, ecx
mov qword [rdi + 0x10], rax
lea rax, [rdi + 8]
mov r9, rdi
mov qword [rsp + 0x28], rax
lea r8, [sym.sqlite3ThreadProc]
mov dword [rsp + 0x20], 0
call qword [sym.imp.msvcrt.dll__beginthreadex]
test rax, rax
mov qword [rdi], rax
je 0x140372ee0
cmp qword [rdi + 0x10], 0
je 0x140372f07
mov qword [rbp], rdi
mov eax, dword [rsi + 0x1c]
test eax, eax
jne 0x140372bec
mov rax, qword [0x1403952b0]
mov rdi, qword [rsi]
movq xmm6, qword [rsi + 0x10]
test rax, rax
je 0x140372d1e
mov ecx, 0xc9
call rax
test eax, eax
jne 0x140372f48
mov r8, qword [rbx + 0x40]
test r8, r8
je 0x140372d3e
mov rcx, qword [rbx + 0x18]
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x90]
mov qword [rbx + 0x40], 0
mov rax, qword [rdi + 0x10]
mov r8, qword [rsi + 0x30]
mov rcx, qword [rsi + 0x28]
mov rdx, qword [rax + 0x20]
movq xmm2, r8
punpcklqdq xmm6, xmm2
mov qword [rbx + 0x18], rcx
movups xmmword [rbx], xmm6
movsxd rdx, dword [rdx + 0xb8]
cmp r8, rdx
jle 0x140372e50
mov r9, qword [rbx]
movsxd rcx, dword [rax + 0xc]
mov rax, r9
cqo
mov rsi, rcx
idiv rcx
mov rax, qword [rbx + 0x30]
test rax, rax
je 0x140372ea4
test rdx, rdx
je 0x140372dc8
mov r10, qword [rbx + 8]
sub esi, edx
movsxd rcx, esi
mov r8, rcx
add rcx, r9
mov r11d, r10d
sub r11d, r9d
cmp rcx, r10
mov rcx, qword [rbx + 0x18]
cmovg r8d, r11d
add rdx, rax
mov rax, qword [rcx]
call qword [rax + 0x10]
test eax, eax
mov ebp, eax
jne 0x140372ddb
nop dword [rax]
lea rdx, [rsp + 0x48]
mov rcx, rbx
call sym.vdbePmaReadVarint.constprop.0
test eax, eax
mov ebp, eax
je 0x140372e20
movaps xmm6, xmmword [rsp + 0x50]
mov eax, ebp
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
mov rcx, rsi
call sym.vdbeIncrPopulate
movdqu xmm1, xmmword [rsi + 0x38]
mov ebp, eax
mov rax, qword [rsi + 0x10]
movups xmmword [rsi + 0x28], xmm1
cmp qword [rsi + 0x30], rax
je 0x140372e90
test ebp, ebp
jne 0x140372bee
jmp 0x140372cf0
mov rax, qword [rsp + 0x48]
lea r8, [rbx + 0x28]
mov rcx, rbx
mov dword [rbx + 0x14], eax
movaps xmm6, xmmword [rsp + 0x50]
mov edx, eax
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
jmp sym.vdbePmaReadBlob
mov r10, qword [rcx]
cmp dword [r10], 2
jle 0x140372d6e
lea r9, [rbx + 0x40]
xor edx, edx
call qword [r10 + 0x88]
test eax, eax
mov ebp, eax
jne 0x140372ddb
cmp qword [rbx + 0x40], 0
jne 0x140372dc8
mov rax, qword [rdi + 0x10]
jmp 0x140372d6e
test ebp, ebp
mov dword [rsi + 0x1c], 1
jne 0x140372bee
jmp 0x140372bec
mov qword [rsp + 0x38], rdx
mov ebp, 7
call sym.sqlite3Malloc
mov rdx, qword [rsp + 0x38]
mov dword [rbx + 0x38], esi
test rax, rax
mov qword [rbx + 0x30], rax
je 0x140372ddb
test rdx, rdx
je 0x140372dc8
mov r9, qword [rbx]
jmp 0x140372d92
mov qword [rdi], 0
mov qword [rdi + 8], 0
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
mov qword [rdi + 0x20], 0
call qword [sym.imp.kernel32.dll_GetCurrentThreadId]
mov rcx, rsi
mov dword [rdi + 8], eax
call sym.vdbeIncrPopulate
mov rdx, qword [rsi]
cdqe
mov dword [rdx + 8], 1
mov qword [rdi + 0x20], rax
jmp 0x140372cec
mov ecx, 0x28
call qword [0x140395140]
mov rdi, rax
jmp 0x140372c70
mov ebp, 0x10a
jmp 0x140372ddb
mov ebp, 7
jmp 0x140372bee