Function at 0x140388420
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 rbp, qword [rcx]
mov r14, qword [rcx + 8]
mov rsi, qword [rcx + 0x10]
mov eax, dword [rbp + 0x44]
mov rbx, rcx
mov edi, edx
mov r12d, r8d
movzx r13d, byte [r14 + 0x20]
mov dword [rsp + 0xb8], r9d
mov dword [rsp + 0x40], eax
sub eax, 1
cmp edx, 2
mov dword [rsp + 0x44], eax
mov dword [rbp + 0x44], eax
je 0x1403888f8
test r8d, r8d
jle 0x140388585
cmp r13b, 0x59
jne 0x140388568
mov ecx, dword [rsi + 0x90]
mov dword [rsp + 0x28], eax
mov r9d, r8d
mov edx, 0x36
mov eax, dword [rbx + 0x34]
mov dword [rsp + 0x3c], ecx
mov rcx, rbx
mov dword [rsp + 0x20], eax
mov r8d, dword [rbx + 0x3c]
call sym.windowCodeRangeTest
test r12d, r12d
setne r12b
cmp edi, 1
je 0x14038859d
mov eax, dword [rsi + 0x90]
mov dword [rsp + 0x4c], eax
movzx eax, byte [r14 + 0x22]
cmp byte [r14 + 0x21], al
jne 0x1403884d4
test r12b, r12b
jne 0x140388a00
cmp edi, 2
je 0x14038896e
mov r10d, dword [r14 + 0x84]
mov eax, dword [rbx + 0x40]
mov r12d, dword [rbx + 0x3c]
test r10d, r10d
mov dword [rsp + 0x48], eax
je 0x1403889b0
mov r8d, dword [r14 + 0x88]
mov r9d, 1
mov edx, 0x56
mov rcx, rsi
call sym.sqlite3VdbeAddOp3.constprop.0
cmp dword [rbx + 0x24], edi
jne 0x14038868c
nop dword [rax + rax]
xor r9d, r9d
mov r8d, r12d
mov edx, 0x82
mov rcx, rsi
call sym.sqlite3VdbeAddOp3.constprop.0
movsxd rax, dword [rsi + 0x90]
test eax, eax
jle 0x140388693
mov r8, qword [rsi + 0x88]
movsxd rdx, eax
mov r9d, 2
lea rdx, [rdx + rdx*2]
lea rdx, [r8 + rdx*8]
mov word [rdx - 0x16], r9w
jmp 0x140388693
mov r9d, dword [rsp + 0x44]
mov r8d, r12d
mov edx, 0x3b
mov rcx, rsi
mov dword [rsp + 0x20], 1
call sym.sqlite3VdbeAddOp3
test r12d, r12d
mov dword [rsp + 0x3c], 0
setne r12b
cmp edi, 1
jne 0x1403884b6
mov r15d, dword [r14 + 0x84]
test r15d, r15d
je 0x140388a80
mov eax, dword [rsi + 0x90]
mov dword [rsp + 0x4c], eax
movzx eax, byte [r14 + 0x21]
cmp byte [r14 + 0x22], al
jne 0x140388670
test r12b, r12b
je 0x140388670
cmp byte [r14 + 0x20], 0x59
jne 0x140388670
movzx eax, byte [rbp + 0x1f]
test al, al
je 0x140388b70
lea edx, [rax - 1]
movzx ecx, dl
test dl, dl
mov byte [rbp + 0x1f], dl
mov r12d, dword [rbp + rcx*4 + 0xe4]
je 0x140388c98
sub eax, 2
mov byte [rbp + 0x1f], al
movzx eax, al
mov r15d, dword [rbp + rax*4 + 0xe4]
cmp edi, 2
je 0x140388bf0
mov r11d, dword [rbx + 0x28]
test r11d, r11d
jne 0x140388bb8
test r12d, r12d
je 0x140388645
movzx eax, byte [rbp + 0x1f]
cmp al, 7
ja 0x140388c60
lea edx, [rax + 1]
mov byte [rbp + 0x1f], dl
mov dword [rbp + rax*4 + 0xe4], r12d
test r15d, r15d
je 0x140388660
movzx eax, byte [rbp + 0x1f]
cmp al, 7
ja 0x140388660
lea edx, [rax + 1]
mov byte [rbp + 0x1f], dl
mov dword [rbp + rax*4 + 0xe4], r15d
cmp edi, 1
jne 0x1403884d4
nop dword [rax]
mov eax, dword [rbx + 0x38]
mov rcx, rbx
mov r12d, dword [rbx + 0x34]
mov dword [rsp + 0x48], eax
call sym.windowReturnOneRow
cmp dword [rbx + 0x24], edi
je 0x140388520
movsxd rax, dword [rsi + 0x90]
mov ecx, dword [rsp + 0xb8]
mov edx, dword [rsi + 0x94]
test ecx, ecx
je 0x140388788
lea r9d, [rax + 2]
movd xmm0, r12d
cmp eax, edx
movd xmm1, r9d
punpckldq xmm0, xmm1
jge 0x140388ae0
lea r15d, [rax + 1]
lea rcx, [rax + rax*2]
mov rax, qword [rsi + 0x88]
mov dword [rsi + 0x90], r15d
lea rax, [rax + rcx*8]
movq qword [rax + 4], xmm0
mov dword [rax + 0xc], 0
mov qword [rax + 0x10], 0
mov dword [rax], 0x27
cmp r15d, edx
jge 0x140388ab8
lea eax, [r15 + 1]
mov dword [rsi + 0x90], eax
movsxd rax, r15d
lea rdx, [rax + rax*2]
mov rax, qword [rsi + 0x88]
lea rax, [rax + rdx*8]
mov qword [rax], 9
mov qword [rax + 8], 0
mov qword [rax + 0x10], 0
cmp r13b, 0x4c
jne 0x140388840
mov eax, dword [rsp + 0x3c]
test eax, eax
jne 0x1403888a8
mov rcx, qword [rsi + 0x18]
mov r8d, dword [rsp + 0x40]
mov eax, dword [rcx + 0x44]
neg r8d
add eax, dword [rcx + 0x48]
js 0x1403889a0
mov edx, dword [rsi + 0x90]
movsxd r8, r8d
mov rax, qword [rcx + 0x50]
mov dword [rax + r8*4], edx
mov eax, r15d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea ecx, [rax + 1]
xor r9d, r9d
cmp r13b, 0x4c
setne r9b
movd xmm0, r12d
add r9d, ecx
cmp eax, edx
movd xmm2, r9d
punpckldq xmm0, xmm2
jge 0x140388a98
lea rdx, [rax + rax*2]
mov rax, qword [rsi + 0x88]
mov dword [rsi + 0x90], ecx
lea rax, [rax + rdx*8]
movq qword [rax + 4], xmm0
mov dword [rax + 0xc], 0
mov qword [rax + 0x10], 0
mov dword [rax], 0x27
xor r15d, r15d
cmp r13b, 0x4c
je 0x14038873c
movsxd rax, dword [rsi + 0x90]
cmp eax, dword [rsi + 0x94]
jge 0x140388b38
lea edx, [rax + 1]
mov edi, dword [rsp + 0x44]
mov dword [rsi + 0x90], edx
lea rdx, [rax + rax*2]
mov rax, qword [rsi + 0x88]
lea rax, [rax + rdx*8]
mov dword [rax + 8], edi
mov dword [rax + 0xc], 0
mov qword [rax + 0x10], 0
mov qword [rax], 9
xor r15d, r15d
nop word cs:[rax + rax]
mov rax, qword [r14 + 0x18]
test rax, rax
je 0x140388853
mov edi, dword [rax]
test edi, edi
jne 0x140388a10
mov rdx, qword [rbx + 8]
xor r9d, r9d
mov r8d, r12d
xor edi, edi
mov rcx, qword [rbx]
xor r13d, r13d
call sym.windowReadPeerValues.isra.0
mov eax, dword [rsp + 0x4c]
xor r8d, r8d
mov rcx, rbp
mov rdx, qword [r14 + 0x18]
mov r9d, dword [rsp + 0x48]
mov dword [rsp + 0x20], eax
call sym.windowIfNewPeer
cmp dword [rbp + 0x28], edi
jge 0x14038873c
mov eax, dword [rsp + 0x3c]
mov dword [rbp + 0x28], edi
mov dword [rbp + 0x2c], r13d
test eax, eax
je 0x140388748
nop word [rax + rax]
movsxd rax, dword [rsi + 0x90]
cmp eax, dword [rsi + 0x94]
jge 0x140388b10
lea edx, [rax + 1]
mov edi, dword [rsp + 0x3c]
mov dword [rsi + 0x90], edx
lea rdx, [rax + rax*2]
mov rax, qword [rsi + 0x88]
lea rax, [rax + rdx*8]
mov dword [rax + 8], edi
mov dword [rax + 0xc], 0
mov qword [rax + 0x10], 0
mov qword [rax], 9
jmp 0x140388748
movzx eax, byte [r14 + 0x21]
xor r15d, r15d
cmp al, 0x5a
je 0x140388771
test r8d, r8d
jle 0x1403889f0
cmp r13b, 0x59
jne 0x140388568
mov ecx, dword [rsi + 0x90]
cmp al, 0x56
mov eax, dword [rsp + 0x44]
mov r8d, dword [rbx + 0x2c]
mov edx, dword [rbx + 0x34]
mov dword [rsp + 0x3c], ecx
mov dword [rsp + 0x28], eax
je 0x140388b90
mov dword [rsp + 0x20], edx
mov r9d, r12d
mov edx, 0x39
mov rcx, rbx
call sym.windowCodeRangeTest
movzx eax, byte [r14 + 0x21]
mov ecx, dword [rsi + 0x90]
cmp byte [r14 + 0x22], al
mov dword [rsp + 0x4c], ecx
jne 0x14038896e
test r12d, r12d
jne 0x140388b60
mov r8d, dword [r14 + 0x84]
mov eax, dword [rbx + 0x30]
mov r12d, dword [rbx + 0x2c]
test r8d, r8d
mov dword [rsp + 0x48], eax
je 0x1403889d0
mov r9d, 1
mov edx, 0x56
mov rcx, rsi
call sym.sqlite3VdbeAddOp3.constprop.0
jmp 0x140388683
mov rdx, rsi
call sym.resizeResolveLabel
jmp 0x140388771
mov eax, dword [rbx + 0x20]
xor r9d, r9d
mov r8d, r12d
mov rdx, r14
mov rcx, qword [rbx]
mov dword [rsp + 0x20], eax
call sym.windowAggStep.isra.0
jmp 0x140388683
mov eax, dword [rbx + 0x20]
mov r9d, 1
mov r8d, r12d
mov rdx, r14
mov rcx, qword [rbx]
mov dword [rsp + 0x20], eax
call sym.windowAggStep.isra.0
jmp 0x140388683
mov dword [rsp + 0x3c], 0
jmp 0x140388955
cmp byte [r14 + 0x20], 0x59
jne 0x1403884d4
jmp 0x1403885da
mov edx, edi
mov rcx, rbp
call sym.sqlite3GetTempRange
mov rdx, qword [rbx + 8]
mov r8d, r12d
mov rcx, qword [rbx]
mov r9d, eax
mov r13d, eax
call sym.windowReadPeerValues.isra.0
mov eax, dword [rsp + 0x4c]
mov r8d, r13d
mov rcx, rbp
mov rdx, qword [r14 + 0x18]
mov r9d, dword [rsp + 0x48]
mov dword [rsp + 0x20], eax
call sym.windowIfNewPeer
cmp edi, 1
jne 0x140388886
test r13d, r13d
je 0x14038873c
movzx eax, byte [rbp + 0x1f]
cmp al, 7
ja 0x14038873c
lea edx, [rax + 1]
mov byte [rbp + 0x1f], dl
mov dword [rbp + rax*4 + 0xe4], r13d
jmp 0x14038873c
mov rdx, qword [rbx + 8]
xor r8d, r8d
mov rcx, qword [rbx]
call sym.windowAggFinal.isra.0
jmp 0x1403885ad
mov dword [rsp + 0x20], 0
mov r8d, r12d
mov edx, 0x27
mov rcx, rsi
call sym.growOp3
jmp 0x1403887de
mov dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
mov edx, 9
mov rcx, rsi
call sym.growOp3
mov r15d, eax
jmp 0x140388732
mov edx, 0x27
mov dword [rsp + 0x20], 0
mov r8d, r12d
mov rcx, rsi
call sym.growOp3
mov r15d, dword [rsi + 0x90]
mov edx, dword [rsi + 0x94]
jmp 0x1403886f6
mov r9d, dword [rsp + 0x3c]
xor r8d, r8d
mov edx, 9
mov rcx, rsi
mov dword [rsp + 0x20], 0
call sym.growOp3
jmp 0x140388748
mov r9d, dword [rsp + 0x44]
xor r8d, r8d
mov edx, 9
mov rcx, rsi
mov dword [rsp + 0x20], 0
call sym.growOp3
jmp 0x140388833
cmp byte [r14 + 0x20], 0x59
jne 0x14038896e
jmp 0x1403885da
mov eax, dword [rbp + 0x38]
lea r12d, [rax + 1]
mov eax, r12d
lea r15d, [rax + 1]
mov dword [rbp + 0x38], r15d
jmp 0x140388610
mov dword [rsp + 0x20], r8d
mov r9d, r12d
mov r8d, edx
mov rcx, rbx
mov edx, 0x37
call sym.windowCodeRangeTest
movzx eax, byte [r14 + 0x21]
jmp 0x140388955
mov r8d, dword [rbx + 0x3c]
mov r9d, r12d
mov rcx, rsi
mov edx, 0x87
call sym.sqlite3VdbeAddOp3.constprop.0
mov dword [rsp + 0x20], r12d
mov r9d, dword [rsp + 0x44]
mov rcx, rsi
mov r8d, dword [rbx + 0x28]
mov edx, 0x39
call sym.sqlite3VdbeAddOp3
jmp 0x140388626
mov r8d, dword [rbx + 0x2c]
mov r9d, r12d
mov edx, 0x87
mov rcx, rsi
call sym.sqlite3VdbeAddOp3.constprop.0
mov r8d, dword [rbx + 0x3c]
mov r9d, r15d
mov rcx, rsi
mov edx, 0x87
call sym.sqlite3VdbeAddOp3.constprop.0
mov r9d, dword [rsp + 0x44]
mov r8d, r15d
mov rcx, rsi
mov dword [rsp + 0x20], r12d
mov edx, 0x39
call sym.sqlite3VdbeAddOp3
test r12d, r12d
je 0x140388c70
movzx eax, byte [rbp + 0x1f]
cmp al, 7
ja 0x14038896e
lea edx, [rax + 1]
test r15d, r15d
mov byte [rbp + 0x1f], dl
mov dword [rbp + rax*4 + 0xe4], r12d
jne 0x14038864a
jmp 0x14038896e
cmp edi, 1
jne 0x1403884dd
jmp 0x140388670
test r15d, r15d
je 0x14038896e
movzx eax, byte [rbp + 0x1f]
cmp al, 7
ja 0x14038896e
lea edx, [rax + 1]
mov byte [rbp + 0x1f], dl
mov dword [rbp + rax*4 + 0xe4], r15d
jmp 0x14038896e
mov eax, dword [rbp + 0x38]
jmp 0x140388b7a