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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xc8
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov r12d, r9d
mov edi, r8d
mov r15, rdx
cmp r8d, 1
jbe 0x41f3c4
mov esi, r8d
shr esi, 1
jmp 0x41f3c9
mov esi, 1
xor r14d, r14d
cmp r8d, 1
seta r14b
inc r14d
cmp r9d, 0x40000
jb 0x41fbc5
cmp r8d, 1
jb 0x41fbc5
cmp esi, 0x10000
ja 0x41fbc5
mov edx, esi
lea rcx, [rsp + 0x60]
call fcn.0041f268
nop
xor r13d, r13d
mov rbx, qword [rsp + 0x60]
test esi, esi
je 0x41f5a3
lea rbp, [rbx + 0x10]
xor eax, eax
test r13d, r13d
cmove rax, qword [rsp + 0x130]
mov qword [rbp + 0xa0], rax
mov byte [rsp + 0x20], 1
mov r9, rbp
mov r8d, 0x30101
mov rdx, r15
mov rcx, qword [rsp + 0x110]
call fcn.00411d10
mov r12d, eax
test eax, eax
jne 0x41f4df
cmp qword [rbp], 0
je 0x41f50d
test r14d, r14d
je 0x41f4bf
lea r15, [rbp + 0x78]
lea r9, [rbp + r12*8 + 0x78]
mov byte [rsp + 0x20], 0
mov r8d, 0x30101
mov rdx, qword [rsp + 0x118]
mov rcx, qword [rsp + 0x110]
call fcn.00411d10
mov dword [rsp + 0x120], eax
test eax, eax
jne 0x41f53d
cmp qword [r15], 0
je 0x41f573
inc r12d
add r15, 8
cmp r12d, r14d
jb 0x41f46d
mov r15, qword [rsp + 0x118]
inc r13d
add rbp, 0xf8
cmp r13d, esi
jb 0x41f41b
mov r12d, dword [rsp + 0x128]
jmp 0x41f5a3
test rbx, rbx
je 0x41f505
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, r12d
jmp 0x41fbca
test rbx, rbx
je 0x41f533
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, 0x80004001
jmp 0x41fbca
test rbx, rbx
je 0x41fbca
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, dword [rsp + 0x120]
jmp 0x41fbca
test rbx, rbx
je 0x41f599
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, 0x80004001
jmp 0x41fbca
mov dword [rsp + 0x68], 0x159a55e5
mov dword [rsp + 0x6c], 0x1f123bb5
xor ebp, ebp
test esi, esi
je 0x41f61a
mov ecx, ebp
imul rcx, rcx, 0xf8
add rcx, rbx
lea r9, [rsp + 0x68]
mov r8d, edi
mov edx, r12d
call fcn.0041ed50
mov r12d, eax
test eax, eax
jne 0x41f5ec
inc ebp
cmp ebp, esi
mov r12d, dword [rsp + 0x128]
jb 0x41f5b9
jmp 0x41f61a
test rbx, rbx
je 0x41f612
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, r12d
jmp 0x41fbca
lea rcx, [rsp + 0x30]
call fcn.0042d830
nop
xor ebp, ebp
mov dword [rsp + 0x58], ebp
mov byte [rsp + 0x5c], 1
xor r13d, r13d
test esi, esi
je 0x41f7c8
mov rbp, rbx
lea r12, [rbp + 0x28]
mov r15d, 2
mov ecx, 0x60
call fcn.0040bcb8
mov rdi, rax
xor ecx, ecx
cmp rax, rcx
je 0x41f672
mov dword [rax + 8], ecx
lea rax, [0x004331f8]
mov qword [rdi], rax
mov dword [rdi + 0x48], ecx
mov qword [rdi + 0x58], rcx
jmp 0x41f675
mov rdi, rcx
mov qword [r12 - 0x10], rdi
cmp rdi, rcx
je 0x41f688
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + VariantCopy]
mov rcx, qword [r12]
test rcx, rcx
je 0x41f697
mov rax, qword [rcx]
call qword [rax + 0x10]
mov qword [r12], rdi
mov rax, qword [r12 - 0x10]
lea rcx, [rsp + 0x30]
mov qword [rax + 0x10], rcx
add r12, 8
dec r15
jne 0x41f648
test r13d, r13d
jne 0x41f6f8
mov rax, qword [rbp + 0x18]
mov rcx, qword [rsp + 0x130]
mov qword [rax + 0x58], rcx
mov rax, qword [rbp + 0x18]
mov dword [rax + 0x48], esi
mov rdi, qword [rbp + 0x18]
mov qword [rdi + 0x20], 0x3e8
mov qword [rdi + 0x30], 0x989680
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r11d, eax
mov qword [rdi + 0x18], r11
call fcn.0041e014
mov qword [rdi + 0x28], rax
cmp esi, 1
jbe 0x41f72a
mov eax, r13d
imul eax, eax, 0x150
and eax, 0x7ff
mov qword [rbp + 0x40], rax
mov r8, rbp
lea rdx, [0x0041f2f0]
mov rcx, rbp
call fcn.0042d7a0
mov r12d, eax
test eax, eax
jne 0x41f754
jmp 0x41f739
mov rcx, rbp
call fcn.0041f160
mov r12d, eax
test eax, eax
jne 0x41f78e
inc r13d
mov r12d, 0xf8
add rbp, r12
cmp r13d, esi
jb 0x41f63e
mov ebp, dword [rsp + 0x58]
jmp 0x41f7ce
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
test rbx, rbx
je 0x41f786
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, r12d
jmp 0x41fbca
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
test rbx, rbx
je 0x41f7c0
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, r12d
jmp 0x41fbca
mov r12d, 0xf8
cmp esi, 1
jbe 0x41f7f0
test esi, esi
je 0x41f7f0
mov rdi, rbx
mov ebp, esi
mov rcx, qword [rdi]
call fcn.0042d790
add rdi, r12
dec rbp
jne 0x41f7dc
mov ebp, dword [rsp + 0x58]
test ebp, ebp
je 0x41f82b
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
test rbx, rbx
je 0x41f824
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov rdx, r12
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, ebp
jmp 0x41fbca
mov dword [rsp + 0xa8], 0
mov rcx, qword [rbx + 0x18]
add rcx, 0x18
lea rdx, [rsp + 0x78]
call fcn.0041e07c
xor r11d, r11d
mov qword [rsp + 0x98], r11
xor edx, edx
mov qword [rsp + 0xa0], rdx
mov dword [rsp + 0xa8], 1
test esi, esi
je 0x41f899
lea rcx, [rbx + 0xc0]
mov r8d, esi
mov eax, dword [rcx - 4]
add r11, rax
mov qword [rsp + 0x98], r11
mov eax, dword [rcx]
add rdx, rax
mov qword [rsp + 0xa0], rdx
add rcx, r12
dec r8
jne 0x41f876
mov r15, qword [rsp + 0x130]
mov rax, qword [r15]
mov r8b, 1
lea rdx, [rsp + 0x78]
mov rcx, r15
call qword [rax]
mov ebp, eax
test eax, eax
je 0x41f8c8
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
jmp 0x41fb6f
xor ebp, ebp
mov dword [rsp + 0x58], ebp
mov byte [rsp + 0x5c], bpl
mov r13d, r14d
imul r13d, esi
xor r12d, r12d
test esi, esi
je 0x41fa2f
lea rbp, [rbx + 0x18]
lea r9, [rbp - 0x18]
xor edx, edx
mov eax, 0x4000000
div dword [rbp + 0xa4]
add eax, 2
mov dword [rbp + 0x20], eax
test r12d, r12d
jne 0x41f943
mov rax, qword [rbp]
mov qword [rax + 0x58], r15
mov rax, qword [rbp]
mov dword [rax + 0x48], r13d
mov rdi, qword [rbp]
mov qword [rdi + 0x20], 0x3e8
mov qword [rdi + 0x30], 0x989680
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r11d, eax
mov qword [rdi + 0x18], r11
call fcn.0041e014
mov qword [rdi + 0x28], rax
lea r9, [rbp - 0x18]
cmp r13d, 1
jbe 0x41f9df
xor edi, edi
test r14d, r14d
je 0x41f9ef
mov eax, r12d
imul eax, r14d
mov dword [rsp + 0x128], eax
lea rcx, [rbp + 0x40]
mov qword [rsp + 0x70], rcx
test r12d, r12d
jne 0x41f97c
test edi, edi
jne 0x41f97c
mov dl, 1
jmp 0x41f97e
xor dl, dl
mov dword [rcx - 8], edi
lea r8, [rcx - 0x10]
mov qword [r8], r9
add eax, edi
imul eax, eax, 0x150
and eax, 0x7ff
mov qword [rcx], rax
mov byte [rcx + 8], dl
movsxd rax, edi
lea rcx, [r9 + rax*8]
lea rdx, [0x0041ed08]
call fcn.0042d7a0
mov r15d, eax
test eax, eax
jne 0x41fa08
inc edi
mov rcx, qword [rsp + 0x70]
add rcx, 0x20
mov qword [rsp + 0x70], rcx
cmp edi, r14d
mov eax, dword [rsp + 0x128]
lea r9, [rbp - 0x18]
jb 0x41f96f
mov r15, qword [rsp + 0x130]
jmp 0x41f9ef
xor edx, edx
mov rcx, r9
call fcn.0041e598
mov edi, eax
test eax, eax
jne 0x41fa1c
inc r12d
add rbp, 0xf8
cmp r12d, esi
jb 0x41f8e9
mov ebp, dword [rsp + 0x58]
jmp 0x41fa2f
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
mov ebp, r15d
jmp 0x41fb6f
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
mov ebp, edi
jmp 0x41fb6f
xor edi, edi
cmp r13d, 1
jbe 0x41faa0
test esi, esi
je 0x41faa0
mov rbp, rbx
mov r15d, esi
test r14d, r14d
je 0x41fa74
xor r12d, r12d
mov r13d, 0x98
mov ebx, r14d
mov rcx, qword [r12 + rbp]
call fcn.0042d790
cmp dword [r13 + rbp], 0
cmovne edi, dword [r13 + rbp]
add r13, 4
add r12, 8
dec rbx
jne 0x41fa52
add rbp, 0xf8
dec r15
jne 0x41fa41
test edi, edi
mov rbx, qword [rsp + 0x60]
je 0x41fa9c
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
mov ebp, edi
jmp 0x41fb6f
mov ebp, dword [rsp + 0x58]
test ebp, ebp
je 0x41fab5
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
jmp 0x41fb6f
mov rcx, qword [rbx + 0x18]
add rcx, 0x18
lea rdx, [rsp + 0x78]
call fcn.0041e07c
xor r11d, r11d
mov qword [rsp + 0x98], r11
xor edx, edx
mov qword [rsp + 0xa0], rdx
mov eax, dword [rbx + 0x38]
imul eax, r14d
mov dword [rsp + 0xa8], eax
test esi, esi
je 0x41fb1f
lea rcx, [rbx + 0xc0]
mov r8d, esi
mov eax, dword [rcx - 4]
add r11, rax
mov qword [rsp + 0x98], r11
mov eax, dword [rcx]
add rdx, rax
mov qword [rsp + 0xa0], rdx
add rcx, 0xf8
dec r8
jne 0x41faf8
mov rdi, qword [rsp + 0x130]
mov rax, qword [rdi]
xor r8d, r8d
lea rdx, [rsp + 0x78]
mov rcx, rdi
call qword [rax + VariantCopy]
mov ebp, eax
test eax, eax
je 0x41fb4c
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
jmp 0x41fb6f
mov rax, qword [rdi]
mov r8b, 1
lea rdx, [rsp + 0x78]
mov rcx, rdi
call qword [rax + VariantCopy]
mov ebp, eax
test eax, eax
je 0x41fb94
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
mov eax, ebp
jmp 0x41fbca
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
lea r9, [0x0041e890]
mov r8d, dword [rbx - 8]
mov edx, 0xf8
mov rcx, rbx
call fcn.0042de00
lea rcx, [rbx - 8]
call sub.msvcrt.dll_free
xor eax, eax
jmp 0x41fbca
mov eax, 0x80070057
add rsp, 0xc8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret