Function at 0x10040e2d0
Capabilities:
Read file via mapping

Disassembly:
mov r11, rsp
push rsi
push rdi
push r14
sub rsp, 0x470
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rbp
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x460], rax
mov rdi, rcx
xor edx, edx
mov r8d, 0x200
lea rcx, [r11 - 0x228]
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov r8d, 0x200
lea rcx, [rsp + 0x60]
call sub.VCRUNTIME140.dll_memset
lea rbp, str.MSSQLSERVER
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
inc rax
cmp word [rbp + rax*2], 0
jne 0x10040e340
add eax, 0xf
mov esi, 1
xor r14d, r14d
mov ebx, 0x100
cmp eax, ebx
jle 0x10040e392
lea r9, str.SQLServerAgent
xor r8d, r8d
lea rdx, str.Internal_Error:_Buffer_overrun_in_MakeInstanceSafeName______s_shutting_down...
mov ecx, esi
call fcn.100432180
mov rcx, qword [0x1004a90e0]
test rcx, rcx
je 0x10040e444
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x10040e444
mov word [rsp + 0x60], r14w
mov rdx, rbx
lea rcx, [rsp + 0x60]
lea r8, str.SQL60_RUNNING
lea rax, [rsp + 0x60]
sub r8, rax
nop
lea rax, [rdx + 0x7ffffefe]
test rax, rax
je 0x10040e3d2
movzx eax, word [r8 + rcx]
test ax, ax
je 0x10040e3d2
mov word [rcx], ax
add rcx, 2
sub rdx, rsi
jne 0x10040e3b0
lea rax, [rcx - 2]
test rdx, rdx
cmovne rax, rcx
mov word [rax], r14w
call fcn.10044da70
cmp byte [rax + 0xc8], r14b
jne 0x10040e413
lea r8, [0x1004777a0]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.10040d600
mov r8, rbp
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.10040d600
cmp dword [0x1004a9184], r14d
je 0x10040e444
lea r8, [0x10047773c]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.10040d600
lea r8, [0x1004a9cf0]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.10040d600
lea r8, [rsp + 0x60]
mov edx, esi
mov ecx, 4
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
test rax, rax
jne 0x10040e682
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x10040e497
cmp dword [0x10049b76c], r14d
jne 0x10040e48d
xor r9d, r9d
mov r8d, 0x8000006a
movzx edx, si
lea ecx, [rax - 2]
call fcn.100431c20
mov dword [0x10049b76c], esi
mov eax, 3
jmp 0x10040e690
mov qword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rdi, rax
test rax, rax
jne 0x10040e4c2
xor eax, eax
jmp 0x10040e690
mov ecx, dword [rax]
test ecx, ecx
je 0x10040e4e2
sub ecx, esi
je 0x10040e57c
cmp ecx, esi
je 0x10040e594
mov eax, 3
jmp 0x10040e690
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], 7
mov word [rsp + 0x30], r14w
mov r8d, reloc.ODBC32.dll_SQLFreeStmt
lea rdx, str.RestartSQLServer
lea rcx, [rsp + 0x30]
call fcn.10040da90
nop
call fcn.10044da70
mov rcx, rax
lea rdx, [rsp + 0x30]
call fcn.10040a150
test al, al
jne 0x10040e4bb
cmp dword [0x10049b768], 0
jne 0x10040e57c
lea rax, [0x1004a8f40]
mov qword [rsp + 0x20], rax
lea r9, str.SQLServerAgent
xor edx, edx
lea ecx, [rdx + 2]
mov r8d, 0x168
call fcn.100432180
mov rcx, qword [0x1004a90e0]
test rcx, rcx
je 0x10040e575
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, esi
jmp 0x10040e690
mov dword [rdi], 2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp dword [0x10049b768], 0
je 0x10040e540
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
call fcn.10044da70
lea rcx, [rsp + 0x260]
lea r9, str.Global_sqlserverRecComplete
cmp byte [rax + 0xc8], 0
je 0x10040e604
lea rax, [rsp + 0x260]
sub r9, rax
nop word [rax + rax]
lea rax, [rbx + 0x7ffffefe]
test rax, rax
je 0x10040e5f3
movzx eax, word [r9 + rcx]
test ax, ax
je 0x10040e5f3
mov word [rcx], ax
add rcx, 2
sub rbx, 1
jne 0x10040e5d0
lea rax, [rcx - 2]
test rbx, rbx
cmovne rax, rcx
mov word [rax], r14w
jmp 0x10040e618
mov qword [rsp + 0x20], rbp
lea r8, [0x10047a508]
mov rdx, rbx
call fcn.10040b460
lea r8, [rsp + 0x260]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenEventW]
test rax, rax
jne 0x10040e672
lea rax, [0x1004a8f40]
mov qword [rsp + 0x20], rax
lea r9, str.SQLServerAgent
xor edx, edx
lea ecx, [rdx + 2]
mov r8d, 0x168
call fcn.100432180
mov rcx, qword [0x1004a90e0]
test rcx, rcx
je 0x10040e48d
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, 3
jmp 0x10040e690
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 3
jmp 0x10040e690
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 2
mov rcx, qword [rsp + 0x460]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x470]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret