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

Disassembly:
lea r12, [rsp - 0x80]
cmp r12, qword [r14 + 0x10]
jbe 0x58c8e9
push rbp
mov rbp, rsp
sub rsp, 0xf8
movq qword [rsp + 0xf0], xmm15
mov qword [rsp + 0x108], rax
mov qword [rsp + 0x110], rbx
mov qword [rsp + 0x118], rcx
mov byte [rsp + 0x33], 0
mov qword [rsp + 0x60], 0
mov ebx, pe_nt_image_headers64
call sym.modernc.org_libc._TLS_.Alloc
lea rcx, [sym.modernc.org_sqlite_lib._sqlite3VdbeExpandSql.deferwrap1]
mov qword [rsp + 0xb0], rcx
mov rcx, qword [rsp + 0x108]
mov qword [rsp + 0xb8], rcx
lea rdx, [rsp + 0xb0]
mov qword [rsp + 0xf0], rdx
mov byte [rsp + 0x33], 1
mov rbx, rax
mov dword [rax], 0
mov rdx, qword [rsp + 0x110]
mov rsi, rdx
mov rdx, qword [rdx]
lea rdi, [rbx + 8]
mov qword [rsp + 0x68], rdi
lea r8, [rdx + 0x88]
mov r8d, dword [r8]
mov r9, rdi
mov qword [rdi + 8], 0
mov rdi, r9
mov qword [r9], 0
mov r9, rdi
mov dword [rdi + 0x10], 0
mov rdi, r9
mov dword [r9 + 0x14], r8d
mov r8, rdi
mov dword [rdi + 0x18], 0
mov rdi, r8
mov byte [r8 + 0x1c], 0
mov r8, rdi
mov byte [rdi + 0x1d], 0
mov rdi, rdx
cmp dword [rdx + 0xe4], 1
jle 0x58c14a
mov rdx, qword [rsp + 0x118]
jmp 0x58c893
mov rdx, rsi
movsx rsi, word [rsi + 0x20]
test esi, esi
jne 0x58c176
mov rdx, qword [rsp + 0x118]
nop
test rdx, rdx
je 0x58c16f
mov rax, rdx
xor ebx, ebx
jmp 0x58c823
xor eax, eax
jmp 0x58c7fa
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0xa0], rdi
mov rax, qword [rsp + 0x118]
mov esi, 1
jmp 0x58c1c6
mov rcx, qword [rsp + 0x108]
mov rdx, qword [rsp + 0x110]
mov rbx, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x68]
mov rax, qword [rsp + 0x98]
mov esi, dword [rsp + 0x34]
mov r9, rax
cmp byte [rax], 0
je 0x58c6e7
mov qword [rsp + 0x98], r9
mov dword [rsp + 0x34], esi
lea rdx, [rbx + 4]
mov qword [rsp + 0x90], rdx
mov rax, rcx
mov rcx, rdx
mov rbx, r9
call sym.modernc.org_sqlite_lib._findNextHostParameter
mov dword [rsp + 0x3c], eax
mov rbx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x98]
mov edi, eax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
mov edx, dword [rsp + 0x3c]
movsxd rdx, edx
mov rsi, qword [rsp + 0x90]
mov rdi, rsi
mov esi, dword [rsi]
mov r8, qword [rsp + 0x98]
lea rcx, [r8 + rdx]
nop dword [rax + rax]
test esi, esi
je 0x58c6da
mov qword [rsp + 0x50], rcx
mov r9, rcx
movsx r9, byte [r9]
cmp r9d, 0x3f
jne 0x58c2ad
cmp esi, 1
jg 0x58c275
mov rax, qword [rsp + 0xa8]
mov rbx, rax
mov edx, dword [rsp + 0x34]
mov dword [rax], edx
jmp 0x58c2ff
lea rbx, [r8 + rdx]
lea rbx, [rbx + 1]
mov rax, qword [rsp + 0x108]
mov rcx, qword [rsp + 0xa8]
call sym.modernc.org_sqlite_lib._sqlite3GetInt32
mov rcx, qword [rsp + 0x50]
mov edx, dword [rsp + 0x34]
mov rbx, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0x90]
jmp 0x58c2ff
mov rdx, qword [rsp + 0x110]
test rdx, rdx
je 0x58c2bf
test rcx, rcx
jne 0x58c2c3
xor eax, eax
jmp 0x58c2ee
mov rbx, qword [rdx + 0xb0]
mov rax, qword [rsp + 0x108]
mov edi, esi
call sym.modernc.org_sqlite_lib._sqlite3VListNameToNum
mov rcx, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xa8]
mov rsi, rbx
mov dword [rsi], eax
mov edx, dword [rsp + 0x34]
movsxd rsi, dword [rdi]
mov rax, rbx
mov r8d, dword [rbx]
lea r9d, [r8 + 1]
mov r10, qword [rsp + 0x110]
dec r8d
movsxd r8, r8d
imul r8, r8, 0x38
add r8, qword [r10 + 0x80]
mov r10, r8
movzx r8d, word [r8 + 0x14]
add rsi, rcx
mov qword [rsp + 0x98], rsi
cmp edx, r9d
cmovl edx, r9d
mov dword [rsp + 0x34], edx
bt r8d, 0
jb 0x58c6b0
test r8d, 0x24
jne 0x58c639
bt r8d, 3
jb 0x58c5c5
mov qword [rsp + 0x90], r10
bt r8d, 1
jae 0x58c50a
mov r8, qword [rsp + 0xa0]
movzx r8d, byte [r8 + 0x64]
mov byte [rsp + 0x32], r8b
cmp r8d, 1
je 0x58c43d
lea rbx, [rax + 0x28]
mov qword [rsp + 0x88], rbx
xor ecx, ecx
mov edi, 0x38
mov rax, qword [rsp + 0x108]
call sym.modernc.org_libc.Xmemset
mov rbx, qword [rsp + 0x88]
mov rdx, rbx
mov rsi, qword [rsp + 0xa0]
mov qword [rdx + 0x18], rsi
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rdx + 8]
movsxd rdi, dword [rdx + 0x10]
mov rax, qword [rsp + 0x108]
xor r8d, r8d
movzx esi, byte [rsp + 0x32]
call sym.modernc.org_sqlite_lib._sqlite3VdbeMemSetStr
mov rax, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x88]
mov ecx, 1
call sym.modernc.org_sqlite_lib._sqlite3VdbeChangeEncoding
cmp eax, 7
jne 0x58c428
mov rdx, qword [rsp + 0x68]
mov rsi, rdx
mov byte [rdx + 0x1c], 7
mov rdx, rsi
mov dword [rsi + 0x10], 0
jmp 0x58c42d
mov rdx, qword [rsp + 0x68]
mov rax, qword [rsp + 0xa8]
mov r10, qword [rsp + 0x88]
mov rdx, r10
mov esi, dword [r10 + 0x10]
movups xmmword [rsp + 0xc0], xmm15
movups xmmword [rsp + 0xd0], xmm15
mov dword [rsp + 0x44], esi
lea rsi, [0x00728b40]
mov qword [rsp + 0xc0], rsi
lea r8, [rax + 0x68]
lea r9, [rsp + 0x44]
mov qword [rsp + 0xc8], r9
mov rdx, qword [rdx + 8]
mov qword [rsp + 0x70], rdx
lea rdx, [0x00728cc0]
mov qword [rsp + 0xd0], rdx
lea r9, [rsp + 0x70]
mov qword [rsp + 0xd8], r9
lea rbx, [rsp + 0xc0]
mov ecx, 2
mov rdi, rcx
mov rax, r8
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x1b0b
mov rbx, qword [rsp + 0x68]
mov rdi, rax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_vappendf
movzx edx, byte [rsp + 0x32]
nop
cmp edx, 1
je 0x58c195
mov rbx, qword [rsp + 0xa8]
lea rcx, [rbx + 0x28]
mov rax, qword [rsp + 0x108]
mov rbx, rcx
call sym.modernc.org_sqlite_lib._sqlite3VdbeMemRelease
jmp 0x58c195
bt r8d, 0xa
jae 0x58c585
movups xmmword [rsp + 0xe0], xmm15
lea rdx, [rax + 0x68]
mov esi, dword [r10]
mov dword [rsp + 0x4c], esi
lea rsi, [0x00728b40]
mov qword [rsp + 0xe0], rsi
lea r8, [rsp + 0x4c]
mov qword [rsp + 0xe8], r8
lea rbx, [rsp + 0xe0]
mov ecx, 1
mov rdi, rcx
mov rax, rdx
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x1b12
mov rbx, qword [rsp + 0x68]
mov rdi, rax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_vappendf
nop dword [rax]
jmp 0x58c195
mov rcx, qword [0x00a30e10]
add rcx, 0x1b1f
mov rax, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x68]
mov edi, 2
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
mov rdx, qword [rsp + 0x90]
mov rsi, rdx
mov edx, dword [rdx + 0x10]
mov dword [rsp + 0x38], edx
xor eax, eax
nop
jmp 0x58c7c8
movups xmmword [rsp + 0xe0], xmm15
lea rdx, [rax + 0x68]
movsd xmm0, qword [r10]
movsd qword [rsp + 0x78], xmm0
lea rsi, [0x00728dc0]
mov qword [rsp + 0xe0], rsi
lea r8, [rsp + 0x78]
mov qword [rsp + 0xe8], r8
lea rbx, [rsp + 0xe0]
mov ecx, 1
mov rdi, rcx
mov rax, rdx
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x1928
mov rbx, qword [rsp + 0x68]
mov rdi, rax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_vappendf
jmp 0x58c195
movups xmmword [rsp + 0xe0], xmm15
lea rdx, [rax + 0x68]
mov rsi, qword [r10]
mov qword [rsp + 0x80], rsi
lea rsi, [0x00728bc0]
mov qword [rsp + 0xe0], rsi
lea r8, [rsp + 0x80]
mov qword [rsp + 0xe8], r8
lea rbx, [rsp + 0xe0]
mov ecx, 1
mov rdi, rcx
mov rax, rdx
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x599
mov rbx, qword [rsp + 0x68]
mov rdi, rax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_vappendf
jmp 0x58c195
mov rcx, qword [0x00a30e10]
add rcx, 0x689
mov rax, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x68]
mov edi, 4
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
jmp 0x58c195
mov rcx, qword [rsp + 0x108]
mov r8, qword [rsp + 0x68]
mov rbx, r8
cmp byte [r8 + 0x1c], 0
je 0x58c706
mov rax, rcx
call sym.modernc.org_sqlite_lib.Xsqlite3_str_reset
mov rcx, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x68]
mov rax, rcx
call sym.modernc.org_sqlite_lib._sqlite3StrAccumFinish
mov qword [rsp + 0x60], rax
mov byte [rsp + 0x33], 0
mov rdx, qword [rsp + 0xf0]
mov rcx, qword [rdx]
call rcx
mov rax, qword [rsp + 0x60]
add rsp, 0xf8
pop rbp
ret
mov dword [rsp + 0x40], eax
movups xmmword [rsp + 0xe0], xmm15
mov rdx, qword [rsp + 0xa8]
lea r8, [rdx + 0x68]
movsxd r10, eax
add r10, qword [rsi + 8]
movsx rsi, byte [r10]
movzx esi, sil
mov dword [rsp + 0x48], esi
lea rsi, [0x00728b40]
mov qword [rsp + 0xe0], rsi
lea r10, [rsp + 0x48]
mov qword [rsp + 0xe8], r10
lea rbx, [rsp + 0xe0]
mov ecx, 1
mov rdi, rcx
mov rax, r8
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x1b22
mov rbx, qword [rsp + 0x68]
mov rdi, rax
mov rax, qword [rsp + 0x108]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_vappendf
mov eax, dword [rsp + 0x40]
inc eax
mov edx, dword [rsp + 0x38]
mov rsi, qword [rsp + 0x90]
cmp eax, edx
jl 0x58c733
mov rcx, qword [0x00a30e10]
add rcx, 0x1b27
mov rax, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x68]
mov edi, 1
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
jmp 0x58c195
mov rbx, r8
mov edi, eax
mov rax, rcx
mov rcx, rdx
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
mov rcx, qword [rsp + 0x108]
mov r8, qword [rsp + 0x68]
jmp 0x58c6e7
lea rdx, [rsi + 1]
inc rbx
mov rsi, rdx
cmp byte [rdx], 0
jne 0x58c81c
and ebx, 0x3fffffff
mov rdx, rax
mov eax, ebx
jmp 0x58c7fa
mov rdx, qword [0x00a30e10]
add rdx, 0x1b07
mov rax, rcx
mov rbx, r8
mov rcx, rdx
mov edi, 3
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
mov rdi, qword [rsp + 0x58]
mov rcx, qword [rsp + 0xa8]
sub rdi, rcx
inc rdi
mov rax, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x68]
call sym.modernc.org_sqlite_lib.Xsqlite3_str_append
mov rdx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x108]
mov r8, qword [rsp + 0x68]
mov rsi, rdx
cmp byte [rdx], 0
je 0x58c6e7
mov qword [rsp + 0xa8], rsi
mov rax, rsi
mov qword [rsp + 0x58], rsi
lea rdx, [rsi + 1]
mov qword [rsp + 0xa0], rdx
movsx rsi, byte [rsi]
nop
cmp esi, 0xa
je 0x58c838
mov rsi, rdx
cmp byte [rdx], 0
jne 0x58c8aa
jmp 0x58c838
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._sqlite3VdbeExpandSql