Function at 0x10044c7e0
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Query environment variable
Terminate process

Disassembly:
push rbp
push r14
push r15
lea rbp, [rsp - 0x2ab0]
mov eax, 0x2bb0
call fcn.10046b370
sub rsp, rax
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x2bd0], rbx
mov qword [rsp + 0x2bd8], rsi
mov qword [rsp + 0x2be0], rdi
mov qword [rsp + 0x2be8], r12
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rbp + 0x2aa0], rax
xor r14d, r14d
mov esi, r14d
xorps xmm0, xmm0
movdqa xmmword [rbp + 0x340], xmm0
movdqa xmm1, xmmword [0x100482320]
movdqa xmmword [rbp + 0x340], xmm1
mov word [rbp + 0x330], r14w
xor edx, edx
mov r8d, 0x350
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
lea rax, [fcn.100432180]
mov qword [rbp + 0x310], rax
lea rax, [0x100418fe0]
mov qword [rbp + 0x318], rax
mov r9d, 0x83
lea r8, str.MSSQLSERVER
mov edx, r9d
lea rcx, [rbp]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov eax, dword [0x1004a9180]
mov dword [rbp + 0x328], eax
mov eax, dword [0x1004a9184]
mov dword [rbp + 0x32c], eax
mov rax, qword [0x100499288]
mov qword [rbp + 0x320], rax
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x360], xmm0
movdqa xmm1, xmmword [0x100482320]
movdqu xmmword [rbp + 0x360], xmm1
mov word [rbp + 0x350], r14w
xor r8d, r8d
lea r12, [0x100472884]
mov rdx, r12
lea rcx, [rbp + 0x350]
call fcn.10040da90
nop
lea rcx, [rbp + 0x350]
call fcn.100433950
lea r8, [rbp + 0x350]
cmp qword [rbp + 0x368], 8
cmovae r8, qword [rbp + 0x350]
mov edx, 0x103
mov r9d, edx
lea rcx, [rbp + 0x108]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xf80]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rbp + 0xf80]
lea rcx, str.SQLSERVR_NAMED_PIPE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rax, [rbp + 0xf80]
mov rdi, 0xffffffffffffffff
mov r8, rdi
nop
inc r8
cmp word [rax + r8*2], 0
jne 0x10044c980
lea rdx, [rbp + 0xf80]
lea rcx, [rbp + 0x330]
call fcn.10040da90
xor r9d, r9d
lea r8, str.msdb
lea rdx, str.SQLAgent___Subsystems_refresher
lea rcx, [rbp + 0x370]
call fcn.10040f7b0
lea rax, [rsp + 0x60]
mov qword [rbp - 0x78], rax
mov qword [rsp + 0x70], r14
mov r15d, 7
mov qword [rsp + 0x78], r15
mov word [rsp + 0x60], r14w
lea r8d, [r15 + 5]
lea rdx, str.LoginTimeout
lea rcx, [rsp + 0x60]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x60]
call fcn.100409ee0
mov r9d, eax
xor r8d, r8d
lea edx, [r15 - 6]
lea rcx, [rbp + 0x370]
call fcn.10040fcc0
test eax, eax
je 0x10044cb15
call fcn.1004342d0
movzx ebx, al
lea rcx, [0x1004a9c58]
mov rax, qword [0x1004a90d0]
call qword [case.0x10044bd0b.0]
test eax, eax
jne 0x10044ca6c
cmp dword [0x1004a8ebc], eax
je 0x10044ca5f
test bl, bl
je 0x10044ca5f
lea rdx, str.StartSubSystems
lea rcx, str.__s_____Waiting_for_CritSec__n
call fcn.10043bdc0
lea rcx, [0x1004a9c58]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1004a8ebc], 0
je 0x10044ca8c
test bl, bl
je 0x10044ca8c
lea rdx, str.StartSubSystems
lea rcx, str.__s_____Enters_CritSec__n
call fcn.10043bdc0
lea rdx, [0x1004a9cc0]
lea rcx, [rbp + 0x370]
call fcn.100418220
test eax, eax
je 0x10044cae0
mov ebx, r14d
cmp dword [0x1004a9ccc], ebx
jle 0x10044cae0
nop
mov edx, ebx
lea rcx, [0x1004a9cc0]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
test rax, rax
je 0x10044cad6
lea rdx, [rbp]
mov rcx, rax
call fcn.10044c2e0
test eax, eax
je 0x10044cad6
inc esi
inc ebx
cmp ebx, dword [0x1004a9ccc]
jl 0x10044cab0
call fcn.1004342d0
movzx ebx, al
lea rcx, [0x1004a9c58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x1004a8ebc], 0
je 0x10044cb15
test bl, bl
je 0x10044cb15
lea rdx, str.StartSubSystems
lea rcx, str.__s_____Leaves_CritSec__n
call fcn.10043bdc0
lea rcx, [rbp + 0x370]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
cmp dword [0x1004a9180], 0
je 0x10044cc9d
cmp dword [0x1004a9184], 0
jne 0x10044cc9d
lea r9, str.GlobalDesktopHolderStopEvent
xor r8d, r8d
lea edx, [r8 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x1004993b0], rax
test rax, rax
jne 0x10044cb6a
mov qword [0x1004993b0], rdi
jmp 0x10044cc9d
xor edx, edx
lea r8d, [rdx + 0x68]
lea rcx, [rbp - 0x70]
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov dword [rbp - 0x70], 0x68
mov qword [rbp - 0x60], r12
mov dword [rbp - 0x34], 0x101
mov word [rbp - 0x30], r15w
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x10], r14
lea r9, [0x1004a9e00]
inc rdi
cmp word [r9 + rdi*2], ax
jne 0x10044cbb4
movsxd rax, edi
lea rcx, [0x10047f020]
lea r8, str.__sDesktopHolder.exe__GlobalDesktopHolderStopEvent
cmp word [r9 + rax*2 - 2], 0x5c
cmove r8, rcx
mov edx, 0xc84
lea rcx, [rbp + 0x1190]
call fcn.10040b290
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], 0x4000000
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea r8, [rbp + 0x1190]
xor edx, edx
mov rcx, qword [0x100499288]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x10044cc87
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [rsp + 0x20], eax
lea r9, [rbp + 0x1190]
xor r8d, r8d
lea rdx, str.Failed_to_start_program:__d
lea ecx, [r8 + 3]
call fcn.100432180
mov dword [rsp + 0x20], ebx
lea r9, [rbp + 0x1190]
xor r8d, r8d
lea rdx, str.SQLAgent_will_exit
lea ecx, [r8 + 3]
call fcn.100432180
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, r14d
test esi, esi
setg bl
mov rdx, qword [rbp + 0x368]
cmp rdx, 8
jb 0x10044ccee
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x350]
mov rax, rcx
cmp rdx, 0x1000
jb 0x10044cce9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x10044cce9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.100469388
movdqa xmm0, xmmword [0x100482320]
movdqu xmmword [rbp + 0x360], xmm0
mov word [rbp + 0x350], r14w
mov rdx, qword [rbp + 0x348]
cmp rdx, 8
jb 0x10044cd4f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x330]
mov rax, rcx
cmp rdx, 0x1000
jb 0x10044cd4a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x10044cd4a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.100469388
movdqa xmm0, xmmword [0x100482320]
movdqa xmmword [rbp + 0x340], xmm0
mov word [rbp + 0x330], r14w
mov eax, ebx
mov rcx, qword [rbp + 0x2aa0]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x2bb0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret