Function at 0x10041e120
Capabilities:
Read file via mapping

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x260
mov rax, qword [0x100499010]
xor rax, rsp
mov qword [rsp + 0x250], rax
xor edx, edx
mov r8d, 0x200
lea rcx, [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
xor edi, edi
mov qword [rsp + 0x30], rdi
lea ebx, [rdi + 4]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
nop dword [rax + rax]
mov eax, dword [0x10049b77c]
test eax, eax
jle 0x10041e2e5
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
dec ebx
test ebx, ebx
jg 0x10041e170
mov eax, dword [0x10049b77c]
test eax, eax
jle 0x10041e2e5
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, esi
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [rsp + 0x20], eax
mov r9d, dword [0x10049b77c]
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, 0xf0
call fcn.100432180
mov dword [0x1004a9240], 1
call fcn.1004342d0
movzx ebx, al
lea rcx, [0x1004a9278]
mov rax, qword [0x1004a90d0]
call qword [case.0x10044bd0b.0]
test eax, eax
jne 0x10041e22e
cmp dword [0x1004a8ebc], edi
je 0x10041e221
test bl, bl
je 0x10041e221
lea rdx, str.WaitForEngineThreadsToStop
lea rcx, str.__s_____Waiting_for_CritSec__n
call fcn.10043bdc0
lea rcx, [0x1004a9278]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1004a8ebc], edi
je 0x10041e24e
test bl, bl
je 0x10041e24e
lea rdx, str.WaitForEngineThreadsToStop
lea rcx, str.__s_____Enters_CritSec__n
call fcn.10043bdc0
nop
mov eax, dword [0x1004a9254]
test eax, eax
je 0x10041e2a5
mov ebx, edi
mov dword [rsp + 0x38], ebx
nop
cmp ebx, eax
jge 0x10041e2a5
mov edx, ebx
lea rcx, [0x1004a9248]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
test rax, rax
je 0x10041e297
lea r9, [rax + 4]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
xor edx, edx
lea ecx, [rdx + 1]
mov r8d, 0x137
call fcn.100432180
inc ebx
mov dword [rsp + 0x38], ebx
mov eax, dword [0x1004a9254]
jmp 0x10041e260
xchg dword [0x10049b778], edi
call fcn.1004342d0
movzx ebx, al
lea rcx, [0x1004a9278]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x1004a8ebc], 0
je 0x10041e2e0
test bl, bl
je 0x10041e2e0
lea rdx, str.WaitForEngineThreadsToStop
lea rcx, str.__s_____Leaves_CritSec__n
call fcn.10043bdc0
mov rdi, qword [rsp + 0x30]
xor edx, edx
mov rcx, qword [0x1004a9108]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x10041e357
lea r8, str.SQLServerAgentShutdownStatus
lea rcx, [rsp + 0x50]
call fcn.10043b5a0
lea r8, [rsp + 0x50]
xor edx, edx
lea ecx, [rdx + 2]
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
je 0x10041e357
mov qword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
test rax, rax
je 0x10041e357
mov dword [rax], 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
nop
test rdi, rdi
je 0x10041e365
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.100469360
lea r11, [rsp + 0x260]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rsp, r11
pop rdi
ret