Function at 0x59aca0
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, 0x48
mov rsi, qword [rcx + 8]
mov r13, qword [rcx]
mov r15, qword [rcx + 0x10]
movzx eax, byte [rsi + 0x20]
mov byte [rsp + 0x34], al
mov eax, dword [r13 + 0x44]
mov rbx, rcx
mov ebp, edx
mov dword [rsp + 0xa8], r9d
mov edi, r8d
lea r12d, [rax - 1]
mov dword [r13 + 0x44], r12d
cmp edx, 2
je 0x59af70
test r8d, r8d
jle 0x59ad12
cmp byte [rsi + 0x20], 0x59
je 0x59b190
mov r9d, r12d
mov r8d, edi
mov edx, 0x3b
mov rcx, r15
mov dword [rsp + 0x20], 1
call dbg.sqlite3VdbeAddOp3
mov dword [rsp + 0x30], 0
cmp ebp, 1
je 0x59ae40
mov eax, dword [r15 + 0x90]
mov dword [rsp + 0x3c], eax
movzx eax, byte [rsi + 0x22]
cmp byte [rsi + 0x21], al
je 0x59b040
cmp ebp, 2
je 0x59afdb
mov eax, dword [rbx + 0x40]
mov r9d, dword [rsi + 0x84]
mov edi, dword [rbx + 0x3c]
mov dword [rsp + 0x38], eax
test r9d, r9d
je 0x59b0d8
mov r8d, dword [rsi + 0x88]
mov dword [rsp + 0x20], 0
mov r9d, 1
mov edx, 0x56
mov rcx, r15
call dbg.sqlite3VdbeAddOp3
cmp dword [rbx + 0x24], ebp
jne 0x59ae93
xor r9d, r9d
mov r8d, edi
mov edx, 0x82
mov rcx, r15
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov eax, dword [r15 + 0x90]
test eax, eax
jle 0x59ae9a
mov rcx, qword [r15 + 0x88]
movsxd rdx, eax
mov r8d, 2
lea rdx, [rdx + rdx*2]
lea rdx, [rcx + rdx*8]
mov word [rdx - 0x16], r8w
mov edx, dword [rsp + 0xa8]
test edx, edx
jne 0x59aea9
nop
movzx ebp, byte [rsp + 0x34]
xor edx, edx
mov r8d, edi
mov rcx, r15
mov dword [rsp + 0x20], 0
cmp bpl, 0x4c
setne dl
xor r14d, r14d
lea r9d, [rax + rdx + 1]
mov edx, 0x27
call dbg.sqlite3VdbeAddOp3
cmp bpl, 0x4c
je 0x59af40
mov r9d, r12d
xor r8d, r8d
mov edx, 9
mov rcx, r15
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
jmp 0x59aeea
mov r11d, dword [rsi + 0x84]
test r11d, r11d
je 0x59b1c0
mov eax, dword [r15 + 0x90]
mov dword [rsp + 0x3c], eax
movzx eax, byte [rsi + 0x21]
cmp byte [rsi + 0x22], al
jne 0x59ae78
test edi, edi
je 0x59ae78
cmp byte [rsi + 0x20], 0x59
je 0x59b058
nop word [rax + rax]
mov eax, dword [rbx + 0x38]
mov rcx, rbx
mov edi, dword [rbx + 0x34]
mov dword [rsp + 0x38], eax
call dbg.windowReturnOneRow
cmp dword [rbx + 0x24], ebp
je 0x59ad89
mov eax, dword [r15 + 0x90]
mov edx, dword [rsp + 0xa8]
test edx, edx
je 0x59ade0
lea r9d, [rax + 2]
mov r8d, edi
mov edx, 0x27
mov rcx, r15
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
xor r9d, r9d
xor r8d, r8d
mov edx, 9
mov dword [rsp + 0x20], 0
mov rcx, r15
call dbg.sqlite3VdbeAddOp3
cmp byte [rsp + 0x34], 0x4c
mov r14d, eax
je 0x59af40
mov rax, qword [rsi + 0x18]
test rax, rax
je 0x59aeff
mov r11d, dword [rax]
test r11d, r11d
jne 0x59b130
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx]
xor r9d, r9d
mov r8d, edi
xor ebp, ebp
call sym.windowReadPeerValues.isra.0
mov eax, dword [rsp + 0x3c]
mov rdx, qword [rsi + 0x18]
xor r8d, r8d
mov r9d, dword [rsp + 0x38]
mov rcx, r13
mov dword [rsp + 0x20], eax
call dbg.windowIfNewPeer
xor r11d, r11d
cmp dword [r13 + 0x28], r11d
jge 0x59af40
mov dword [r13 + 0x28], r11d
mov dword [r13 + 0x2c], ebp
mov eax, dword [rsp + 0x30]
test eax, eax
jne 0x59b018
mov edx, r12d
mov rcx, r15
call dbg.sqlite3VdbeResolveLabel
mov eax, r14d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movzx eax, byte [rsi + 0x21]
xor r14d, r14d
cmp al, 0x5a
je 0x59af57
test r8d, r8d
jle 0x59b0f8
cmp byte [rsi + 0x20], 0x59
jne 0x59acf7
mov eax, dword [r15 + 0x90]
cmp byte [rsi + 0x21], 0x56
mov r8d, dword [rbx + 0x2c]
mov dword [rsp + 0x30], eax
mov eax, dword [rbx + 0x34]
je 0x59b1f0
mov dword [rsp + 0x28], r12d
mov r9d, edi
mov edx, 0x39
mov rcx, rbx
mov dword [rsp + 0x20], eax
call dbg.windowCodeRangeTest
mov eax, dword [r15 + 0x90]
mov dword [rsp + 0x3c], eax
movzx eax, byte [rsi + 0x22]
cmp byte [rsi + 0x21], al
je 0x59b11d
mov eax, dword [rbx + 0x30]
mov r8d, dword [rsi + 0x84]
mov edi, dword [rbx + 0x2c]
mov dword [rsp + 0x38], eax
test r8d, r8d
jne 0x59ad65
mov eax, dword [rbx + 0x20]
mov rcx, qword [rbx]
mov r9d, 1
mov r8d, edi
mov rdx, rsi
mov dword [rsp + 0x20], eax
call sym.windowAggStep.isra.0
jmp 0x59ae8a
mov r9d, dword [rsp + 0x30]
xor r8d, r8d
mov edx, 9
mov rcx, r15
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
jmp 0x59af4c
test edi, edi
je 0x59ad3b
cmp byte [rsi + 0x20], 0x59
jne 0x59ad3b
nop word [rax + rax]
movzx eax, byte [r13 + 0x1f]
test al, al
je 0x59b1d8
lea edx, [rax - 1]
movzx ecx, dl
mov byte [r13 + 0x1f], dl
mov r14d, dword [r13 + rcx*4 + 0xe8]
test dl, dl
je 0x59b2ad
sub eax, 2
mov byte [r13 + 0x1f], al
movzx eax, al
mov edi, dword [r13 + rax*4 + 0xe8]
cmp ebp, 2
je 0x59b258
mov r10d, dword [rbx + 0x28]
test r10d, r10d
jne 0x59b218
test r14d, r14d
je 0x59b0b7
mov edx, r14d
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
test edi, edi
je 0x59b0c5
mov edx, edi
mov rcx, r13
call sym.sqlite3ReleaseTempReg.part.0
cmp ebp, 1
jne 0x59ad3b
jmp 0x59ae78
mov eax, dword [rbx + 0x20]
mov rcx, qword [rbx]
xor r9d, r9d
mov r8d, edi
mov rdx, rsi
mov dword [rsp + 0x20], eax
call sym.windowAggStep.isra.0
jmp 0x59ae8a
mov ecx, dword [r15 + 0x90]
cmp byte [rsi + 0x22], al
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x3c], ecx
jne 0x59afdb
test r8d, r8d
je 0x59afdb
cmp byte [rsi + 0x20], 0x59
jne 0x59afdb
jmp 0x59b058
mov edx, r11d
mov rcx, r13
mov dword [rsp + 0x34], r11d
call sym.sqlite3GetTempRange
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx]
mov r8d, edi
mov r9d, eax
mov ebp, eax
call sym.windowReadPeerValues.isra.0
mov eax, dword [rsp + 0x3c]
mov rdx, qword [rsi + 0x18]
mov r8d, ebp
mov r9d, dword [rsp + 0x38]
mov rcx, r13
mov dword [rsp + 0x20], eax
call dbg.windowIfNewPeer
mov r11d, dword [rsp + 0x34]
cmp r11d, 1
jne 0x59af32
mov edx, ebp
mov rcx, r13
call sym.sqlite3ReleaseTempRange.part.0
jmp 0x59af40
mov r8d, dword [rbx + 0x3c]
mov r9d, edi
mov edx, 0x36
mov rcx, rbx
mov eax, dword [r15 + 0x90]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x30], eax
mov eax, dword [rbx + 0x34]
mov dword [rsp + 0x20], eax
call dbg.windowCodeRangeTest
jmp 0x59ad1a
mov rdx, qword [rbx + 8]
mov rcx, qword [rbx]
xor r8d, r8d
call sym.windowAggFinal.isra.0
jmp 0x59ae50
mov eax, dword [r13 + 0x38]
lea r14d, [rax + 1]
mov eax, r14d
lea edi, [rax + 1]
mov dword [r13 + 0x38], edi
jmp 0x59b091
mov dword [rsp + 0x20], r8d
mov r9d, edi
mov r8d, eax
mov edx, 0x37
mov dword [rsp + 0x28], r12d
mov rcx, rbx
call dbg.windowCodeRangeTest
jmp 0x59afc3
mov r8d, dword [rbx + 0x3c]
mov r9d, r14d
mov rcx, r15
mov edx, 0x87
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov dword [rsp + 0x20], r14d
mov r9d, r12d
mov rcx, r15
mov r8d, dword [rbx + 0x28]
mov edx, 0x39
call dbg.sqlite3VdbeAddOp3
jmp 0x59b0a7
mov r8d, dword [rbx + 0x2c]
mov r9d, r14d
mov rcx, r15
mov edx, 0x87
mov dword [rsp + 0x20], 0
call dbg.sqlite3VdbeAddOp3
mov r8d, dword [rbx + 0x3c]
mov r9d, edi
mov rcx, r15
mov dword [rsp + 0x20], 0
mov edx, 0x87
call dbg.sqlite3VdbeAddOp3
mov dword [rsp + 0x20], r14d
mov r9d, r12d
mov r8d, edi
mov edx, 0x39
mov rcx, r15
call dbg.sqlite3VdbeAddOp3
jmp 0x59b0a7
mov eax, dword [r13 + 0x38]
jmp 0x59b1e3