Function at 0x1045650
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, [0x01065ad8]
call qword [0x01068178]
test eax, eax
jne 0x10456c1
cmp dword [0x010679c0], 0
je 0x10456b4
cmp dword [0x01067484], 0
je 0x10456b4
lea rdx, [0x010098a8]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x10456e7
cmp dword [0x01067484], 0
je 0x10456e7
lea rdx, [0x010098a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x10456fc
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01065dd4]
cmp dword [rsp + 0x38], eax
jge 0x1045758
mov edx, dword [rsp + 0x38]
lea rcx, [0x01065dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x1045756
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x1045756
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [0x010098a0]
mov edx, 5
mov rcx, qword [rsp + 0x40]
call fcn.01046ad0
jmp 0x10456f1
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x104578b
cmp dword [0x01067484], 0
je 0x104578b
lea rdx, [0x010098a8]
lea rcx, [0x01001b00]
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, [0x01065ad8]
call qword [0x01068178]
test eax, eax
jne 0x10457e4
cmp dword [0x010679c0], 0
je 0x10457d7
cmp dword [0x01067484], 0
je 0x10457d7
lea rdx, [0x010098a8]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x104580a
cmp dword [0x01067484], 0
je 0x104580a
lea rdx, [0x010098a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x38], 0
jmp 0x1045827
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01065dd4]
cmp dword [rsp + 0x38], eax
jge 0x104586c
mov edx, dword [rsp + 0x38]
lea rcx, [0x01065dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x104586a
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x104586a
mov eax, dword [rsp + 0x30]
add eax, 1
mov dword [rsp + 0x30], eax
jmp 0x104581c
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x104589f
cmp dword [0x01067484], 0
je 0x104589f
lea rdx, [0x010098a8]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x30], 0
je 0x10458bd
mov r9d, dword [rsp + 0x30]
mov r8d, 0xba
xor edx, edx
mov ecx, 3
call fcn.01033fa0
cmp dword [rsp + 0x30], 0
je 0x1045a66
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsp + 0x3c], 0x1388
jb 0x1045a06
mov dword [rsp + 0x30], 0
lea rcx, [0x01065ad8]
call qword [0x01068178]
test eax, eax
jne 0x104592d
cmp dword [0x010679c0], 0
je 0x1045920
cmp dword [0x01067484], 0
je 0x1045920
lea rdx, [0x010098a8]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x1045953
cmp dword [0x01067484], 0
je 0x1045953
lea rdx, [0x010098a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x1045968
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01065dd4]
cmp dword [rsp + 0x38], eax
jge 0x10459ad
mov edx, dword [rsp + 0x38]
lea rcx, [0x01065dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x10459ab
mov rax, qword [rsp + 0x40]
cmp dword [rax + 0x588], 0
je 0x10459ab
mov eax, dword [rsp + 0x30]
add eax, 1
mov dword [rsp + 0x30], eax
jmp 0x104595d
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x10459e0
cmp dword [0x01067484], 0
je 0x10459e0
lea rdx, [0x010098a8]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
cmp dword [rsp + 0x30], 0
je 0x10459fe
mov r9d, dword [rsp + 0x30]
mov r8d, 0xba
xor edx, edx
mov ecx, 3
call fcn.01033fa0
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 [0x01067148]
jl 0x1045a61
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov r9d, dword [0x01067148]
mov r8d, 0xbc
xor edx, edx
mov ecx, 2
call fcn.01033fa0
mov dword [0x010679dc], 1
jmp 0x1045a66
jmp 0x10458bd
cmp dword [0x010679dc], 0
jne 0x1045bc6
lea rcx, [0x01065ad8]
call qword [0x01068178]
test eax, eax
jne 0x1045ab7
cmp dword [0x010679c0], 0
je 0x1045aaa
cmp dword [0x01067484], 0
je 0x1045aaa
lea rdx, [0x010098a8]
lea rcx, [0x01001b70]
call qword [sym.imp.MSVCR80.dll_wprintf]
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x010679c0], 0
je 0x1045add
cmp dword [0x01067484], 0
je 0x1045add
lea rdx, [0x010098a8]
lea rcx, [0x01001b38]
call qword [sym.imp.MSVCR80.dll_wprintf]
mov dword [rsp + 0x38], 0
jmp 0x1045af2
mov eax, dword [rsp + 0x38]
add eax, 1
mov dword [rsp + 0x38], eax
mov eax, dword [0x01065dd4]
cmp dword [rsp + 0x38], eax
jge 0x1045b93
mov edx, dword [rsp + 0x38]
lea rcx, [0x01065dc8]
call qword [sym.imp.SQLSVC.dll_SHRecMemLock]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x1045b8e
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x5a0], 0
je 0x1045b8e
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 0x1045b8e
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 0x1045ae7
lea rcx, [0x01065ad8]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [0x010679c0], 0
je 0x1045bc6
cmp dword [0x01067484], 0
je 0x1045bc6
lea rdx, [0x010098a8]
lea rcx, [0x01001b00]
call qword [sym.imp.MSVCR80.dll_wprintf]
add rsp, 0x58
ret