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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x454fa9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xdc
push esi
mov dword [ebp - 0x10], ecx
push str.GCS_LOCK::Lock
lea ecx, [ebp - 0x84]
call fcn.004117cd
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
je 0x420272
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.00411939
jmp 0x420613
mov eax, dword [ebp - 0x10]
and dword [eax + 0xc], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x10]
cmp dword [eax + 4], 0
jne 0x42029f
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.00411939
jmp 0x420613
mov eax, dword [ebp - 0x10]
mov esi, dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 0x14], eax
jne 0x4202bc
mov eax, dword [ebp - 0x10]
and dword [eax + 8], 0
jmp 0x4205f8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0xc], 0
jle 0x420430
cmp dword [ebp + 0xc], 0
jle 0x42042e
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_TryEnterCriticalSection]
test eax, eax
je 0x4202fe
jmp 0x42042e
mov eax, dword [ebp + 0xc]
sub eax, 0xa
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jg 0x42041f
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x420404
mov eax, dword [ebp - 0x10]
add eax, 0x14
push eax
lea eax, [ebp - 0x8d]
push eax
push str.._Context:
lea eax, [ebp - 0xe7]
push eax
push 0
push 0
push dword [ebp - 0x14]
lea eax, [ebp - 0xa8]
push eax
call fcn.00407857
add esp, 0x10
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 1
push dword [ebp - 0x48]
push str.EnterCriticalSection_took_to_long._The_owning_thread_id_was
lea eax, [ebp - 0xde]
push eax
call fcn.00406b1f
add esp, 0xc
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x4c], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x4c]
call fcn.00406c9e
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x54], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x54]
call fcn.00406b8d
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x5c]
call fcn.00406b07
push eax
push str.GCS_LOCK
push 0x166
push str.D:projectsutil_srcglock.cpp
call fcn.00405307
add esp, 0x10
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x8d]
call fcn.004066e8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xe7]
call fcn.004066e8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xde]
call fcn.004066e8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xa8]
call fcn.004066e8
mov eax, dword [ebp - 0x10]
and dword [eax + 4], 0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.00411939
jmp 0x420613
push 0
push 0xa
call dword [sym.imp.KERNEL32.dll_SleepEx]
jmp 0x4202db
jmp 0x420440
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp - 0x10]
mov dword [eax + 8], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
cmp dword [eax + 0x20], 0
je 0x4205f8
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0xc]
cmp ecx, dword [eax + 0x20]
jbe 0x4205f8
mov eax, dword [ebp - 0x10]
add eax, 0x14
push eax
lea eax, [ebp - 0xcc]
push eax
push str.._Context:
lea eax, [ebp - 0xba]
push eax
push 0
push 0
push dword [ebp - 0x14]
lea eax, [ebp - 0xd5]
push eax
call fcn.00407857
add esp, 0x10
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 5
push dword [ebp - 0x44]
lea eax, [ebp - 0x96]
push eax
push str._ms__the_owning_thread_id_was
lea eax, [ebp - 0x9f]
push eax
push 0
push 0
mov eax, dword [ebp - 0x10]
push dword [eax + 0xc]
lea eax, [ebp - 0xc3]
push eax
call fcn.00407857
add esp, 0x10
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x64], eax
mov byte [ebp - 4], 6
push dword [ebp - 0x64]
push str.EnterCriticalSection_took
lea eax, [ebp - 0xb1]
push eax
call fcn.00406b1f
add esp, 0xc
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x60]
call fcn.00406c9e
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x18]
call fcn.00406b8d
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x20]
call fcn.00406c9e
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x30]
call fcn.00406b8d
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x40]
call fcn.00406b07
push eax
push str.GCS_LOCK
push 0x174
push str.D:projectsutil_srcglock.cpp
call fcn.00405307
add esp, 0x10
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xcc]
call fcn.004066e8
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xba]
call fcn.004066e8
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x96]
call fcn.004066e8
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x9f]
call fcn.004066e8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0xb1]
call fcn.004066e8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xc3]
call fcn.004066e8
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xd5]
call fcn.004066e8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x10]
mov dword [ecx + 0x10], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x84]
call fcn.00411939
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret 0xc