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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x80
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov r12, rdx
mov rdi, rcx
cmp dword [rcx], 0
je 0x1000158be
mov eax, dword [rcx + 0x40]
jmp 0x100015c4a
call fcn.100015804
lea rdx, [0x100004520]
lea rcx, [rsp + 0x30]
call sub.MFC42u.dll_CDaoException::CDaoException
nop
lea rdx, [0x100004560]
lea rcx, [rsp + 0x38]
call sub.MFC42u.dll_CDaoException::CDaoException
nop
lea rdx, [0x100001e7c]
lea rcx, [rsp + 0x40]
call sub.MFC42u.dll_CDaoException::CDaoException
nop
xor ebp, ebp
mov rax, qword [rsp + 0x30]
cmp dword [rax - 8], ebp
je 0x100015c23
lea rbx, [rsp + 0x30]
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo
nop
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo
nop
lea rcx, [rsp + 0x28]
call sub.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo
nop
and qword [rsp + 0x20], 0
mov rax, qword [r12]
xor r9d, r9d
lea r8, [rsp + 0x20]
mov rdx, qword [rbx]
mov rcx, r12
call qword [rax + 8]
test eax, eax
js 0x100015bfa
and qword [rsp + 0xc8], 0
mov rcx, qword [rsp + 0x20]
mov rax, qword [rcx]
xor r8d, r8d
lea rdx, [rsp + 0xc8]
call qword [rax + 0x10]
test eax, eax
jne 0x100015b91
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CPropertySheet::EnableStackedTabs
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CPropertySheet::EnableStackedTabs
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx]
lea r8, [rsp + 0xc0]
lea rdx, [0x1000044f0]
call qword [rax + 0x10]
test eax, eax
js 0x100015b73
mov rcx, qword [rsp + 0xc8]
mov rax, qword [rcx]
lea r8, [rsp + 0xb0]
lea rdx, [0x100004508]
call qword [rax + 0x10]
test eax, eax
js 0x100015b73
lea rdx, [0x100002d20]
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CRichEditView::FindTextW
cmp eax, 0xffffffff
je 0x100015a3c
mov rcx, qword [rsp + 0xc0]
mov r8d, dword [rcx - 8]
sub r8d, eax
dec r8d
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CFormView::SetOccDialogInfo
nop
mov rdx, rax
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_AfxDaoGetEngine
nop
lea rcx, [rsp + 0x58]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
lea rdx, [0x100002d20]
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CRichEditView::FindTextW
cmp eax, 0xffffffff
je 0x100015a95
mov rcx, qword [rsp + 0xb0]
mov r8d, dword [rcx - 8]
sub r8d, eax
dec r8d
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CFormView::SetOccDialogInfo
nop
mov rdx, rax
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_AfxDaoGetEngine
nop
lea rcx, [rsp + 0x60]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
lea r8, [rsp + 0x48]
mov rdx, qword [rsp + 0xc0]
lea rcx, [rdi + 8]
call sub.MFC42u.dll_CView::OnDestroy
neg eax
sbb rbx, rbx
and rbx, qword [rsp + 0x48]
jne 0x100015af4
lea ecx, [rbx + 0x38]
call sub.MFC42u.dll_CMonthCalCtrl::SetDayState
mov qword [rsp + 0x68], rax
test rax, rax
je 0x100015ad9
lea edx, [rbx + 0xa]
mov rcx, rax
call sub.MFC42u.dll_CDaoQueryDef::CDaoQueryDef
mov rbx, rax
jmp 0x100015adb
xor ebx, ebx
test rbx, rbx
je 0x100015b04
mov rdx, qword [rsp + 0xc0]
lea rcx, [rdi + 8]
call sub.MFC42u.dll_AfxOleUnlockControl
mov qword [rax], rbx
lea rdx, [rsp + 0xb0]
mov rcx, rbx
call sub.MFC42u.dll_Ordinal_1383
lea r8, [rsp + 0x50]
mov rdx, qword [rsp + 0xb0]
lea rcx, [rdi + 8]
call sub.MFC42u.dll_CView::OnDestroy
neg eax
sbb rbx, rbx
and rbx, qword [rsp + 0x50]
jne 0x100015b63
lea ecx, [rbx + 0x38]
call sub.MFC42u.dll_CMonthCalCtrl::SetDayState
mov qword [rsp + 0x68], rax
test rax, rax
je 0x100015b48
lea edx, [rbx + 0xa]
mov rcx, rax
call sub.MFC42u.dll_CDaoQueryDef::CDaoQueryDef
mov rbx, rax
jmp 0x100015b4a
xor ebx, ebx
test rbx, rbx
je 0x100015b73
mov rdx, qword [rsp + 0xb0]
lea rcx, [rdi + 8]
call sub.MFC42u.dll_AfxOleUnlockControl
mov qword [rax], rbx
lea rdx, [rsp + 0xc0]
mov rcx, rbx
call sub.MFC42u.dll_Ordinal_1383
mov rcx, qword [rsp + 0x20]
mov rax, qword [rcx]
xor r8d, r8d
lea rdx, [rsp + 0xc8]
call qword [rax + 0x10]
test eax, eax
je 0x10001597f
mov rcx, qword [rsp + 0xc8]
test rcx, rcx
je 0x100015ba8
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x100015bbd
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
nop
lea rcx, [rsp + 0x28]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
inc rbp
lea rbx, [rsp + rbp*8 + 0x30]
mov rax, qword [rbx]
cmp dword [rax - 8], 0
jne 0x10001590e
jmp 0x100015c23
mov dword [rdi + 0x40], eax
lea rcx, [rsp + 0x28]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0xb0]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0xc0]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [rdi], eax
mov ebx, dword [rdi + 0x40]
lea r9, [sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
mov edx, 8
lea r8d, [rdx - 5]
lea rcx, [rsp + 0x30]
call fcn.10002076c
mov eax, ebx
add rsp, 0x80
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret