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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579d00
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x640040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], 0
wait
xor esi, esi
mov dword [ebp - 0x1c], esi
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x18], eax
mov ecx, dword [edi + 0x18]
test ecx, ecx
jle 0x4f6c8d
cmp dword [edi + 0x24], eax
jne 0x4f6c8d
lea eax, [ecx + 1]
mov dword [edi + 0x18], eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
wait
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor cl, cl
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x11], cl
cmp ebx, dword [edi + 0x34]
jge 0x4f6caf
push ebx
lea ecx, [edi + 0x2c]
call fcn.0047d510
cmp eax, dword [ebp - 0x18]
jne 0x4f6d0a
mov cl, 1
inc ebx
jmp 0x4f6c91
test cl, cl
je 0x4f6d0d
inc dword [edi + 0x18]
mov ecx, dword [edi + 0x24]
mov eax, dword [ebp - 0x18]
test ecx, ecx
je 0x4f6ce9
cmp ecx, eax
je 0x4f6ce9
push 0x14d
push str.c:DevjenkinsworkspaceiTools_for_IDMDeployer_V9.87_servermodbusCSLock.cpp
push 0x587798
mov eax, dword [0x641a88]
add eax, 0x32c
push eax
call fcn.004ec040
add esp, 0x10
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x24], eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
wait
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov cl, byte [ebp - 0x11]
mov eax, dword [edi + 0x1c]
inc eax
mov dword [edi + 0x1c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp byte [ebp + 8], 0
je 0x4f6d32
cmp dword [edi + 0x18], 0
jg 0x4f6d54
mov eax, dword [edi + 0x20]
test cl, cl
je 0x4f6d50
cmp eax, 1
jg 0x4f6d54
mov edx, dword [edi + 0x18]
test edx, edx
jg 0x4f6ed5
mov eax, dword [edi + 0x20]
test cl, cl
je 0x4f6e74
cmp eax, 1
jmp 0x4f6e76
test eax, eax
jle 0x4f6d32
call ebx
test esi, esi
jne 0x4f6d61
mov esi, eax
jmp 0x4f6e53
mov dword [ebp + 8], eax
mov ecx, eax
sub ecx, esi
cmp ecx, 0xea60
jbe 0x4f6e4c
xor ebx, ebx
mov dword [ebp - 0x24], ebx
cmp ebx, dword [edi + 0x34]
jge 0x4f6df3
lea ecx, [edi + 0x40]
push ebx
call fcn.0047d510
mov edx, dword [ebp + 8]
sub edx, eax
cmp edx, 0x1d4c0
jbe 0x4f6df0
push ebx
lea ecx, [edi + 0x2c]
call fcn.0047d510
mov esi, eax
push ebx
lea ecx, [edi + 0x40]
call fcn.0047d510
mov ecx, dword [ebp + 8]
sub ecx, eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x606660]
cvtpd2ps xmm0, xmm0
divss xmm0, dword [0x606614]
cvttss2si eax, xmm0
push eax
push esi
push str.LockAccess:_Offending_thread_id_0x_X_has_been_waiting__d_seconds
push 0x3ec
mov eax, dword [0x641a88]
add eax, 0x32c
push eax
call fcn.004ec2c0
add esp, 0x14
inc ebx
jmp 0x4f6d76
mov eax, dword [edi + 0x1c]
dec eax
mov dword [edi + 0x1c], eax
cmp eax, 0xffffffff
jg 0x4f6e21
push 0x176
push str.c:DevjenkinsworkspaceiTools_for_IDMDeployer_V9.87_servermodbusCSLock.cpp
mov eax, dword [0x641a88]
push 0x587798
add eax, 0x32c
push eax
call fcn.004ec040
add esp, 0x10
cmp dword [edi + 0x1c], 0
jge 0x4f6e2e
mov dword [edi + 0x1c], 0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor al, al
wait
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
cmp eax, esi
cmovb esi, ecx
mov dword [ebp - 0x1c], esi
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [ebp - 0x11]
jmp 0x4f6d20
test eax, eax
jg 0x4f6ed5
lea eax, [edx + 1]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x1c]
dec eax
mov dword [edi + 0x1c], eax
cmp eax, 0xffffffff
jg 0x4f6eac
push 0x1a4
push str.c:DevjenkinsworkspaceiTools_for_IDMDeployer_V9.87_servermodbusCSLock.cpp
push 0x587798
mov eax, dword [0x641a88]
add eax, 0x32c
push eax
call fcn.004ec040
add esp, 0x10
cmp dword [edi + 0x1c], 0
jge 0x4f6eb9
mov dword [edi + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi + 0x24], eax
call ebx
mov dword [edi + 0x28], eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
jmp 0x4f6e37
mov eax, dword [edi + 0x1c]
dec eax
mov dword [edi + 0x1c], eax
cmp eax, 0xffffffff
jg 0x4f6e21
push 0x190
jmp 0x4f6e04