Function at 0x10043a960
Capabilities:
Query environment variable

Disassembly:
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x1200]
mov eax, 0x1300
call fcn.10046b370
sub rsp, rax
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov qword [rsp + 0x1340], rbx
mov qword [rsp + 0x1348], rsi
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rbp + 0x11f0], rax
mov rdi, rcx
mov dword [rsp + 0x50], edx
movups xmm0, xmmword [str.DisableAgentXPs]
movups xmmword [rbp + 0xbc0], xmm0
movups xmm1, xmmword [0x100479de0]
movups xmmword [rbp + 0xbd0], xmm1
xor ebx, ebx
mov r14d, ebx
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0xdf0]
call sub.VCRUNTIME140.dll_memset
mov dword [rsp + 0x58], ebx
mov esi, ebx
lea r15d, [rbx + 1]
cmp dword [0x1004a9184], ebx
je 0x10043aaf0
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xbe0]
call sub.VCRUNTIME140.dll_memset
mov r8d, 0x104
lea rdx, [rbp + 0xbe0]
lea rcx, str.SQLSERVR_NAMED_PIPE
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r9, [rbp + 0xbe0]
lea r8, str.master
lea rdx, str.SQLAgent___Enabling_disabling_Agent_XPs
lea rcx, [rbp - 0x50]
call fcn.10040f7b0
cmp dword [rsp + 0x50], ebx
je 0x10043aa8c
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], bx
lea r8d, [rbx + 0xc]
lea rdx, str.LoginTimeout
lea rcx, [rsp + 0x68]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x68]
jmp 0x10043aac8
lea rax, [rbp - 0x78]
mov qword [rsp + 0x60], rax
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], bx
mov r8d, 0x14
lea rdx, str.ShutdownLoginTimeout
lea rcx, [rbp - 0x78]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rbp - 0x78]
call fcn.100409ee0
mov r9d, eax
lea r8, [rbp + 0xbc0]
mov edx, r15d
lea rcx, [rbp - 0x50]
call fcn.10040fcc0
test eax, eax
je 0x10043abc0
jmp 0x10043abb9
test rdi, rdi
jne 0x10043abc9
xor r9d, r9d
lea r8, str.msdb
lea rdx, str.SQLAgent___Enabling_disabling_Agent_XPs
lea rcx, [rbp - 0x50]
call fcn.10040f7b0
cmp dword [rsp + 0x50], ebx
je 0x10043ab55
lea rax, [rbp - 0x78]
mov qword [rsp + 0x60], rax
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x60], 7
mov word [rbp - 0x78], bx
lea r8d, [rdi + 0xc]
lea rdx, str.LoginTimeout
lea rcx, [rbp - 0x78]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rbp - 0x78]
jmp 0x10043ab96
lea rax, [rsp + 0x68]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], 7
mov word [rsp + 0x68], bx
mov r8d, 0x14
lea rdx, str.ShutdownLoginTimeout
lea rcx, [rsp + 0x68]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x68]
call fcn.100409ee0
mov r9d, eax
lea r8, [rbp + 0xbc0]
mov edx, r15d
lea rcx, [rbp - 0x50]
call fcn.10040fcc0
test eax, eax
je 0x10043acb9
mov r14d, r15d
lea rdi, [rbp - 0x50]
test rdi, rdi
je 0x10043acaa
mov qword [rsp + 0x68], rdi
mov word [rsp + 0x70], bx
mov r12d, 4
mov qword [rsp + 0x60], r12
mov word [rsp + 0x70], r15w
lea r9d, [r12 - 0x14]
mov r8d, r15d
mov edx, r15d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov word [rsp + 0x30], bx
mov qword [rsp + 0x28], rbx
mov word [rsp + 0x20], r12w
mov rcx, qword [rdi + 0x18]
call qword [sym.imp.ODBC32.dll_SQLBindParameter]
lea rax, [rbp + 0xbc0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0x200
lea rax, [rbp + 0xdf0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, r15d
lea rdx, str.EXECUTE_msdb.dbo.sp_sqlagent_update_agent_xps__new_value___
mov rcx, rdi
call fcn.100410640
mov esi, eax
cmp dword [rsp + 0x58], 0
sete bl
test eax, ebx
je 0x10043ac72
mov ecx, r12d
jmp 0x10043ac7f
cmp word [rbp + 0xdf0], 0
je 0x10043ac96
mov ecx, r15d
lea r9, [rbp + 0xdf0]
xor r8d, r8d
lea rdx, [0x1004725a8]
call fcn.100432180
nop
mov rcx, qword [rdi + 0x18]
test rcx, rcx
je 0x10043acaa
mov edx, 3
call qword [sym.imp.ODBC32.dll_SQLFreeStmt]
test r14d, r14d
je 0x10043acb9
lea rcx, [rbp - 0x50]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
mov eax, esi
mov rcx, qword [rbp + 0x11f0]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x1300]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret