Function at 0x421790
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.00409d00
cmp eax, 0xffffffff
je 0x421a40
jmp 0x4217c0
mov edi, dword [esp + 0x10]
test edi, edi
je case.0x4217e3.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.0x4217e3.3
jmp dword [eax*4 + 0x421a5c]
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
cmp eax, 0xa
jne case.0x4217e3.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 0x421a52
jmp case.0x4217e3.0
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
cmp eax, 8
jne case.0x4217e3.0
jmp case.0x421879.1
mov edx, dword [edi]
mov eax, dword [edx + 0x20]
mov ecx, edi
call eax
dec eax
cmp eax, 0x16
ja case.0x4217e3.0
movzx ecx, byte [eax + 0x421a94]
jmp dword [ecx*4 + 0x421a70]
mov edx, dword [edi]
mov eax, dword [edx + 0x24]
mov ecx, edi
call eax
test eax, eax
je case.0x4217e3.0
cmp dword [eax + 0x30], 0x15
jne case.0x4217e3.0
push 0x15
call fcn.00421c40
jmp case.0x4217e3.0
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 0x421a1f
push 0
push 0
lea esi, [ebx + 0x38]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x421a0f
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00421ab0
test al, al
je 0x421a0f
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 0x421a1f
push 1
push 2
call fcn.00427e00
mov ecx, eax
call fcn.00428730
jmp 0x421a1f
push 0
push 0
lea esi, [ebx + 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x421a0f
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00421ab0
test al, al
je 0x421a0f
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 0x421a1f
push 1
push 0
call fcn.00427e00
mov ecx, eax
call fcn.00428730
jmp 0x421a1f
push 0
push 0
lea esi, [ebx + 0x44]
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x421a0f
lea ecx, [esp + 0xf]
push ecx
mov eax, edi
call fcn.00421ab0
test al, al
je 0x421a0f
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 0x421a1f
push 1
push 1
call fcn.00427e00
mov ecx, eax
call fcn.00428730
jmp 0x421a1f
lea esi, [ebx + 0x30]
jmp 0x4219e4
lea esi, [ebx + 0x40]
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
jne 0x421a0f
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 0x421a1f
push edi
mov eax, ebx
call fcn.00421720
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.00409d00
cmp eax, 0xffffffff
jne 0x4217c0
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