Function at 0x404c50
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub esp, 0x3c
cmp byte [0x4157d4], 0
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x14], ecx
je 0x404f9c
cmp dword [0x4156dc], 0
je 0x404f9c
mov eax, dword fs:[0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov dword [esp + 0x30], 0x412590
mov ecx, dword [eax]
mov eax, dword [0x509ebc]
mov dword [esp + 0x34], str.
mov dword [esp + 0x38], 0x4125b0
mov dword [esp + 0x3c], 0x4125c0
mov dword [esp + 0x40], 0x4125d0
cmp eax, dword [ecx + 4]
jle 0x404d7d
push 0x509ebc
call fcn.0040fcde
add esp, 4
cmp dword [0x509ebc], 0xffffffff
jne 0x404d7d
mov eax, dword [0x4156a0]
or eax, dword [0x4156a4]
jne 0x404cf0
push 0x4156a0
call esi
lea eax, [esp + 0x18]
push eax
call edi
mov ecx, dword [0x4156a0]
mov edx, dword [0x4156a4]
cmp ecx, 0x989680
jne 0x404d19
test edx, edx
jne 0x404d19
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x404d4c
call fcn.00410b80
movsd xmm1, qword [0x412c80]
divsd xmm1, xmm0
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
movsd qword [esp + 0x20], xmm1
call fcn.00410b80
mulsd xmm0, qword [esp + 0x20]
call fcn.004109c0
mov ebx, eax
mov ebp, edx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdq
mov ecx, 0x3e8
idiv ecx
push 0x509ebc
lea eax, [edx - 0x1f4]
cdq
add eax, ebx
mov dword [0x509ec0], eax
adc edx, ebp
mov dword [0x509ec4], edx
call fcn.0040fc94
add esp, 4
mov eax, dword [0x4156a0]
or eax, dword [0x4156a4]
jne 0x404d91
push 0x4156a0
call esi
lea eax, [esp + 0x18]
push eax
call edi
mov ecx, dword [0x4156a0]
mov edx, dword [0x4156a4]
cmp ecx, 0x989680
jne 0x404dba
test edx, edx
jne 0x404dba
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
jmp 0x404ded
call fcn.00410b80
movsd xmm1, qword [0x412c80]
divsd xmm1, xmm0
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
movsd qword [esp + 0x20], xmm1
call fcn.00410b80
mulsd xmm0, qword [esp + 0x20]
call fcn.004109c0
mov ebx, eax
mov ebp, edx
mov esi, ebx
mov ecx, ebp
sub esi, dword [0x509ec0]
sbb ecx, dword [0x509ec4]
mov dword [esp + 0x24], ecx
jne 0x404e0f
cmp esi, 0x3e8
jbe 0x404f9c
mov ecx, dword [0x415884]
mov eax, 0x66666667
inc ecx
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
sub ecx, eax
mov dword [0x415884], ecx
mov eax, dword [esp + ecx*4 + 0x30]
mov dword [esp + 0x18], eax
mov eax, dword [0x4158a8]
or eax, dword [0x4158ac]
je 0x404e57
mov eax, dword [0x4158d8]
or eax, dword [0x4158dc]
jne 0x404f14
lea eax, [esp + 0x30]
mov ecx, 0x404c20
push eax
call fcn.00404890
movups xmm0, xmmword [eax]
movups xmmword [esp + 0x20], xmm0
psrldq xmm0, 4
movd edi, xmm0
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ecx, dword [esp + 0x24]
add esp, 4
mov esi, eax
push edi
push ecx
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor ecx, ecx
test edi, edi
je 0x404eb8
nop dword [eax + eax]
cmp dword [ecx + esi], 0xdadadada
je 0x404eb0
inc ecx
cmp ecx, edi
jb 0x404ea0
jmp 0x404eb8
mov eax, dword [0x4156f0]
mov dword [ecx + esi], eax
push ecx
mov ecx, dword [esp + 0x18]
push 0x40
push 0
push edi
call fcn.00403830
push ecx
mov ecx, dword [esp + 0x18]
push 4
push 0
push 0x10
mov dword [0x4158a8], eax
mov dword [0x4158ac], edx
call fcn.00403830
push ecx
push edi
push dword [0x4158ac]
mov edi, dword [esp + 0x20]
push dword [0x4158a8]
mov dword [0x4158dc], edx
mov edx, esi
mov dword [0x4158d8], eax
mov ecx, dword [edi]
call fcn.0040c900
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
jmp 0x404f18
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
lea ecx, [esi + 1]
nop
mov al, byte [esi]
inc esi
test al, al
jne 0x404f20
sub esi, ecx
cmp esi, 0x10
jb 0x404f45
push 0xf3
push str.hack_setclantag
push str.ASSERTION_FAILED:__s____line:__d_
call fcn.00401870
add esp, 0xc
mov edx, dword [esp + 0x18]
push ecx
mov ecx, dword [edi]
push esi
push dword [0x4158dc]
push dword [0x4158d8]
call fcn.0040c900
sub esp, 0x10
push dword [0x4158d8]
push dword [0x4158a8]
push dword [edi]
push ecx
lea ecx, [esp + 0x38]
call fcn.0040c6b0
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetThreadId]
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call fcn.0040c850
mov dword [0x509ec0], ebx
mov dword [0x509ec4], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret