Function at 0x40ff50
Capabilities:
Check for time delay via gettickcount
Check mutex on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x451f2c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x248
mov eax, dword [0x462454]
mov dword [ebp - 0x20], eax
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::constructor_void_]
mov dword [ebp - 4], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x238], 0
push 0x208
push 0
lea eax, [ebp - 0x22c]
push eax
call sub.MSVCR71.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x22c]
push ecx
push 0x104
mov edx, dword [0x462550]
call dword [edx + 0x1c0]
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x22c]
push ecx
push str._s_r_s
lea edx, [ebp - 0x234]
push edx
call dword [sym.imp.SEMSFC.dll_public:_void___cdecl_SString::Format_unsigned_short_int_const__]
add esp, 0x10
push 0
push str.ISQLWWindowClass
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x41002d
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x410055
mov dword [ebp - 0x23c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x23c]
jmp 0x4102ad
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x14], eax
mov ecx, 1
test ecx, ecx
je 0x41028a
push str.SQLServerQueryAnalyzer70Mutex
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x410094
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x410126
cmp dword [ebp - 0x1c], 0
je 0x4100a4
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4100da
mov dword [ebp - 0x240], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x240]
jmp 0x4102ad
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
cmp eax, 0x2710
jbe 0x410112
mov dword [ebp - 0x244], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x244]
jmp 0x4102ad
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x1c], 0
jmp 0x41005e
push str.SQLServerQueryAnalyzer70MapFile
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_int___thiscall_SString::GetLength_void_const]
add eax, 2
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x230], eax
cmp dword [ebp - 0x230], 0
jne 0x4101e8
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4101a3
mov dword [ebp - 0x248], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x248]
jmp 0x4102ad
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x14]
cmp eax, 0x2710
jbe 0x4101db
mov dword [ebp - 0x24c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x24c]
jmp 0x4102ad
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x41005e
push 0
push 0
push 0
push 2
mov eax, dword [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_unsigned_short_int_const____thiscall_SString::operator_unsigned_short_int_const__void_const]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCR71.dll_wcscat]
add esp, 8
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push 0
push 0
push 0x12bc
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.SQLUNIRL.dll__SendMessage_16]
sub eax, 7
neg eax
sbb eax, eax
inc eax
mov dword [ebp - 0x238], eax
mov ecx, dword [ebp - 0x230]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x250], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x250]
jmp 0x4102ad
mov dword [ebp - 0x254], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x234]
call dword [sym.imp.SEMSFC.dll_public:_void___thiscall_SString::destructor_void_]
mov eax, dword [ebp - 0x254]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x20]
call fcn.0044fa3b
mov esp, ebp
pop ebp
ret