Function at 0x580780
Capabilities:
Resolve function by parsing pe exports

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x580dcb
push rbp
mov rbp, rsp
sub rsp, 0x78
movq qword [rsp + 0x70], xmm15
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x90], rbx
mov qword [rsp + 0x98], rcx
mov byte [rsp + 0x21], 0
mov ebx, 0x20
nop dword [rax + rax]
call sym.modernc.org_libc._TLS_.Alloc
lea rcx, [sym.modernc.org_sqlite_lib._sqlite3VdbeMakeReady.deferwrap1]
mov qword [rsp + 0x60], rcx
mov rcx, qword [rsp + 0x88]
mov qword [rsp + 0x68], rcx
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x70], rdx
mov byte [rsp + 0x21], 1
mov rbx, qword [rsp + 0x90]
mov rdx, rbx
mov rsi, qword [rsp + 0x98]
mov rdi, rsi
mov rsi, qword [rsi + 0x148]
mov qword [rdx + 0xb0], rsi
mov rdx, rdi
mov qword [rdi + 0x148], 0
mov rsi, rbx
mov rdi, rax
mov r8, rdx
mov r9d, dword [rdx + 0x38]
mov r10d, dword [rdx + 0x34]
mov dword [rsp + 0x28], r10d
mov r11d, dword [rdx + 0x90]
mov rsi, qword [rsi]
mov qword [rsp + 0x30], rsi
movzx edx, word [rdx + 0x130]
mov word [rsp + 0x22], dx
mov dword [rax], r11d
lea r11d, [r9 + r10]
test r10d, r10d
jne 0x58086d
nop dword [rax]
test r11d, r11d
jle 0x58086d
lea r11d, [r9 + r10]
lea r11d, [r11 + 1]
mov qword [rsp + 0x58], rdi
mov dword [rsp + 0x24], r11d
lea rdx, [rdi + 8]
mov qword [rsp + 0x50], rdx
mov rsi, rdx
mov r9, rbx
movsxd r10, dword [r9 + 0x90]
lea r10, [r10 + r10*2]
shl r10, 3
movsxd r12, r10d
add r12, qword [r9 + 0x88]
mov qword [rdx], r12
mov r8d, dword [r8 + 0x3c]
sub r8d, r10d
and r8d, 0xfffffff8
movsxd r8, r8d
mov qword [rsi + 8], r8
mov rax, rcx
mov rcx, rdi
call sym.modernc.org_sqlite_lib._resolveP2Values
mov rdx, qword [rsp + 0x98]
mov rsi, rdx
cmp byte [rdx + 0x20], 0
je 0x5808da
cmp byte [rdx + 0x21], 0
setne r8b
jmp 0x5808dd
xor r8d, r8d
mov r9, qword [rsp + 0x90]
lea r10, [r9 + 0xc8]
mov r11, r10
movzx r12d, word [r10]
and r12d, 0xffffffdf
movzx r8d, r8b
shl r8d, 5
and r8d, 0x20
or r8d, r12d
mov word [r10], r8w
movzx esi, byte [rsi + 0x133]
test sil, sil
je 0x58096e
mov r8, r11
movzx r10d, word [r11]
and r10d, 0xfffffff3
shl esi, 2
and esi, 0xc
or r10d, esi
nop
mov word [r11], r10w
mov rsi, r9
mov r10, r8
movzx r8d, word [r8]
and r8d, 0xc
shr r8w, 2
movzx r8d, r8w
shl r8d, 2
add r8d, 0xfffffff4
neg r8d
mov word [r9 + 0xc0], r8w
mov r11d, dword [rsp + 0x24]
cmp r11d, 0xa
mov r8d, 0xa
cmovl r11d, r8d
jmp 0x580979
mov rsi, r9
mov r10, r11
mov r11d, dword [rsp + 0x24]
movsxd r8, r11d
imul r8, r8, 0x38
movzx r9d, word [r10]
and r9d, 0xfffffffc
nop
mov word [r10], r9w
mov r9, qword [rsp + 0x50]
mov r10, r9
mov qword [r9 + 0x10], 0
mov r9, r10
cmp qword [r10 + 8], r8
jl 0x5809bf
mov r10, qword [rsp + 0x58]
lea r12, [r10 + 0x10]
sub qword [r12], r8
mov r12, r9
mov r13, qword [r9 + 8]
add r13, qword [r9]
jmp 0x5809d2
mov r10, qword [rsp + 0x58]
lea r12, [r10 + 0x18]
add qword [r12], r8
mov r12, r9
xor r13d, r13d
mov r9, rsi
mov qword [rsi + 0x68], r13
movzx esi, word [rsp + 0x22]
movsx r13, si
imul r13, r13, 0x38
mov r15, r12
cmp qword [r12 + 8], r13
jl 0x580a04
lea r12, [r10 + 0x10]
sub qword [r12], r13
mov r12, r15
mov rax, qword [r15 + 8]
add rax, qword [r15]
jmp 0x580a11
lea r12, [r10 + 0x18]
add qword [r12], r13
mov r12, r15
xor eax, eax
mov r15, r9
mov qword [r9 + 0x80], rax
mov r9, r10
movsxd r10, dword [r10]
shl r10, 3
mov rax, r12
cmp qword [r12 + 8], r10
jl 0x580a43
lea r12, [r9 + 0x10]
sub qword [r12], r10
mov r10, rax
mov r12, qword [rax + 8]
add r12, qword [rax]
jmp 0x580a50
lea rcx, [r9 + 0x18]
add qword [rcx], r10
mov r10, rax
xor r12d, r12d
mov rax, r15
mov qword [r15 + 0x70], r12
mov r12d, dword [rsp + 0x28]
movsxd rdi, r12d
shl rdi, 3
mov r15, r10
cmp qword [r10 + 8], rdi
jl 0x580a7f
lea r10, [r9 + 0x10]
sub qword [r10], rdi
mov r10, r15
mov rcx, qword [r15 + 8]
add rcx, qword [r15]
jmp 0x580a8b
lea r10, [r9 + 0x18]
add qword [r10], rdi
mov r10, r15
xor ecx, ecx
mov r15, rax
mov qword [rax + 0x78], rcx
mov rcx, qword [r10 + 0x10]
test rcx, rcx
je 0x580c63
mov qword [rsp + 0x48], r8
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x2c], r11d
mov rax, qword [rsp + 0x88]
mov rbx, qword [rsp + 0x30]
call sym.modernc.org_sqlite_lib._sqlite3DbMallocRawNN
mov rdx, qword [rsp + 0x90]
mov rsi, rdx
mov qword [rdx + 0x100], rax
mov rdx, qword [rsp + 0x50]
mov rdi, rdx
mov qword [rdx], rax
mov rdx, rdi
mov r8, qword [rdi + 0x10]
mov qword [rdi + 8], r8
mov rdi, qword [rsp + 0x30]
mov r8, rdi
cmp byte [rdi + 0x67], 0
je 0x580b08
mov rdi, qword [rsp + 0x38]
mov r10, rsi
jmp 0x580c51
mov r9, rsi
mov rsi, qword [rsi + 0x68]
test rsi, rsi
jne 0x580b54
mov rsi, rdx
mov r10, qword [rsp + 0x48]
nop dword [rax]
cmp qword [rdx + 8], r10
jl 0x580b3f
mov r11, qword [rsp + 0x58]
lea r12, [r11 + 0x10]
sub qword [r12], r10
mov r10, rsi
mov r12, qword [rsi + 8]
add r12, qword [rsi]
jmp 0x580b5f
mov r11, qword [rsp + 0x58]
lea r13, [r11 + 0x18]
add qword [r13], r10
mov r10, rsi
xor r12d, r12d
jmp 0x580b5f
mov r10, rdx
mov r11, qword [rsp + 0x58]
mov r12, rsi
mov rsi, r9
mov qword [r9 + 0x68], r12
mov r9, rsi
mov rsi, qword [rsi + 0x80]
test rsi, rsi
jne 0x580ba8
mov rsi, r10
mov r12, qword [rsp + 0x40]
nop dword [rax]
cmp qword [r10 + 8], r12
jl 0x580b99
lea r10, [r11 + 0x10]
sub qword [r10], r12
mov r10, rsi
mov r12, qword [rsi + 8]
add r12, qword [rsi]
jmp 0x580bab
lea r10, [r11 + 0x18]
add qword [r10], r12
mov r10, rsi
xor r12d, r12d
jmp 0x580bab
mov r12, rsi
mov rsi, r9
mov qword [r9 + 0x80], r12
mov r9, rsi
mov rsi, qword [rsi + 0x70]
nop dword [rax]
test rsi, rsi
jne 0x580bfc
mov rsi, r11
movsxd r11, dword [r11]
shl r11, 3
mov r12, r10
cmp qword [r10 + 8], r11
jl 0x580bed
lea r10, [rsi + 0x10]
sub qword [r10], r11
mov r10, r12
mov r11, qword [r12 + 8]
add r11, qword [r12]
jmp 0x580c05
lea r10, [rsi + 0x18]
add qword [r10], r11
mov r10, r12
xor r11d, r11d
jmp 0x580c05
mov rax, rsi
mov rsi, r11
mov r11, rax
mov r12, r9
mov qword [r9 + 0x70], r11
mov r9, r12
mov r11, qword [r12 + 0x78]
test r11, r11
jne 0x580c42
mov r11, r10
mov rdi, qword [rsp + 0x38]
cmp qword [r10 + 8], rdi
jl 0x580c37
add rsi, 0x10
sub qword [rsi], rdi
mov rsi, qword [r11 + 8]
add rsi, qword [r11]
jmp 0x580c4a
lea r10, [rsi + 0x18]
add qword [r10], rdi
xor esi, esi
jmp 0x580c4a
mov rdi, qword [rsp + 0x38]
mov rsi, r11
mov r10, r9
mov qword [r9 + 0x78], rsi
movzx esi, word [rsp + 0x22]
mov r11d, dword [rsp + 0x2c]
mov r12d, dword [rsp + 0x28]
mov r15, r10
mov r8, qword [rsp + 0x30]
mov r9, r8
cmp byte [r8 + 0x67], 0
jne 0x580c9c
movsx rdx, si
mov r8, r15
mov dword [r15 + 0x28], r12d
mov r10, r8
mov word [r8 + 0x20], si
test edx, edx
jle 0x580d29
mov rsi, r10
mov r8, qword [r10 + 0x80]
jmp 0x580d93
mov rax, r15
mov word [r15 + 0x20], 0
mov rcx, rax
mov dword [rax + 0x28], 0
mov rax, rcx
mov dword [rcx + 0x24], 0
mov rcx, rax
nop
mov byte [rax + 0xc7], 1
mov rax, rcx
mov dword [rcx + 0x30], 0xffffffff
mov rcx, rax
mov dword [rax + 0x34], 0
mov rax, rcx
mov byte [rcx + 0xc4], 2
mov rcx, rax
mov qword [rax + 0x38], 0
mov rax, rcx
mov dword [rcx + 0x2c], 1
mov rcx, rax
mov byte [rax + 0xc5], 0xff
mov rax, rcx
mov dword [rcx + 0x40], 0
mov qword [rax + 0x50], 0
mov byte [rsp + 0x21], 0
mov rdx, qword [rsp + 0x70]
mov rax, qword [rdx]
call rax
add rsp, 0x78
pop rbp
ret
mov rdx, r10
mov dword [r10 + 0x24], r11d
test r11d, r11d
jle 0x580d3e
mov rsi, rdx
mov rdx, qword [rdx + 0x68]
jmp 0x580d68
mov rbx, qword [rdx + 0x78]
mov rax, qword [rsp + 0x88]
xor ecx, ecx
call sym.modernc.org_libc.Xmemset
mov rax, qword [rsp + 0x90]
jmp 0x580cba
add r8, 0x38
mov r11d, edx
mov rdx, r8
mov r8, rdx
mov word [rdx + 0x14], 0
mov rdx, r8
mov qword [r8 + 0x18], r9
mov r8, rdx
mov dword [rdx + 0x20], 0
lea edx, [r11 - 1]
test edx, edx
jg 0x580d5e
mov rdx, rsi
jmp 0x580d3e
lea r8, [r10 + 0x38]
mov r10, r8
mov word [r8 + 0x14], 1
mov r8, r10
mov qword [r10 + 0x18], r9
mov r10, r8
mov dword [r8 + 0x20], 0
dec edx
test edx, edx
jg 0x580d8f
mov r10, rsi
jmp 0x580d29
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
jmp sym.modernc.org_sqlite_lib._sqlite3VdbeMakeReady