Function at 0x100437240
Capabilities:
Get memory capacity
Get session user name

Disassembly:
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2890]
mov eax, 0x2990
call fcn.10046b370
sub rsp, rax
mov qword [rbp - 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x29c0], rbx
mov qword [rsp + 0x29c8], rsi
mov qword [rsp + 0x29d0], rdi
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rbp + 0x2880], rax
movups xmm0, xmmword [str.DumpAndCheckServerVersion]
movups xmmword [rbp + 0xc98], xmm0
movups xmm1, xmmword [0x1004797d8]
movups xmmword [rbp + 0xca8], xmm1
movups xmm0, xmmword [0x1004797e8]
movups xmmword [rbp + 0xcb8], xmm0
mov eax, dword [0x1004797f8]
mov dword [rbp + 0xcc8], eax
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp + 0xed0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x1650]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0xcd0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0xdd0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x1550]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp + 0xf50]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x1870]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x1150]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp + 0x1050]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp + 0xfd0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x1d70]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x80
lea rcx, [rbp + 0x10d0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x2080]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x1760]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp + 0x1e80]
call sub.VCRUNTIME140.dll_memset
xor r13d, r13d
mov qword [rbp - 0x58], r13
mov r12d, r13d
mov dword [rbp - 0x60], r13d
mov esi, r13d
mov dword [rsp + 0x68], r13d
mov dword [rsp + 0x70], r13d
mov dword [rsp + 0x74], r13d
xor dil, dil
mov dword [rsp + 0x6c], r13d
mov dword [rsp + 0x78], r13d
lea rax, [rbp - 0x50]
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x40], r13
mov qword [rbp - 0x38], 7
mov word [rbp - 0x50], r13w
lea r8d, [r13 + 0xa]
lea rdx, str.ServerHost
lea rcx, [rbp - 0x50]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea r8, [rbp - 0x50]
lea rdx, [rbp]
call fcn.10040a3c0
nop
lea r14, [r13 - 1]
cmp qword [rbp + 0x10], r13
jne 0x1004374b4
call fcn.10044da70
lea rdx, [rax + 0x68]
cmp qword [rdx + 0x18], 8
jb 0x100437480
mov rdx, qword [rdx]
mov r8, r14
inc r8
cmp word [rdx + r8*2], 0
jne 0x100437483
lea rcx, [rbp]
call fcn.10040da90
cmp qword [rbp + 0x10], 0
jne 0x1004374b4
mov r8d, 7
lea rdx, str._local_
lea rcx, [rbp]
call fcn.10040da90
mov r9d, 0x40
lea r8, [rbp + 0xed0]
lea edx, [r9 - 0x29]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov dword [rbp + 0x20], 0x38
lea rcx, [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov rax, qword [rbp + 0x28]
mov ecx, 0xffffffff
test rax, rax
cmove rax, rcx
mov qword [rbp + 0x28], rax
test rax, 0xfffff
mov r15d, r13d
setne r15b
shr rax, 0x14
add r15d, eax
mov edx, 0x40
lea rcx, [rbp + 0xf50]
lea r8, [rbp + 0xed0]
lea rax, [rbp + 0xf50]
sub r8, rax
nop dword [rax + rax]
lea rax, [rdx + 0x7fffffbe]
test rax, rax
je 0x100437553
movzx eax, word [r8 + rcx]
test ax, ax
je 0x100437553
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x100437530
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
mov edx, 0x40
lea rcx, [rbp + 0xf50]
lea r8, [0x100479800]
lea rax, [rbp + 0xf50]
sub r8, rax
nop
lea rax, [rdx + 0x7fffffbe]
test rax, rax
je 0x1004375a3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1004375a3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x100437580
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
mov edx, 0x40
lea rcx, [rbp + 0x1050]
lea r8, str.unicode
lea rax, [rbp + 0x1050]
sub r8, rax
nop
lea rax, [rdx + 0x7fffffbe]
test rax, rax
je 0x1004375f3
movzx eax, word [r8 + rcx]
test ax, ax
je 0x1004375f3
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1004375d0
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
mov r9d, 0x40
lea r8, [rbp + 0xfd0]
mov rcx, qword [0x1004a90d8]
cmp dword [0x1004a8ebc], 0
mov edx, 0x16e
jne 0x100437629
mov edx, 0x16f
call qword [sym.imp.USER32.dll_LoadStringW]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r13
lea rbx, str.msdb
lea rax, [rbp - 0x80]
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r13w
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x20], rax
cmp dword [0x1004a9180], 0
je 0x1004377f3
mov r8d, 0x14
lea rdx, str.StartupWaitForAllDBs
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea r8, [rbp - 0x80]
lea rdx, [rbp + 0xc70]
call fcn.10040a3c0
nop
lea rcx, [rbp + 0xc70]
cmp qword [rbp + 0xc88], 8
cmovae rcx, qword [rbp + 0xc70]
movzx eax, word [0x100478334]
cmp ax, word [rcx]
jne 0x1004376d2
movzx eax, word [0x100478336]
cmp ax, word [rcx + 2]
jne 0x1004376d2
mov dil, 1
jmp 0x1004377a3
xor dil, dil
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x10], xmm0
movdqa xmm1, xmmword [0x100482320]
movdqu xmmword [rbp - 0x10], xmm1
mov word [rbp - 0x20], r13w
mov r8d, 4
mov rdx, rbx
lea rcx, [rbp - 0x20]
call fcn.10040da90
nop
mov rdx, qword [rsp + 0x58]
cmp qword [rsp + 0x60], rdx
je 0x10043773f
mov qword [rdx + 0x10], r13
mov qword [rdx + 0x18], r13
movups xmm0, xmmword [rbp - 0x20]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rbp - 0x10]
movups xmmword [rdx + 0x10], xmm1
movdqa xmm0, xmmword [0x100482320]
movdqu xmmword [rbp - 0x10], xmm0
mov word [rbp - 0x20], r13w
add qword [rsp + 0x58], 0x20
jmp 0x10043774e
lea r8, [rbp - 0x20]
lea rcx, [rsp + 0x50]
call fcn.10043c970
nop
mov rdx, qword [rbp - 8]
cmp rdx, 8
jb 0x100437791
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x10043778c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x10043778c
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 - 0x10], xmm0
mov word [rbp - 0x20], r13w
mov rdx, qword [rbp + 0xc88]
cmp rdx, 8
jb 0x1004378c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xc70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1004378bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1004378bb
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov r8d, 0x21
lea rdx, str.RecoveredDatabasesForAgentStartup
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea r8, [rbp - 0x80]
lea rdx, [rbp + 0xc70]
call fcn.10040a3c0
nop
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0xc70]
call fcn.10043c440
mov rax, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x50]
sub rax, rcx
and rax, 0xffffffffffffffe0
cmp rax, 0x20
jne 0x100437877
cmp qword [rcx + 0x18], 8
jb 0x100437851
mov rcx, qword [rcx]
lea rdx, [0x100479898]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
test eax, eax
jne 0x100437877
xor r8d, r8d
lea rdx, str.Agent_startup_will_wait_for_for_all_databases_to_recover
lea ecx, [rax + 4]
call fcn.100432180
mov dil, 1
mov rdx, qword [rbp + 0xc88]
cmp rdx, 8
jb 0x1004378c0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xc70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1004378bb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1004378bb
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]
mov word [rbp + 0xc70], r13w
movdqu xmmword [rbp + 0xc80], xmm0
test byte [0x1004a916c], 1
jne 0x100437a18
movzx ecx, dil
call fcn.100437030
test eax, eax
je 0x100437a18
mov r8d, 0x400
lea rdx, [rbp + 0x2080]
mov ecx, eax
call fcn.10044bfe0
mov r9d, 0x200
lea r8, [rbp + 0x1150]
mov edx, 0x17d
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea r9, [rbp + 0x2080]
lea r8, [rbp + 0x1150]
mov edx, 0x200
lea rcx, [rbp + 0x1870]
call fcn.10040b460
mov esi, 1
lea rax, [rbp + 0x1870]
inc r14
cmp word [rax + r14*2], 0
jne 0x100437954
test r14, r14
je 0x1004379a6
lea r9, [rbp + 0x1870]
xor r8d, r8d
lea rdx, [0x1004725a8]
mov ecx, esi
call fcn.100432180
lea rax, [rbp + 0x1870]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 2
mov r9d, 2
mov r8d, 0x40000067
movzx edx, si
mov ecx, esi
call fcn.100431c20
xor edx, edx
mov rcx, qword [0x1004a90e0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1004379bf
mov r12d, r13d
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x100438b66
mov rdx, qword [rsp + 0x58]
call fcn.10043c870
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x50]
sub rdx, rcx
and rdx, 0xffffffffffffffe0
mov rax, rcx
cmp rdx, 0x1000
jb 0x100438b53
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x100438b53
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor edx, edx
mov rcx, qword [0x1004a90e0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x100437948
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov r9d, eax
lea r8, [0x100471ea8]
mov edx, 0x40
lea rcx, [rbp + 0x10d0]
call fcn.10040b460
lea rax, [rbp + 0x10d0]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0xfd0]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x1050]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0xf50]
mov qword [rsp + 0x28], rax
lea rax, [0x1004793e8]
mov qword [rsp + 0x20], rax
lea r9, str.SQLServerAgent
xor edx, edx
lea ecx, [rdx + 4]
lea r8d, [rdx + 0x64]
call fcn.100432180
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0x1c70]
call sub.VCRUNTIME140.dll_memset
mov dword [rbp - 0x20], 0x80
lea r8, [rbp - 0x20]
lea rdx, [rbp + 0x1c70]
mov ecx, 2
call qword [sym.imp.Secur32.dll_GetUserNameExW]
test al, al
je 0x100437af2
lea r9, [rbp + 0x1c70]
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x1ef
call fcn.100432180
jmp 0x100437b41
xor edx, edx
mov r8d, 0x400
lea rcx, [rbp + 0x2480]
call sub.VCRUNTIME140.dll_memset
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov r8d, 0x400
lea rdx, [rbp + 0x2480]
mov ecx, eax
call fcn.10044bfe0
lea rax, [rbp + 0x2480]
mov qword [rsp + 0x20], rax
mov r9d, ebx
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, 0x1f0
call fcn.100432180
cmp dword [0x1004a9180], 0
je 0x100437b5a
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x97
call fcn.100432180
cmp dword [0x1004a9184], 0
je 0x100437b73
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x1f8
call fcn.100432180
mov ebx, r13d
xor r9d, r9d
lea r8, str.master
lea rdx, str.SQLAgent___Initial_Boot_Probe
lea rcx, [rbp + 0x60]
call fcn.10040f7b0
xor r8d, r8d
lea edx, [r8 + 1]
lea rcx, [rbp + 0x60]
call fcn.100410100
test eax, eax
jne 0x100437c47
cmp ebx, 0xe
jge 0x100437bf8
inc ebx
mov dword [rsp + 0x20], 0x3e8
lea r9d, [rax + 0xf]
mov r8d, ebx
lea rdx, [rbp + 0x88]
lea rcx, str.SQL_Agent_was_not_able_to_connect_to_SQL_Server_instance___s_._Attempt__d_of__d._Will_retry_again_in__dms._n
call fcn.10043bdc0
mov edx, 0x3e8
mov rcx, qword [0x1004a90e0]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x100437948
cmp ebx, 0xf
jl 0x100437b76
jmp 0x100438779
mov r9d, 0x200
lea r8, [rbp + 0x1150]
mov edx, 0x63
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, str.SQLServerAgent
lea r9, [rbp + 0x88]
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x1150]
mov edx, 0x200
lea rcx, [rbp + 0x1870]
call fcn.10040b460
jmp 0x100437948
lea rsi, str.msdb
mov rdx, rsi
lea rcx, [rbp + 0x60]
call fcn.100410dd0
test eax, eax
jne 0x100437c8f
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
mov r9d, 0x200
lea r8, [rbp + 0x1150]
mov edx, 0x15f
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov r9, rsi
jmp 0x100437930
test dil, dil
jne 0x100437d2c
mov rbx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x58]
cmp rbx, rax
je 0x100437d18
cmp qword [rbx + 0x10], 0
je 0x100437d0a
mov rdx, rbx
cmp qword [rbx + 0x18], 8
jb 0x100437cbb
mov rdx, qword [rbx]
lea rcx, [rbp + 0x60]
call fcn.100411180
test eax, eax
je 0x100437948
mov r8, rbx
cmp qword [rbx + 0x18], 8
jb 0x100437cd9
mov r8, qword [rbx]
mov rax, r13
nop dword [rax]
movzx edx, word [r8 + rax*2]
inc rax
movzx ecx, word [rsi + rax*2 - 2]
sub edx, ecx
jne 0x100437cf7
cmp rax, 5
jne 0x100437ce0
movzx edi, dil
test edx, edx
mov eax, 1
cmove edi, eax
mov rax, qword [rsp + 0x58]
add rbx, 0x20
cmp rbx, rax
jne 0x100437ca7
test dil, dil
jne 0x100437d2c
mov rdx, rsi
lea rcx, [rbp + 0x60]
call fcn.100411180
test eax, eax
je 0x100437948
mov esi, 1
mov edx, esi
lea rcx, [rbp + 0x60]
call fcn.10043a960
test eax, eax
je 0x10043794d
lea r8, str.SQLServerAgentBooting
lea rcx, [rbp + 0x1e80]
call fcn.10043b5a0
lea r9, [rbp + 0x1e80]
mov r8d, esi
mov edx, esi
mov rcx, qword [0x1004a9178]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x1004a9c88], rax
test rax, rax
je 0x10043794d
lea r8d, [rsi + 1]
lea rax, [rbp - 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
lea rdi, [0x1004a9900]
mov qword [rsp + 0x20], rdi
lea r9d, [rsi + 0x11]
mov edx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLGetProperty]
test eax, eax
jne 0x100438082
lea edx, [rsi + 0x7f]
lea rcx, [rbp + 0xcd0]
mov r8, rdi
lea rax, [rbp + 0xcd0]
sub r8, rax
lea rax, [rdx + 0x7fffff7e]
test rax, rax
je 0x100437df2
movzx eax, word [r8 + rcx]
test ax, ax
je 0x100437df2
mov word [rcx], ax
add rcx, 2
sub rdx, rsi
jne 0x100437dd0
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
lea rdi, [rbp + 0xcd0]
cmp word [rbp + 0xcd0], 0
je 0x100437fe3
mov rbx, r13
movzx eax, word [0x100472a38]
cmp ax, word [0x100472884]
jne 0x100437e3d
movzx eax, word [0x100472a3a]
cmp ax, word [0x100472886]
je 0x100437fbb
lea rdx, [0x100472a38]
lea rcx, [rbp + 0xcd0]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100437fbb
mov ecx, 0x102
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x100437fbb
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0xdd0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x100
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
lea rdx, [0x100472a38]
lea rcx, [rbp + 0xcd0]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100437f6d
lea rcx, [rbp + 0xcd0]
sub rax, rcx
lea r8, [rbp + 0xcd0]
sar rax, 1
cdqe
lea rsi, [rax + rax]
mov r9, rsi
mov edx, 0x102
mov rcx, rbx
call fcn.10044c240
mov word [rsi + rbx], r13w
mov rax, r14
inc rax
cmp word [rbx + rax*2], 0
jne 0x100437ee4
lea rdx, [rbp + 0xdd0]
mov rcx, r14
nop dword [rax + rax]
inc rcx
cmp word [rdx + rcx*2], 0
jne 0x100437f00
add rax, rcx
cmp rax, 0x80
jae 0x100437f68
mov r8, rbx
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10042b640
lea r8, [0x100472884]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10042b640
add rdi, 2
add rdi, rsi
lea rdx, [0x100472a38]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100437f68
sub rax, rdi
mov r8, rdi
jmp 0x100437ec3
mov esi, 1
cmp word [rdi], 0
je 0x100437fd3
mov rax, r14
inc rax
cmp word [rdi + rax*2], 0
jne 0x100437f76
lea rdx, [rbp + 0xdd0]
mov rcx, r14
nop word [rax + rax]
inc rcx
cmp word [rdx + rcx*2], 0
jne 0x100437f90
add rax, rcx
cmp rax, 0x80
jae 0x100437fd3
mov r8, rdi
mov edx, 0x80
lea rcx, [rbp + 0xdd0]
call fcn.10040d600
jmp 0x100437fd3
lea r8, [rbp + 0xcd0]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10040b320
test rbx, rbx
je 0x100437ffb
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x100437ffb
lea r8, [rbp + 0xcd0]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10040b320
lea rcx, [rbp + 0xdd0]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtol]
mov r8d, eax
mov dword [0x1004a96f0], eax
mov eax, 0x431bde83
imul r8d
mov r9d, edx
sar r9d, 0x12
mov ecx, r9d
shr ecx, 0x1f
add r9d, ecx
mov eax, 0x68db8bad
imul r8d
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
imul eax, edx, 0x2710
mov ecx, r8d
sub ecx, eax
imul eax, r9d, 0xf4240
sub r8d, eax
mov eax, 0x68db8bad
imul r8d
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], edx
lea r8, str._ld._02ld._03ld
mov edx, 0x80
lea rcx, [0x1004a9900]
call fcn.10040b460
mov r8d, 2
lea rax, [rbp - 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
lea rdi, [0x1004a9a00]
mov qword [rsp + 0x20], rdi
lea r9d, [r8 + 5]
mov edx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLGetProperty]
test eax, eax
jne 0x100438391
mov edx, 0x80
lea rcx, [rbp + 0xcd0]
mov r8, rdi
lea rax, [rbp + 0xcd0]
sub r8, rax
nop word [rax + rax]
lea rax, [rdx + 0x7fffff7e]
test rax, rax
je 0x100438103
movzx eax, word [r8 + rcx]
test ax, ax
je 0x100438103
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x1004380e0
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r13w
lea rdi, [rbp + 0xcd0]
cmp word [rbp + 0xcd0], 0
je 0x1004382f3
mov rbx, r13
movzx eax, word [0x100472a38]
cmp ax, word [0x100472884]
jne 0x10043814e
movzx eax, word [0x100472a3a]
cmp ax, word [0x100472886]
je 0x1004382cb
lea rdx, [0x100472a38]
lea rcx, [rbp + 0xcd0]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x1004382cb
mov ecx, 0x102
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x1004382cb
xor edx, edx
mov r8d, 0x100
lea rcx, [rbp + 0xdd0]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x100
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
lea rdx, [0x100472a38]
lea rcx, [rbp + 0xcd0]
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x10043827d
lea rcx, [rbp + 0xcd0]
sub rax, rcx
lea r8, [rbp + 0xcd0]
sar rax, 1
cdqe
lea rsi, [rax + rax]
mov r9, rsi
mov edx, 0x102
mov rcx, rbx
call fcn.10044c240
mov word [rsi + rbx], r13w
mov rax, r14
inc rax
cmp word [rbx + rax*2], 0
jne 0x1004381f5
lea rdx, [rbp + 0xdd0]
mov rcx, r14
nop dword [rax]
inc rcx
cmp word [rdx + rcx*2], 0
jne 0x100438210
add rax, rcx
cmp rax, 0x80
jae 0x100438278
mov r8, rbx
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10042b640
lea r8, [0x100472884]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10042b640
add rdi, 2
add rdi, rsi
lea rdx, [0x100472a38]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
test rax, rax
je 0x100438278
sub rax, rdi
mov r8, rdi
jmp 0x1004381d4
mov esi, 1
cmp word [rdi], 0
je 0x1004382e3
mov rax, r14
inc rax
cmp word [rdi + rax*2], 0
jne 0x100438286
lea rdx, [rbp + 0xdd0]
mov rcx, r14
nop word [rax + rax]
inc rcx
cmp word [rdx + rcx*2], 0
jne 0x1004382a0
add rax, rcx
cmp rax, 0x80
jae 0x1004382e3
mov r8, rdi
mov edx, 0x80
lea rcx, [rbp + 0xdd0]
call fcn.10040d600
jmp 0x1004382e3
lea r8, [rbp + 0xcd0]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10040b320
test rbx, rbx
je 0x10043830b
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x10043830b
lea r8, [rbp + 0xcd0]
mov edx, 0x100
lea rcx, [rbp + 0xdd0]
call fcn.10040b320
lea rcx, [rbp + 0xdd0]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtol]
mov r10d, eax
mov eax, 0x431bde83
imul r10d
mov r11d, edx
sar r11d, 0x12
mov ecx, r11d
shr ecx, 0x1f
add r11d, ecx
mov eax, 0x68db8bad
imul r10d
sar edx, 0xc
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
imul ecx, edx, 0x2710
mov r9d, r10d
sub r9d, ecx
imul ecx, r11d, 0xf4240
sub r10d, ecx
mov eax, 0x68db8bad
imul r10d
sar edx, 0xc
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x28], r9d
mov dword [rsp + 0x20], edx
mov r9d, r11d
lea r8, str._ld._02ld._03ld
mov edx, 0x80
lea rcx, [0x1004a9a00]
call fcn.10040b460
mov r8d, 2
lea rax, [rbp - 0x58]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 0x80
lea rax, [rbp + 0x1550]
mov qword [rsp + 0x20], rax
mov r9d, 0x4af
mov edx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLGetProperty]
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
movaps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x20], xmm0
lea rax, [rbp + 0x1870]
mov qword [rsp + 0x38], rax
lea rax, [rbp + 0x1650]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp - 0x20]
xor edx, edx
lea rcx, [rbp + 0x60]
call fcn.1004109a0
test eax, eax
je 0x10043794d
mov qword [rbp - 0x20], r13
lea rdx, str.EXECUTE_msdb.dbo.sp_sqlagent_get_startup_info
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLExecDirect]
cmp eax, 1
jne 0x100438628
lea rbx, [0x1004a8c78]
lea rdi, [0x1004a96f8]
lea r13, [0x1004a96f4]
lea r12, [0x1004a9174]
nop
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8d, [r9 - 0x14]
mov edx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x20], rax
mov edx, 2
lea r9d, [rdx + 2]
lea r8d, [rdx - 0x12]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov edx, 3
lea r9d, [rdx + 1]
lea r8d, [rdx - 0x13]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
mov edx, 4
mov r9d, edx
lea r8d, [rdx - 0x14]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1d70]
mov qword [rsp + 0x20], rax
mov edx, 5
mov r9d, 0x106
lea r8d, [rdx - 0xd]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov edx, 6
lea r9d, [rdx - 2]
lea r8d, [rdx - 0x16]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
mov edx, 7
lea r9d, [rdx - 3]
lea r8d, [rdx - 0x17]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1760]
mov qword [rsp + 0x20], rax
mov edx, 8
mov r9d, 0x106
lea r8d, [rdx - 0x10]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
mov edx, 9
lea r9d, [rdx - 5]
lea r8d, [rdx - 0x19]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov edx, 0xa
lea r9d, [rdx - 6]
lea r8d, [rdx - 0x1a]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLNextRow]
cmp eax, 0xffffffff
jne 0x100438604
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLNextRow]
cmp eax, 0xffffffff
je 0x1004385f5
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLPurgeResults]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLResults]
cmp eax, 1
je 0x100438450
mov r12d, dword [rbp - 0x60]
xor r13d, r13d
call fcn.10044da70
cmp byte [rax + 0xc8], 0
jne 0x100438664
lea rax, [rbp + 0xc98]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
mov r9d, esi
lea rdx, str.update_msdb.dbo.sysalerts_set_event_source__case_when__serverproperty_instancename__is_null__then_NMSSQLSERVER_else_NMSSQL___convert_nvarchar_64___serverproperty_instancename___end
lea rcx, [rbp + 0x60]
call fcn.100410640
movups xmm0, xmmword [str.ConnNewSessionID]
movups xmmword [rbp + 0xc70], xmm0
movups xmm1, xmmword [0x100475a58]
movups xmmword [rbp + 0xc80], xmm1
movzx eax, word [0x100475a68]
mov word [rbp + 0xc90], ax
mov ebx, r13d
lea rax, [rbp - 0x80]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r13w
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea rdx, str.LoginTimeout
lea rcx, [rbp - 0x80]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rbp - 0x80]
call fcn.100409ee0
mov r9d, eax
lea r8, [rbp + 0xc70]
mov edx, esi
lea rcx, [rbp + 0x60]
call fcn.10040fcc0
test eax, eax
je 0x100438b26
lea rdx, str.INSERT_msdb.dbo.syssessions_agent_start_date__VALUES_GetDate____SELECT_session_id__SCOPE_IDENTITY__
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLExecDirect]
cmp eax, 1
jne 0x100438b26
lea rdi, [0x100499284]
lea rax, [rbp - 0x20]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov r9d, 4
lea r8d, [r9 - 0x14]
mov edx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLBind]
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLNextRow]
cmp eax, 0xffffffff
jne 0x100438754
mov ebx, esi
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLNextRow]
cmp eax, 0xffffffff
je 0x100438745
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLResults]
cmp eax, 1
je 0x100438710
test ebx, ebx
je 0x100438b26
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
mov esi, dword [rsp + 0x68]
lea rcx, [rbp + 0xed0]
cmp word [0x1004a9900], 0
lea rax, [0x1004a9900]
cmovne rcx, rax
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rcx
lea r9, [rbp + 0x1d70]
xor edx, edx
lea ecx, [rdx + 4]
lea r8d, [rdx + 0x65]
call fcn.100432180
lea r9, [rbp + 0xed0]
cmp word [0x1004a9a00], 0
lea rax, [0x1004a9a00]
cmovne r9, rax
xor edx, edx
lea ecx, [rdx + 4]
lea r8d, [rdx + 0x66]
call fcn.100432180
cmp word [rbp + 0x1550], 0
je 0x1004387f9
lea rcx, [rbp + 0x1550]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsupr]
mov r9, rax
jmp 0x100438800
lea r9, [rbp + 0xed0]
lea rax, [rbp]
cmp qword [rbp + 0x18], 8
cmovae rax, qword [rbp]
mov qword [rsp + 0x20], rax
xor edx, edx
lea ecx, [rdx + 4]
lea r8d, [rdx + 0x67]
call fcn.100432180
mov dword [rsp + 0x20], r15d
mov r9d, dword [0x1004a9df8]
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x136
call fcn.100432180
call fcn.10044da70
lea r9, [rax + 0x68]
cmp qword [r9 + 0x18], 8
jb 0x100438850
mov r9, qword [r9]
lea rax, [0x1004a9700]
mov qword [rsp + 0x20], rax
xor edx, edx
lea ecx, [rdx + 4]
mov r8d, 0x153
call fcn.100432180
test esi, esi
jne 0x1004388b2
mov r9d, 0x200
lea r8, [rbp + 0x1150]
lea edx, [rsi + 0x6a]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, [rbp + 0x1650]
lea rcx, [rbp + 0xed0]
cmp word [rbp + 0x1650], si
cmove rax, rcx
lea r9, str.SQLServerAgent
jmp 0x100437c25
cmp dword [rsp + 0x70], 0
je 0x1004388eb
mov r9d, 0x200
lea r8, [rbp + 0x1150]
mov edx, 0xff
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, str.msdb
lea r9, str.SQLServerAgent
jmp 0x100437c25
cmp dword [rsp + 0x74], 0
jne 0x100438923
mov r9d, 0x200
lea r8, [rbp + 0x1150]
lea edx, [r9 - 0x7c]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea rax, str.msdb
lea r9, str.SQLServerAgent
jmp 0x100437c25
cmp dword [0x1004a9184], 0
jne 0x1004389af
lea rax, [rbp + 0x1760]
lea rbx, str.MSSQLSERVER
mov r8, rbx
sub r8, rax
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x100438958
add rax, 2
test ecx, ecx
jne 0x100438944
test edx, edx
je 0x1004389af
mov r9d, 0x200
lea r8, [rbp + 0x1150]
lea edx, [r9 - 0x69]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
mov qword [rsp + 0x28], rbx
lea rax, [rbp + 0x1760]
mov qword [rsp + 0x20], rax
lea r9, str.SQLServerAgent
lea r8, [rbp + 0x1150]
mov edx, 0x200
lea rcx, [rbp + 0x1870]
call fcn.10040b460
jmp 0x100437948
lea rax, [rbp - 0x80]
mov qword [rbp - 0x60], rax
mov qword [rbp - 0x70], r13
mov qword [rbp - 0x68], 7
mov word [rbp - 0x80], r13w
mov r8d, reloc.ODBC32.dll_SQLFreeStmt
lea rdx, str.SkipVersionCheck
lea rcx, [rbp - 0x80]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rbp - 0x80]
call fcn.10040a150
test al, al
jne 0x100438a79
mov eax, dword [0x1004a96f0]
test eax, eax
jne 0x100438a2b
mov r9d, 0x200
lea r8, [rbp + 0x1150]
lea edx, [rax + 0x6b]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea r9, str.SQLServerAgent
jmp 0x100437930
cmp eax, 0xf4240
jge 0x100438a79
lea rax, str.10.0
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 2
lea rax, str.SQLServerAgent
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 2
mov esi, 1
lea r9d, [rsi + 3]
mov r8d, 0xc000006b
movzx edx, si
lea ecx, [rsi + 2]
call fcn.100431c20
jmp 0x10043794d
cmp dword [rsp + 0x78], 2
je 0x100438abb
mov r9d, 0x200
lea r8, [rbp + 0x1150]
lea edx, [r9 - 0x38]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
lea r8, [rbp + 0x1150]
mov edx, 0x200
lea rcx, [rbp + 0x1870]
call fcn.10040b460
jmp 0x100437948
lea rdx, str.EXEC_sys.xp_sqlagent_notify_R__NULL__NULL__NULL__NULL
xor ecx, ecx
call fcn.1004104c0
call fcn.100418d80
test eax, eax
jne 0x100438af3
mov qword [rsp + 0x20], r13
lea r9, str.ConnConnectAndSetCryptoForXpstar
xor edx, edx
lea ecx, [rax + 1]
mov r8d, 0x1ba
call fcn.100432180
jmp 0x1004379bc
call fcn.10044c7e0
mov r12d, eax
test eax, eax
jne 0x1004379a6
mov r9d, 0x200
lea r8, [rbp + 0x1870]
lea edx, [r9 - 0x3e]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
jmp 0x100437948
lea rcx, [rbp + 0x60]
call qword [sym.imp.SQLSVC.dll_QSQLLogoff]
mov r9d, 0x200
lea r8, [rbp + 0x1870]
lea edx, [r9 - 0x49]
mov rcx, qword [0x1004a90d8]
call qword [sym.imp.USER32.dll_LoadStringW]
jmp 0x10043794d
call fcn.100469388
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r13
mov rdx, qword [rbp + 0x18]
cmp rdx, 8
jb 0x100438ba9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp]
mov rax, rcx
cmp rdx, 0x1000
jb 0x100438ba4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x100438ba4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.100469388
mov qword [rbp + 0x10], r13
mov qword [rbp + 0x18], 7
mov word [rbp], r13w
mov eax, r12d
mov rcx, qword [rbp + 0x2880]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x2990]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret