Function at 0x40ff36
Capabilities:
Check for time delay via gettickcount
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
push esi
push edi
mov ecx, 0xd
mov esi, str.WaitForEngineThreadsToStop
lea edi, [ebp - 0x40]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ax, word [0x44accc]
mov word [ebp - 0x244], ax
mov ecx, 0x7f
xor eax, eax
lea edi, [ebp - 0x242]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 4], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x24c], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x248], 0
mov ecx, dword [ebp + 8]
add ecx, dword [0x44d950]
mov dword [ebp + 8], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x24c], eax
mov edx, 1
test edx, edx
je 0x41022a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x44b08c], 0
je 0x40ffdf
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x41001d
push 0x44c2a0
call dword [0x44b824]
test eax, eax
jne 0x41001d
cmp dword [0x44b090], 0
je 0x410012
cmp dword [0x44dc84], 0
je 0x410012
lea eax, [ebp - 0x40]
push eax
push 0x43e66c
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x44b090], 0
je 0x410041
cmp dword [0x44dc84], 0
je 0x410041
lea ecx, [ebp - 0x40]
push ecx
push 0x43e6a8
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [0x44abfc], 0
jne 0x41007e
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x44b090], 0
je 0x410079
cmp dword [0x44dc84], 0
je 0x410079
lea edx, [ebp - 0x40]
push edx
push 0x43e6dc
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
jmp 0x41022a
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x44b090], 0
je 0x4100ad
cmp dword [0x44dc84], 0
je 0x4100ad
lea eax, [ebp - 0x40]
push eax
push 0x43e710
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [ebp + 8], 0
je 0x410225
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x24c]
push eax
call sub.MSVCRT.dll_abs
add esp, 4
cdq
mov ecx, 0x3e8
idiv ecx
cmp eax, dword [ebp + 8]
jl 0x410225
mov edx, dword [ebp + 8]
push edx
mov eax, dword [0x44abfc]
push eax
push 0xf0
push 0
push 1
call fcn.0041bfab
add esp, 0x14
mov dword [0x44b0b0], 1
cmp dword [0x44b08c], 0
je 0x410118
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x410156
push 0x44c2a0
call dword [0x44b824]
test eax, eax
jne 0x410156
cmp dword [0x44b090], 0
je 0x41014b
cmp dword [0x44dc84], 0
je 0x41014b
lea ecx, [ebp - 0x40]
push ecx
push 0x43e744
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x44b090], 0
je 0x41017a
cmp dword [0x44dc84], 0
je 0x41017a
lea edx, [ebp - 0x40]
push edx
push 0x43e780
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [0x44c328], 0
je 0x4101ea
mov dword [ebp - 0x248], 0
jmp 0x41019e
mov eax, dword [ebp - 0x248]
add eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
cmp ecx, dword [0x44c328]
jge 0x4101ea
mov edx, dword [ebp - 0x248]
push edx
push 0x44c320
call dword [sym.imp.SQLSVC.dll_SHRecMemLock]
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x4101e8
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push ecx
mov edx, dword [ebp - 8]
add edx, 4
push edx
push 0x137
push 0
push 1
call fcn.0041bfab
add esp, 0x14
jmp 0x41018f
mov dword [0x44ac00], 0
push 0x44c2a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x44b090], 0
je 0x410223
cmp dword [0x44dc84], 0
je 0x410223
lea eax, [ebp - 0x40]
push eax
push 0x43e7b4
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
jmp 0x41022a
jmp 0x40ffb1
push 0
mov ecx, dword [0x44df14]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4102b0
push 1
push str.SQLServerAgentShutdownStatus
push 0x100
lea edx, [ebp - 0x244]
push edx
call fcn.00421862
add esp, 0x10
lea eax, [ebp - 0x244]
push eax
push 0
push 2
mov ecx, dword [0x44df4c]
call dword [ecx + 0x354]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4102b0
push 4
push 0
push 0
push 2
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
je 0x4102a6
mov eax, dword [ebp - 0x44]
mov dword [eax], 1
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x44b810], 0
je 0x4102c5
mov eax, dword [0x44b810]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov esp, ebp
pop ebp
ret