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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
push esi
push edi
push 0xffffffffffffffff
lea eax, [esp + 0x14]
lea esi, [ebx + 0x48]
push eax
mov dword [esp + 0x18], 0
call fcn.00409980
cmp eax, 0xffffffff
je 0x420999
jmp 0x420740
mov edi, dword [esp + 0x10]
test edi, edi
je case.0x420763.0
mov edx, dword [edi]
mov eax, dword [edx + 0x1c]
mov ecx, edi
mov byte [esp + 0xf], 0
call eax
cmp eax, 4
ja case.0x420763.3
jmp dword [eax*4 + 0x4209b4]
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
cmp eax, 0xa
jne case.0x420763.0
push 0
push 1
lea esi, [ebx + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov ecx, edi
call eax
movzx ecx, al
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 1
push 0
push esi
mov dword [ebx + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
cmp dword [esp + 0x14], 1
je 0x4209ab
jmp case.0x420763.0
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
cmp eax, 8
jne case.0x420763.0
jmp case.0x4207f9.1
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
dec eax
cmp eax, 0x11
ja case.0x420763.0
movzx ecx, byte [eax + 0x4209e8]
jmp dword [ecx*4 + 0x4209c8]
lea ecx, [ebx + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov ecx, edi
call eax
jmp 0x420978
push 0
push 0
lea esi, [ebx + 0x38]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x420968
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00420a00
test al, al
je 0x420968
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 8]
push edi
call eax
cmp byte [esp + 0xf], 0
je 0x420978
push 1
push 2
call fcn.00425700
mov ecx, eax
call fcn.00426050
jmp 0x420978
push 0
push 0
lea esi, [ebx + 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x420968
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00420a00
test al, al
je 0x420968
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 8]
push edi
call eax
cmp byte [esp + 0xf], 0
je 0x420978
push 1
push 0
call fcn.00425700
mov ecx, eax
call fcn.00426050
jmp 0x420978
push 0
push 0
lea esi, [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x420968
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00420a00
test al, al
je 0x420968
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 8]
push edi
call eax
cmp byte [esp + 0xf], 0
je 0x420978
push 1
push 1
call fcn.00425700
mov ecx, eax
call fcn.00426050
jmp 0x420978
lea esi, [ebx + 0x30]
jmp 0x42093d
lea esi, [ebx + 0x40]
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x420968
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 8]
push edi
call eax
jmp 0x420978
push edi
mov eax, ebx
call fcn.004206a0
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebx + 0x1c], eax
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
push ecx
lea esi, [ebx + 0x48]
call fcn.00409980
cmp eax, 0xffffffff
jne 0x420740
mov al, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
mov eax, dword [edx]
push 1
mov ecx, edi
call eax
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret