Function at 0x1046280
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub rsp, 0x58
mov dword [rsp + 0x34], 0
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
mov qword [rsp + 0x40], 0
lea rcx, [0x01066ad8]
call qword [0x01069178]
test eax, eax
jne 0x10462f1
cmp dword [0x010689c0], 0
je 0x10462e4
cmp dword [0x01068484], 0
je 0x10462e4
lea rdx, [0x01009b38]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x1046317
cmp dword [0x01068484], 0
je 0x1046317
lea rdx, [0x01009b38]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x104632c
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01066dd4]
cmp dword [rsp + 0x38], eax
jge 0x1046388
mov edx, dword [rsp + 0x38]
lea rcx, [0x01066dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x1046386
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x1046386
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x01009b30]
mov edx, 5
mov rcx, qword [rsp + 0x40]
call fcn.010476f0
jmp 0x1046321
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x10463bb
cmp dword [0x01068484], 0
je 0x10463bb
lea rdx, [0x01009b38]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rsp + 0x34], eax
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [0x01066ad8]
call qword [0x01069178]
test eax, eax
jne 0x1046414
cmp dword [0x010689c0], 0
je 0x1046407
cmp dword [0x01068484], 0
je 0x1046407
lea rdx, [0x01009b38]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x104643a
cmp dword [0x01068484], 0
je 0x104643a
lea rdx, [0x01009b38]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
jmp 0x1046457
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01066dd4]
cmp dword [rsp + 0x38], eax
jge 0x104649c
mov edx, dword [rsp + 0x38]
lea rcx, [0x01066dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x104649a
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x104649a
mov eax, dword [rsp + 0x30]
add eax, 1
mov dword [rsp + 0x30], eax
jmp 0x104644c
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x10464cf
cmp dword [0x01068484], 0
je 0x10464cf
lea rdx, [0x01009b38]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x30], 0
je 0x10464ed
mov r9d, dword [rsp + 0x30]
mov r8d, 0xba
xor edx, edx
mov ecx, 3
call fcn.01034b80
cmp dword [rsp + 0x30], 0
je 0x1046696
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsp + 0x3c], 0x1388
jb 0x1046636
mov dword [rsp + 0x30], 0
lea rcx, [0x01066ad8]
call qword [0x01069178]
test eax, eax
jne 0x104655d
cmp dword [0x010689c0], 0
je 0x1046550
cmp dword [0x01068484], 0
je 0x1046550
lea rdx, [0x01009b38]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x1046583
cmp dword [0x01068484], 0
je 0x1046583
lea rdx, [0x01009b38]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x1046598
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01066dd4]
cmp dword [rsp + 0x38], eax
jge 0x10465dd
mov edx, dword [rsp + 0x38]
lea rcx, [0x01066dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x10465db
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x10465db
mov eax, dword [rsp + 0x30]
add eax, 1
mov dword [rsp + 0x30], eax
jmp 0x104658d
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x1046610
cmp dword [0x01068484], 0
je 0x1046610
lea rdx, [0x01009b38]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x30], 0
je 0x104662e
mov r9d, dword [rsp + 0x30]
mov r8d, 0xba
xor edx, edx
mov ecx, 3
call fcn.01034b80
mov dword [rsp + 0x3c], 0
mov eax, dword [rsp + 0x3c]
add eax, 0x1f4
mov dword [rsp + 0x3c], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [rsp + 0x34]
cdq
mov ecx, 0x3e8
idiv ecx
mov ecx, eax
call sub.MSVCR80.dll_abs
cmp eax, dword [0x01068148]
jl 0x1046691
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9d, dword [0x01068148]
mov r8d, 0xbc
xor edx, edx
mov ecx, 2
call fcn.01034b80
mov dword [0x010689dc], 1
jmp 0x1046696
jmp 0x10464ed
cmp dword [0x010689dc], 0
jne 0x10467f6
lea rcx, [0x01066ad8]
call qword [0x01069178]
test eax, eax
jne 0x10466e7
cmp dword [0x010689c0], 0
je 0x10466da
cmp dword [0x01068484], 0
je 0x10466da
lea rdx, [0x01009b38]
lea rcx, [0x01001b80]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010689c0], 0
je 0x104670d
cmp dword [0x01068484], 0
je 0x104670d
lea rdx, [0x01009b38]
lea rcx, [0x01001b48]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x1046722
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01066dd4]
cmp dword [rsp + 0x38], eax
jge 0x10467c3
mov edx, dword [rsp + 0x38]
lea rcx, [0x01066dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x10467be
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x5a0], 0
je 0x10467be
mov rax, qword [rsp + 0x40]
mov rcx, qword [rax + 0x5a0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x40]
mov qword [rax + 0x5a0], 0
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0xe48], 0
je 0x10467be
mov rax, qword [rsp + 0x40]
mov rax, qword [rax + 0xe48]
mov rcx, qword [rsp + 0x40]
mov rcx, qword [rcx + 0xe48]
mov rax, qword [rax]
call qword [rax + reloc.ODBC32.dll_SQLFreeStmt]
mov rax, qword [rsp + 0x40]
mov qword [rax + 0xe48], 0
jmp 0x1046717
lea rcx, [0x01066ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010689c0], 0
je 0x10467f6
cmp dword [0x01068484], 0
je 0x10467f6
lea rdx, [0x01009b38]
lea rcx, [0x01001b10]
call qword [sym.imp.MSVCR80.dll_wprintf]
add rsp, 0x58
ret