Function at 0x59a460
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
lea rdi, str.nth_value
mov rax, qword [rcx + 8]
mov r12, qword [rcx + 0x10]
mov r13, qword [rcx]
mov edx, dword [rax + 0x84]
mov rbx, rax
mov qword [rsp + 0xa0], rcx
mov qword [rsp + 0x30], rax
test edx, edx
je 0x59a4e1
jmp 0x59a858
lea rcx, str.first_value
cmp rax, rcx
je 0x59a4ee
lea rdx, [0x00744ba8]
cmp rax, rdx
je 0x59a630
lea rdx, str.lead
cmp rax, rdx
je 0x59a630
mov rbx, qword [rbx + 0x40]
test rbx, rbx
je 0x59a5f4
mov rsi, qword [rbx + 0x50]
mov rax, qword [rsi + 0x38]
cmp rax, rdi
jne 0x59a4a8
mov eax, dword [r13 + 0x44]
mov ebp, dword [rbx + 0x64]
lea r15d, [rax - 1]
movzx eax, byte [r13 + 0x1f]
mov dword [r13 + 0x44], r15d
test al, al
je 0x59a718
sub eax, 1
mov byte [r13 + 0x1f], al
movzx eax, al
mov r14d, dword [r13 + rax*4 + 0xe8]
mov r9d, dword [rbx + 0x60]
xor r8d, r8d
mov edx, 0x4b
mov rcx, r12
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
cmp qword [rsi + 0x38], rdi
je 0x59a730
mov dword [rsp + 0x20], 0
mov r9d, r14d
mov edx, 0x47
mov rcx, r12
mov r8d, 1
call dbg.sqlite3VdbeAddOp3
mov r9d, dword [rbx + 0x68]
mov dword [rsp + 0x20], r14d
mov r8d, r14d
mov rcx, r12
mov edx, 0x6a
call dbg.sqlite3VdbeAddOp3
mov eax, dword [rbx + 0x68]
mov dword [rsp + 0x20], r14d
mov r9d, r15d
mov edx, 0x36
mov rcx, r12
lea r8d, [rax + 1]
call dbg.sqlite3VdbeAddOp3
mov dword [rsp + 0x20], r14d
xor r9d, r9d
mov r8d, ebp
mov edx, 0x1e
mov rcx, r12
call dbg.sqlite3VdbeAddOp3
mov eax, dword [rbx + 0x60]
mov r9d, dword [rbx + 0x7c]
mov rcx, r12
mov edx, 0x5e
mov r8d, ebp
mov dword [rsp + 0x20], eax
call dbg.sqlite3VdbeAddOp3
mov edx, r15d
mov rcx, r12
call dbg.sqlite3VdbeResolveLabel
test r14d, r14d
je 0x59a4d4
mov edx, r14d
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
mov rbx, qword [rbx + 0x40]
test rbx, rbx
jne 0x59a4e1
mov rax, qword [rsp + 0xa0]
mov dword [rsp + 0x20], 0
mov edx, 0xa
mov rcx, r12
mov r9d, dword [rax + 0x18]
mov r8d, dword [rax + 0x1c]
call dbg.sqlite3VdbeAddOp3
nop
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rbx + 0x70]
mov ebp, dword [rbx + 0x64]
mov rax, qword [rax + 0x20]
mov r11d, dword [rax]
mov eax, dword [r13 + 0x44]
lea r15d, [rax - 1]
movzx eax, byte [r13 + 0x1f]
mov dword [r13 + 0x44], r15d
test al, al
je 0x59a840
sub eax, 1
mov byte [r13 + 0x1f], al
movzx eax, al
mov r14d, dword [r13 + rax*4 + 0xe8]
mov rax, qword [rsp + 0x30]
cmp r11d, 2
mov dword [rsp + 0x3c], r11d
mov r9d, dword [rbx + 0x60]
mov r10d, dword [rax + 0x58]
jg 0x59a770
xor r8d, r8d
mov edx, 0x4b
mov rcx, r12
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov r10d, dword [rsp + 0x40]
mov r9d, r14d
mov rcx, r12
mov dword [rsp + 0x20], 0
mov edx, 0x87
mov r8d, r10d
call dbg.sqlite3VdbeAddOp3
mov r11d, dword [rsp + 0x3c]
mov r10d, dword [rsp + 0x40]
cmp r11d, 2
je 0x59a7b6
lea rax, str.lead
cmp qword [rsi + 0x38], rax
mov r8d, r14d
mov edx, 0x56
sete al
mov dword [rsp + 0x20], 0
mov rcx, r12
movzx eax, al
lea r9d, [rax + rax - 1]
call dbg.sqlite3VdbeAddOp3
mov dword [rsp + 0x20], r14d
mov r9d, r15d
jmp 0x59a59d
mov eax, dword [r13 + 0x38]
lea r14d, [rax + 1]
mov dword [r13 + 0x38], r14d
jmp 0x59a51c
mov rsi, qword [rsp + 0x30]
mov eax, dword [rbx + 0x7c]
mov rcx, r12
mov edx, 0x5e
mov r8d, dword [rsi + 0x58]
mov dword [rsp + 0x20], r14d
lea r9d, [rax + 1]
call dbg.sqlite3VdbeAddOp3
mov r8d, 2
mov edx, r14d
mov rcx, r13
call dbg.windowCheckValue
jmp 0x59a560
mov eax, dword [rbx + 0x7c]
mov dword [rsp + 0x20], r9d
mov r8d, r10d
mov edx, 0x5e
mov rcx, r12
mov dword [rsp + 0x3c], r10d
lea r9d, [rax + 2]
call dbg.sqlite3VdbeAddOp3
mov r10d, dword [rsp + 0x3c]
mov r9d, r14d
mov rcx, r12
mov dword [rsp + 0x20], 0
mov edx, 0x87
mov r8d, r10d
call dbg.sqlite3VdbeAddOp3
mov r10d, dword [rsp + 0x3c]
lea rax, str.lead
xor r11d, r11d
cmp qword [rsi + 0x38], rax
movzx eax, byte [r13 + 0x1f]
setne r11b
add r11d, 0x6a
test al, al
je 0x59ab70
sub eax, 1
mov byte [r13 + 0x1f], al
movzx eax, al
mov esi, dword [r13 + rax*4 + 0xe8]
mov eax, dword [rbx + 0x7c]
mov dword [rsp + 0x20], esi
mov r8d, r10d
mov edx, 0x5e
mov rcx, r12
mov dword [rsp + 0x3c], r11d
lea r9d, [rax + 1]
call dbg.sqlite3VdbeAddOp3
mov r11d, dword [rsp + 0x3c]
mov r9d, r14d
mov r8d, esi
mov dword [rsp + 0x20], r14d
mov rcx, r12
mov edx, r11d
call dbg.sqlite3VdbeAddOp3
test esi, esi
je 0x59a704
mov edx, esi
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
jmp 0x59a704
mov eax, dword [r13 + 0x38]
lea r14d, [rax + 1]
mov dword [r13 + 0x38], r14d
jmp 0x59a669
mov edi, dword [rax + 0x64]
mov rax, qword [rax + 0x18]
xor esi, esi
test rax, rax
je 0x59a868
mov esi, dword [rax]
mov ebx, dword [r13 + 0x44]
lea eax, [rbx - 1]
sub ebx, 2
mov dword [rsp + 0x40], eax
movzx eax, byte [r13 + 0x1f]
mov dword [r13 + 0x44], ebx
test al, al
je 0x59ab98
lea edx, [rax - 1]
movzx ecx, dl
mov byte [r13 + 0x1f], dl
mov r15d, dword [r13 + rcx*4 + 0xe8]
test dl, dl
je 0x59ac95
sub eax, 2
mov byte [r13 + 0x1f], al
movzx eax, al
mov r14d, dword [r13 + rax*4 + 0xe8]
mov dword [rsp + 0x48], 0
mov dword [rsp + 0x3c], 0
test esi, esi
jne 0x59abb0
mov rbp, qword [rsp + 0x30]
mov r9d, r15d
mov edx, 0x87
mov rcx, r12
mov r8d, dword [rbp + 0x58]
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov r9d, dword [rsp + 0x3c]
mov r8d, dword [rbp + 0x58]
mov rax, qword [rsp + 0xa0]
mov rdx, qword [rax + 8]
mov rcx, qword [rax]
call sym.windowReadPeerValues.isra.0
nop dword [rax]
mov r9d, dword [rbp + 0x5c]
xor r8d, r8d
mov edx, 0x4b
mov rcx, r12
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov rbp, qword [rbp + 0x40]
test rbp, rbp
jne 0x59a910
mov rbp, qword [rsp + 0x30]
mov r9d, ebx
mov r8d, edi
mov edx, 0x17
mov rcx, r12
mov eax, dword [rbp + 0x84]
mov dword [rsp + 0x20], eax
call dbg.sqlite3VdbeAddOp3
mov r9d, r14d
mov r8d, edi
mov edx, 0x87
mov eax, dword [r12 + 0x90]
mov dword [rsp + 0x20], 0
mov rcx, r12
mov dword [rsp + 0x44], eax
call dbg.sqlite3VdbeAddOp3
mov r9d, ebx
mov edx, 0x36
mov rcx, r12
mov r8d, dword [rbp + 0x88]
mov dword [rsp + 0x20], r14d
call dbg.sqlite3VdbeAddOp3
movzx eax, byte [rbp + 0x24]
cmp al, 0x55
je 0x59ac00
cmp al, 0x42
je 0x59aa84
mov rbp, qword [rsp + 0x30]
mov rbx, qword [rbp + 0x18]
test rbx, rbx
je 0x59abd0
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, r13
call dbg.sqlite3KeyInfoFromExprList
xor r10d, r10d
cmp byte [rbp + 0x24], 0x5e
mov rbx, rax
je 0x59ac34
mov dword [rsp + 0x4c], r10d
test rbx, rbx
je 0x59ac6e
mov rax, qword [rsp + 0xa0]
mov ebp, dword [rsp + 0x48]
mov r8d, edi
mov rdx, qword [rax + 8]
mov rcx, qword [rax]
mov r9d, ebp
call sym.windowReadPeerValues.isra.0
mov dword [rsp + 0x20], esi
mov r8d, ebp
mov rcx, r12
mov r9d, dword [rsp + 0x3c]
mov edx, 0x5a
call dbg.sqlite3VdbeAddOp3
mov r8d, 0xfffffff8
mov rdx, rbx
mov rcx, r12
call sym.sqlite3VdbeAppendP4
mov eax, dword [r12 + 0x90]
mov r9d, dword [rsp + 0x40]
mov rcx, r12
mov edx, 0xe
lea r8d, [rax + 1]
mov dword [rsp + 0x20], r8d
call dbg.sqlite3VdbeAddOp3
movsxd r10, dword [rsp + 0x4c]
test r10d, r10d
je 0x59aa84
mov rcx, qword [r12]
mov edx, dword [r12 + 0x90]
lea rax, [0x007e7180]
cmp byte [rcx + 0x67], 0
je 0x59ac1f
mov dword [rax + 8], edx
mov rax, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0x30]
xor r9d, r9d
mov r8d, edi
mov eax, dword [rax + 0x20]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rax]
call sym.windowAggStep.isra.0
mov edx, dword [rsp + 0x40]
mov rcx, r12
call dbg.sqlite3VdbeResolveLabel
mov ebx, dword [rsp + 0x44]
mov r8d, edi
mov rcx, r12
mov dword [rsp + 0x20], 0
mov edx, 0x27
mov r9d, ebx
call dbg.sqlite3VdbeAddOp3
mov rdx, qword [r12]
mov eax, dword [r12 + 0x90]
cmp byte [rdx + 0x67], 0
jne 0x59ab80
sub ebx, 1
mov rcx, qword [r12 + 0x88]
movsxd rdx, ebx
lea rdx, [rdx + rdx*2]
shl rdx, 3
mov dword [rcx + rdx + 8], eax
lea rdx, [rcx + rdx + 0x30]
mov dword [rdx + 8], eax
test r14d, r14d
je 0x59ab21
mov edx, r14d
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
test r15d, r15d
je 0x59ab31
mov edx, r15d
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
test esi, esi
je 0x59ab50
cmp esi, 1
je 0x59ac54
cmp esi, dword [r13 + 0x28]
jle 0x59ab50
mov eax, dword [rsp + 0x48]
mov dword [r13 + 0x28], esi
mov dword [r13 + 0x2c], eax
mov rax, qword [rsp + 0xa0]
mov r8d, 1
mov rdx, qword [rax + 8]
mov rcx, qword [rax]
call sym.windowAggFinal.isra.0
jmp 0x59a5f4
mov eax, dword [r13 + 0x38]
lea esi, [rax + 1]
mov dword [r13 + 0x38], esi
jmp 0x59a7eb
mov dword [0x007e7188], eax
lea rdx, [0x007e7180]
jmp 0x59ab0e
mov eax, dword [r13 + 0x38]
lea r15d, [rax + 1]
mov r14d, r15d
add r14d, 1
mov dword [r13 + 0x38], r14d
jmp 0x59a8b3
mov edx, esi
mov rcx, r13
call sym.sqlite3GetTempRange
mov edx, esi
mov dword [rsp + 0x3c], eax
call sym.sqlite3GetTempRange
mov dword [rsp + 0x48], eax
jmp 0x59a8cb
cmp al, 0x5e
je 0x59ac34
mov r9d, dword [rsp + 0x40]
xor r8d, r8d
mov edx, 9
mov rcx, r12
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
jmp 0x59aa84
mov dword [rsp + 0x20], r14d
mov r9d, dword [rsp + 0x40]
mov r8d, r15d
mov rcx, r12
mov edx, 0x35
call dbg.sqlite3VdbeAddOp3
jmp 0x59aa84
mov rax, qword [r12 + 0x88]
lea rcx, [r10 + r10*2]
lea rax, [rax + rcx*8]
jmp 0x59aa81
mov dword [rsp + 0x20], r14d
xor r9d, r9d
mov r8d, r15d
mov edx, 0x35
mov rcx, r12
call dbg.sqlite3VdbeAddOp3
mov r10d, eax
jmp 0x59a9e1
mov edx, dword [rsp + 0x48]
mov rcx, r13
call sym.sqlite3ReleaseTempRange.part.0
mov edx, dword [rsp + 0x3c]
call sym.sqlite3ReleaseTempRange.part.0
jmp 0x59ab50
mov r9d, dword [rsp + 0x40]
xor r8d, r8d
mov edx, 9
mov rcx, r12
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
movsxd r10, dword [rsp + 0x4c]
jmp 0x59aa5f
mov r14d, dword [r13 + 0x38]
jmp 0x59aba3