Function at 0x40fd71
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 [0x448764]
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 [0x44b3ac]
mov dword [ebp + 8], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x24c], eax
mov edx, 1
test edx, edx
je 0x410065
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x448b1c], 0
je 0x40fe1a
push 0x449d00
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x40fe58
push 0x449d00
call dword [0x4492b4]
test eax, eax
jne 0x40fe58
cmp dword [0x448b20], 0
je 0x40fe4d
cmp dword [0x44b6e0], 0
je 0x40fe4d
lea eax, [ebp - 0x40]
push eax
push 0x43b844
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 0x449d00
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x448b20], 0
je 0x40fe7c
cmp dword [0x44b6e0], 0
je 0x40fe7c
lea ecx, [ebp - 0x40]
push ecx
push 0x43b880
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [0x4486bc], 0
jne 0x40feb9
push 0x449d00
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x448b20], 0
je 0x40feb4
cmp dword [0x44b6e0], 0
je 0x40feb4
lea edx, [ebp - 0x40]
push edx
push 0x43b8b4
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
jmp 0x410065
push 0x449d00
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x448b20], 0
je 0x40fee8
cmp dword [0x44b6e0], 0
je 0x40fee8
lea eax, [ebp - 0x40]
push eax
push 0x43b8e8
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [ebp + 8], 0
je 0x410060
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 0x410060
mov edx, dword [ebp + 8]
push edx
mov eax, dword [0x4486bc]
push eax
push 0xf0
push 0
push 1
call fcn.0041b8d1
add esp, 0x14
mov dword [0x448b40], 1
cmp dword [0x448b1c], 0
je 0x40ff53
push 0x449d00
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x40ff91
push 0x449d00
call dword [0x4492b4]
test eax, eax
jne 0x40ff91
cmp dword [0x448b20], 0
je 0x40ff86
cmp dword [0x44b6e0], 0
je 0x40ff86
lea ecx, [ebp - 0x40]
push ecx
push 0x43b91c
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
push 0x449d00
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x448b20], 0
je 0x40ffb5
cmp dword [0x44b6e0], 0
je 0x40ffb5
lea edx, [ebp - 0x40]
push edx
push 0x43b958
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
cmp dword [0x449d88], 0
je 0x410025
mov dword [ebp - 0x248], 0
jmp 0x40ffd9
mov eax, dword [ebp - 0x248]
add eax, 1
mov dword [ebp - 0x248], eax
mov ecx, dword [ebp - 0x248]
cmp ecx, dword [0x449d88]
jge 0x410025
mov edx, dword [ebp - 0x248]
push edx
push 0x449d80
call dword [sym.imp.SQLSVC.dll_SHRecMemLock]
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x410023
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.0041b8d1
add esp, 0x14
jmp 0x40ffca
mov dword [0x4486c0], 0
push 0x449d00
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x448b20], 0
je 0x41005e
cmp dword [0x44b6e0], 0
je 0x41005e
lea eax, [ebp - 0x40]
push eax
push 0x43b98c
call dword [sym.imp.MSVCRT.dll_wprintf]
add esp, 8
jmp 0x410065
jmp 0x40fdec
push 0
mov ecx, dword [0x44b954]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4100eb
push 1
push str.SQLServerAgentShutdownStatus
push 0x100
lea edx, [ebp - 0x244]
push edx
call fcn.00420ed4
add esp, 0x10
lea eax, [ebp - 0x244]
push eax
push 0
push 2
mov ecx, dword [0x449ba0]
call dword [ecx + 0x354]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4100eb
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 0x4100e1
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 [0x4492a0], 0
je 0x410100
mov eax, dword [0x4492a0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov esp, ebp
pop ebp
ret