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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, ecx
cmp dword [esi + 0xc], 0xffffffff
jne 0x42f38e
cmp dword [esi + 0x10], 0
jne 0x42f38e
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
cmp eax, dword [esi + 0x1c]
ja 0x42f3ad
jb 0x42f3a5
cmp ebx, dword [esi + 0x18]
ja 0x42f3ad
test edi, edi
je 0x42f6b5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [0x4b4b2c]
cmp eax, 0x1388
jbe 0x42f3d0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x4b4b2c], eax
call fcn.0042f880
lea eax, [esi + 0xe0]
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [ebp + 0x14], 0
je 0x42f423
cmp byte [esi + 5], 0
jne 0x42f423
xor ecx, ecx
mov eax, edi
add eax, ebx
adc ecx, dword [ebp + 0xc]
cmp ecx, dword [esi + 0x1c]
jb 0x42f464
ja 0x42f401
cmp eax, dword [esi + 0x18]
jbe 0x42f464
push ecx
push eax
mov ecx, esi
call fcn.0042f970
test al, al
jne 0x42f464
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 0x1c]
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi + 0x18]
cmp ecx, eax
jb 0x42f44f
ja 0x42f436
cmp ebx, edx
jb 0x42f44f
xor eax, eax
mov dword [ebp + 0x14], edi
add dword [ebp + 0x14], ebx
adc eax, ecx
cmp eax, dword [esi + 0x1c]
jb 0x42f44c
ja 0x42f40e
cmp dword [ebp + 0x14], edx
ja 0x42f40e
mov eax, dword [esi + 0x1c]
sub edx, ebx
sbb eax, ecx
xor ecx, ecx
cmp ecx, eax
jb 0x42f464
ja 0x42f45f
cmp edi, edx
jbe 0x42f464
mov edi, dword [esi + 0x18]
sub edi, ebx
mov ecx, dword [esi + 8]
mov edx, dword [ebp + 0xc]
lea eax, [ecx - 1]
and eax, ebx
sub ebx, eax
mov dword [ebp - 0x20], ebx
sbb edx, 0
dec eax
add eax, ecx
mov dword [ebp + 0xc], edx
add eax, edi
neg ecx
and eax, ecx
cmp byte [esi + 5], 0
mov dword [ebp + 0x10], eax
je 0x42f4ad
mov ecx, dword [ebp + 0xc]
mov edx, eax
xor eax, eax
add edx, ebx
adc eax, ecx
cmp eax, dword [esi + 0x1c]
jb 0x42f4af
ja 0x42f4a3
cmp edx, dword [esi + 0x18]
jbe 0x42f4af
mov eax, dword [esi + 0x18]
sub eax, ebx
mov dword [ebp + 0x10], eax
jmp 0x42f4af
mov ecx, edx
mov dword [ebp - 0x10], 0xffffffd8
lea edx, [esi + 0x28]
xor edi, edi
mov dword [ebp - 4], 0xffffffff
sub dword [ebp - 0x10], esi
mov byte [ebp + 0x17], 0
mov dword [ebp - 0x14], 0xffffffe0
cmp ecx, dword [edx + 4]
jb 0x42f504
ja 0x42f4db
cmp ebx, dword [edx]
jb 0x42f504
mov eax, dword [edx + 8]
xor ecx, ecx
add eax, dword [edx]
mov dword [ebp - 0x18], eax
adc ecx, dword [edx + 4]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc], eax
xor eax, eax
add dword [ebp - 0xc], ebx
adc eax, dword [ebp + 0xc]
cmp eax, ecx
jb 0x42f55c
ja 0x42f504
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x18]
jbe 0x42f55c
cmp dword [edx + 0xc], 0
jne 0x42f548
cmp dword [ebp - 4], 0xffffffff
je 0x42f539
cmp dword [edx - 4], 0
jne 0x42f520
mov eax, dword [ebp - 0x14]
cmp dword [eax + esi + 0x24], 0
jne 0x42f539
mov ebx, dword [ebp - 0x14]
mov ecx, dword [esi + 0xfc]
mov eax, ecx
sub ecx, dword [edx + 0x10]
sub eax, dword [ebx + esi + 0x38]
mov ebx, dword [ebp - 0x20]
cmp ecx, eax
jbe 0x42f548
mov ecx, dword [ebp - 0x10]
mov eax, edi
add ecx, edx
mov dword [ebp - 4], eax
mov dword [ebp - 0x14], ecx
jmp 0x42f54b
mov eax, dword [ebp - 4]
inc edi
add edx, 0x20
cmp edi, 6
jae 0x42f562
mov ecx, dword [ebp + 0xc]
jmp 0x42f4d0
mov eax, edi
mov byte [ebp + 0x17], 1
test eax, eax
js 0x42f6c0
lea edi, [eax + 1]
shl edi, 5
add edi, esi
lea eax, [edi + 0x14]
push eax
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp byte [ebp + 0x17], 0
je 0x42f59f
inc dword [esi + 0xfc]
mov eax, dword [esi + 0xfc]
mov dword [edi + 0x18], eax
mov eax, edi
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi + 4]
test eax, eax
je 0x42f5ad
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], edx
inc dword [esi + 0xfc]
mov eax, dword [esi + 0xfc]
mov dword [edi + 0x18], eax
xor eax, eax
cmp byte [esi + 4], al
push edx
setne al
mov byte [ebp + 0x17], 1
push ebx
push ecx
mov dword [ebp - 0x18], 0
lea eax, [eax*2 + 2]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 4], eax
test eax, eax
jne 0x42f636
lea esp, [esp]
cmp byte [ebp + 0x17], 0
je 0x42f636
mov byte [ebp + 0x17], 0
call fcn.0042f880
push dword [ebp + 0x10]
xor eax, eax
cmp byte [esi + 4], al
push ebx
push dword [ebp + 0xc]
setne al
lea eax, [eax*2 + 2]
push eax
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 4], eax
test eax, eax
je 0x42f600
mov ecx, dword [edi + 4]
test ecx, ecx
jne 0x42f656
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp + 0x10]
jmp 0x42f6cb
cmp dword [esi], 0
je 0x42f594
xor eax, eax
cmp byte [esi + 4], al
sete al
lea eax, [eax*2 + 2]
push eax
push 0x1000
push dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [edi + 4]
cmp eax, ecx
je 0x42f594
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [edi + 0x14]
mov dword [edi + 4], 0
push eax
mov dword [edi + 0x10], 0
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea eax, [esi + 0xe0]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call fcn.0046fdff
call eax
add esp, 4
mov dword [ebp + 0x14], 8
lea eax, [ebp + 0x14]
push 0x4a8a94
push eax
call fcn.0046dfcd
int3