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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f8d28
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x1013c014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x1388
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
nop
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x2c]
push 0xffffffffffffffff
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push 0
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor al, al
mov byte [ebp - 0xd], al
call ebx
mov dword [ebp - 0x18], eax
nop word [eax + eax]
cmp dword [esi + 0x1ac], 2
jne 0x10031b45
lea ebx, [esi + 8]
push ebx
mov dword [ebp - 0x28], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x20], 0
lea edi, [esi + 0x20]
mov dword [ebp - 0x24], edi
jne 0x100319e0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi], eax
jmp 0x100319e5
xor edi, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
cmp dword [esi + 0x17c], 0
je 0x10031a21
mov eax, dword [esi + 0x178]
mov edx, dword [eax]
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [edx + 8]
mov dword [ecx], eax
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
dec dword [esi + 0x17c]
jmp 0x10031a4e
cmp dword [esi + 0x184], 0
je 0x10031af2
mov eax, dword [esi + 0x180]
mov edx, dword [eax]
mov ecx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [edx + 8]
mov dword [ecx], eax
mov ecx, dword [edx]
mov eax, dword [edx + 4]
mov dword [ecx + 4], eax
dec dword [esi + 0x184]
push 0xc
push edx
mov dword [ebp - 0x14], ebx
call fcn.100d4917
mov ebx, dword [ebx + 0x44]
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test ebx, ebx
je 0x10031a82
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0x29], 0
je 0x10031a82
push 0
push 0
push ebx
push eax
mov ecx, esi
call fcn.1002d140
xor ebx, ebx
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x10031a93
mov dword [edi], 0
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebx, ebx
je 0x10031ab0
push 0
push 0
push ebx
push dword [ebp - 0x14]
mov ecx, esi
call fcn.1002d140
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov byte [ebp - 0xd], 1
call ebx
mov edi, eax
mov ecx, edi
sub ecx, dword [ebp - 0x18]
cmp ecx, 0x64
jle 0x100319b0
mov ecx, dword [0x1014b620]
test ecx, ecx
je 0x10031ae6
push 0
push 0
push 0x40d
push ecx
call dword [sym.imp.USER32.dll_PostMessageW]
mov dword [ebp - 0x18], edi
mov byte [ebp - 0xd], 0
jmp 0x100319b0
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp dword [ebp - 0x14], 0
mov dword [ebp - 4], 0xffffffff
je 0x10031b0c
mov dword [edi], 0
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0xd], 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
je 0x10031980
mov eax, dword [0x1014b620]
test eax, eax
je 0x10031980
push 0
push 0
push 0x40d
push eax
call dword [sym.imp.USER32.dll_PostMessageW]
jmp 0x10031978
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret