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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ec4a0
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x53b098]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
mov ecx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x38], ecx
movlpd qword [ebp - 0x64], xmm0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x4000
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x21], 0
call fcn.004c3e0d
mov dword [ebp - 0x20], 0
add esp, 4
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 4], 0
push 0x4000
push 0
push eax
call fcn.004c5c20
add esp, 0xc
mov dword [ebp - 0x30], 0
cmp dword [edi + 0x1c], 0
jb 0x412e69
ja 0x412c5f
cmp dword [edi + 0x18], 0
jbe 0x412e69
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], esi
nop dword [eax + eax]
cmp byte [ebx + 0x9c], 0
jne 0x412e2f
mov ecx, dword [ebp - 0x38]
xor eax, eax
cmp dword [ecx + 4], eax
jne 0x412c8f
or esi, 0xffffffff
jmp 0x412d19
lea esi, [ecx + 0x20]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x48], esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov byte [ebp - 4], 1
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x34]
push eax
push ecx
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + 4]
call fcn.0042c7c0
add esp, 8
test al, al
jne 0x412cdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
or esi, 0xffffffff
jmp 0x412d16
mov byte [ebp - 4], 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
adc dword [ebp - 0x2c], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x3c]
cmp eax, ecx
mov esi, dword [ebp - 0x1c]
cmovne ecx, eax
mov dword [ebp - 0x3c], ecx
mov eax, dword [ebp - 0x18]
cmp byte [ebx + 0x9c], 0
mov dword [ebx + 0xb0], eax
jne 0x412e2c
cmp esi, 0xffffffff
je 0x412e2c
test esi, esi
je 0x412d67
mov ecx, dword [ebp - 0x44]
lea edx, [ebp - 0x18]
push edx
push esi
push dword [ebp - 0x34]
mov eax, dword [ecx]
mov dword [ebp - 0x18], 0
mov eax, dword [eax]
call eax
test al, al
je 0x412e1c
cmp dword [ebp - 0x18], esi
jne 0x412e1c
mov ecx, dword [ebp - 0x30]
jmp 0x412d9b
cmp byte [edi + 0x28], 0
jne 0x412e2c
mov eax, dword [ebx + 0xc0]
test eax, eax
je 0x412d87
push 0x3e8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp byte [ebx + 0x9c], 0
jne 0x412e2c
mov ecx, dword [ebp - 0x30]
inc ecx
mov dword [ebp - 0x30], ecx
cmp ecx, 0xf
ja 0x412e2c
mov esi, dword [ebx + 0x98]
test esi, esi
je 0x412e01
mov ecx, dword [edi + 0x18]
mov eax, ecx
mov edx, dword [edi + 0x1c]
and eax, edx
cmp eax, 0xffffffff
mov dword [ebp - 0x18], edx
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x1c], eax
je 0x412dd9
mov edx, dword [edi + 0x24]
add ecx, eax
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x18]
adc edx, dword [edi + 0x24]
mov dword [ebp - 0x18], edx
jmp 0x412ddf
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x40], eax
mov edx, dword [ebp - 0x28]
xor eax, eax
add edx, dword [ebp - 0x1c]
mov esi, dword [esi]
adc eax, dword [ebp - 0x40]
push eax
push edx
push dword [ebp - 0x18]
mov eax, dword [esi + 8]
push ecx
mov ecx, dword [ebx + 0x98]
call eax
test al, al
je 0x412e63
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x28]
cmp eax, dword [edi + 0x1c]
ja 0x412e2f
jb 0x412c70
cmp esi, dword [edi + 0x18]
jae 0x412e2f
jmp 0x412c70
mov byte [ebp - 0x21], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebx + 0xb0], eax
mov esi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x20], 0
test eax, eax
je 0x412e46
push eax
call fcn.004c3c0d
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 0xb8], esi
mov dword [ebx + 0xbc], eax
cmp esi, dword [edi + 0x18]
jne 0x412e74
cmp eax, dword [edi + 0x1c]
jne 0x412e74
mov al, 1
jmp 0x412e76
mov byte [ebp - 0x21], 1
jmp 0x412e2c
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x64]
mov dword [ebp - 0x2c], eax
jmp 0x412e2f
xor al, al
cmp byte [ebp - 0x21], 0
je 0x412e86
xor al, al
cmp byte [ebx + 0x9c], al
jne 0x412e95
cmp byte [edi + 0x28], 0
mov ecx, 1
movzx eax, al
cmovne eax, ecx
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004c35a5
mov esp, ebp
pop ebp
ret 0xc