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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4827b0
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x4c2320]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov edi, 1
cmp dword [esi + 4], edi
jne 0x466976
mov eax, dword [esi + 0x10]
shr eax, 0x19
test al, 1
je 0x466787
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x30], 0x19
mov dword [ebp - 0x24], 0
call fcn.00462380
push 0x4ce234
mov dword [ebp - 0x1c], vtable.nfapi::AutoLock.0
mov dword [ebp - 0x18], 0x4ce234
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov edx, dword [0x4ce11c]
push eax
push ecx
push edx
mov dword [ebp - 4], 0
call fcn.00467a40
add esp, 0xc
test eax, eax
je 0x466b10
lea edi, [eax - 8]
mov eax, dword [esi + 0x10]
shr eax, 4
test al, 1
je 0x466885
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [edi + 0x2c]
mov dword [edi + 0x44], eax
lea eax, [edi + 0x2c]
cmp esi, eax
je 0x466856
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
push 0x4ce234
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.00462380
push 0x4ce234
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
jne 0x466844
mov eax, dword [edi + 0x34]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x466829
sub eax, ecx
mov dword [edi + 0x34], eax
jmp 0x466830
mov dword [edi + 0x34], 0
push 0
push esi
call fcn.00467c90
add esp, 8
or dword [edi + 0x8b], 0x20
jmp 0x46685d
mov ecx, dword [edi + 0x2c]
lea eax, [edi + 0x2c]
mov dword [esi], ecx
mov dword [esi + 4], eax
mov dword [ecx + 4], esi
mov dword [eax], esi
jmp 0x46685d
and dword [edi + 0x8b], 0xffffffdf
test byte [edi + 0x8b], 8
jne 0x466882
lea eax, [edi + 0x2c]
cmp dword [eax], eax
jne 0x466882
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
push 4
push ecx
push edx
call fcn.00464450
add esp, 0xc
mov esi, dword [ebp - 0x10]
mov eax, dword [esi + 0x10]
shr eax, 5
test al, 1
je 0x466930
call dword [sym.imp.KERNEL32.dll_GetTickCount]
lea ebx, [edi + 0x38]
mov dword [edi + 0x44], eax
cmp dword [ebx], ebx
je 0x46690b
mov esi, dword [ebx]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ecx], eax
push 0x4ce234
mov dword [eax + 4], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.00462380
push 0x4ce234
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x14], 0
jne 0x4668ff
mov eax, dword [edi + 0x40]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x4668e7
sub eax, ecx
mov dword [edi + 0x40], eax
jmp 0x4668ee
mov dword [edi + 0x40], 0
push 0
push esi
call fcn.00467c90
add esp, 8
cmp dword [ebx], ebx
jne 0x4668a3
jmp 0x46690b
mov eax, dword [ebx]
mov dword [esi], eax
mov dword [esi + 4], ebx
mov dword [eax + 4], esi
mov dword [ebx], esi
test byte [edi + 0x8b], 8
jne 0x46692d
cmp dword [ebx], ebx
jne 0x46692d
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
push 5
push ecx
push edx
call fcn.00464450
add esp, 0xc
mov esi, dword [ebp - 0x10]
mov eax, 0x40000
cmp dword [edi + 0x40], eax
ja 0x46695e
cmp dword [edi + 0x34], eax
ja 0x46695e
cmp dword [edi + 0x28], eax
ja 0x46695e
cmp dword [edi + 0x1c], eax
ja 0x46695e
mov eax, dword [edi + 0x8b]
shl eax, 0x1e
sar eax, 0x1f
push eax
call fcn.004624f0
add esp, 4
mov ecx, dword [esi + 0x10]
shr ecx, 1
test cl, 1
je 0x466b10
call fcn.00462160
jmp 0x466b10
push 0x4ce234
mov dword [ebp - 0x1c], vtable.nfapi::AutoLock.0
mov dword [ebp - 0x18], 0x4ce234
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov ecx, dword [0x4ce124]
push edx
push eax
push ecx
mov dword [ebp - 4], edi
call fcn.00467a40
add esp, 0xc
test eax, eax
je 0x466b10
mov edx, dword [esi + 0x10]
shr edx, 0xc
lea edi, [eax - 8]
test dl, 1
je 0x466a4a
mov ebx, dword [edi + 0x2c]
lea eax, [edi + 0x2c]
cmp ebx, eax
je 0x466a2a
push 0x4ce234
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebx + 8]
call fcn.00462380
push 0x4ce234
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x14], 0
jne 0x466a31
mov eax, dword [edi + 0x34]
mov ecx, dword [ebx + 0x14]
cmp eax, ecx
jb 0x466a05
sub eax, ecx
mov dword [edi + 0x34], eax
jmp 0x466a0c
mov dword [edi + 0x34], 0
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
push 0
mov dword [ecx], eax
push ebx
mov dword [eax + 4], ecx
call fcn.00467c90
add esp, 8
or dword [edi + 0xa8], 8
jmp 0x466a31
and dword [edi + 0xa8], 0xfffffff7
lea eax, [edi + 0x2c]
cmp dword [eax], eax
jne 0x466a4a
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push 0xc
push eax
push ecx
call fcn.00464450
add esp, 0xc
mov edx, dword [esi + 0x10]
shr edx, 0xd
test dl, 1
je 0x466ad3
lea ebx, [edi + 0x38]
cmp dword [ebx], ebx
je 0x466ac1
lea esp, [esp]
mov esi, dword [ebx]
push 0x4ce234
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [esi + 8]
call fcn.00462380
push 0x4ce234
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp - 0x14], 0
jne 0x466aba
mov eax, dword [edi + 0x40]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jb 0x466a9a
sub eax, ecx
mov dword [edi + 0x40], eax
jmp 0x466aa1
mov dword [edi + 0x40], 0
mov eax, dword [esi]
mov ecx, dword [esi + 4]
push 0
mov dword [ecx], eax
push esi
mov dword [eax + 4], ecx
call fcn.00467c90
add esp, 8
cmp dword [ebx], ebx
jne 0x466a60
mov esi, dword [ebp - 0x10]
cmp dword [ebx], ebx
jne 0x466ad3
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
push 0xd
push eax
push ecx
call fcn.00464450
add esp, 0xc
mov eax, 0x40000
cmp dword [edi + 0x40], eax
ja 0x466b01
cmp dword [edi + 0x34], eax
ja 0x466b01
cmp dword [edi + 0x28], eax
ja 0x466b01
cmp dword [edi + 0x1c], eax
ja 0x466b01
mov edx, dword [edi + 0xa8]
shl edx, 0x1e
sar edx, 0x1f
push edx
call fcn.00462600
add esp, 4
mov eax, dword [esi + 0x10]
shr eax, 9
test al, 1
je 0x466b10
call fcn.004622c0
push 0x4ce234
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret