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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4698d2
push eax
mov eax, 0x666b0
mov dword fs:[0], esp
call fcn.0043e5d0
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x666c4], 1
call fcn.004603dc
mov eax, dword [ebp + 8]
push 0
push 0x8000
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x666d0], 2
call fcn.004604ee
test eax, eax
jne 0x40487d
push ecx
lea edx, [ebp + 8]
mov ecx, esp
mov dword [esp + 0x24], esp
push edx
push 0x4884ac
push ecx
call fcn.0045b8b3
mov eax, dword [0x48ede0]
mov ecx, dword [eax + 0xa48]
call fcn.0041d780
jmp 0x404d7f
lea ecx, [esp + 0x28]
call fcn.004607e8
lea ecx, [esp + 0x38]
mov dword [esp + 0x24], eax
call fcn.004603dc
mov ecx, dword [ebp + 0xc]
push 0
push 0x9001
push ecx
lea ecx, [esp + 0x44]
mov byte [esp + 0x666d0], 3
call fcn.004604ee
test eax, eax
jne 0x4048e3
lea ecx, [esp + 0x28]
call fcn.00460709
push ecx
mov ecx, esp
mov dword [esp + 0x24], esp
push 0x48849c
call fcn.0045b618
mov edx, dword [0x48ede0]
mov ecx, dword [edx + 0xa48]
call fcn.0041d780
jmp 0x404d6e
mov eax, dword [0x48ede0]
push 0
mov ecx, dword [eax + 0xa90]
lea esi, [eax + 0xa88]
push ecx
mov ecx, esi
call fcn.0040c740
lea edx, [esp + 0x38]
mov dword [eax + 8], edx
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x404910
mov dword [ecx], eax
jmp 0x404913
mov dword [esi + 4], eax
mov dword [esi + 8], eax
lea esi, [edi + 0x120]
mov edi, dword [ebp + 0x10]
push 0
lea eax, [esp + 0x10]
push edi
push eax
mov ecx, esi
call fcn.00459e66
lea ecx, [esp + 0x18]
push 1
push ecx
lea ecx, [esp + 0x14]
mov byte [esp + 0x666cc], 4
call fcn.0045944b
mov eax, dword [eax]
push 0x48847c
push eax
call fcn.0043e4c5
add esp, 8
lea ecx, [esp + 0x18]
test eax, eax
setne bl
call fcn.0045b5aa
test bl, bl
je 0x404a5c
mov edx, dword [0x48a8c4]
mov dword [esp + 0x1c], edx
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov byte [esp + 0x666c4], 5
fild qword [esp + 0x10]
fmul qword [0x470a88]
fst qword [esp + 0x10]
fcomp qword [0x470a80]
fnstsw ax
test ah, 0x41
jne 0x4049c0
fld qword [esp + 0x10]
fmul qword [0x470a88]
sub esp, 8
fstp qword [esp]
push str._.1fMB
jmp 0x4049cf
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
push str._.1fKB
lea ecx, [esp + 0x28]
push ecx
call fcn.0045986b
add esp, 0x10
lea edx, [esp + 0x1c]
lea eax, [esp + 0x48]
push edx
push 0x488468
push eax
call fcn.0045b8b3
push 0x488464
lea ecx, [esp + 0x50]
mov bl, 6
push eax
push ecx
mov byte [esp + 0x666d0], bl
call fcn.0045b83f
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x666c8], 7
call fcn.0045b9c2
lea ecx, [esp + 0x4c]
mov byte [esp + 0x666c4], bl
call fcn.0045b5aa
lea ecx, [esp + 0x48]
mov byte [esp + 0x666c4], 5
call fcn.0045b5aa
mov edx, dword [esp + 0xc]
mov ecx, esi
push edx
push 0
push edi
call fcn.004293e0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x666c4], 4
call fcn.0045b5aa
lea ecx, [esp + 0xc]
call fcn.0045b535
xor eax, eax
mov ecx, 0x19999
lea edi, [esp + 0x58]
push eax
rep stosd dword es:[edi], eax
push eax
mov eax, dword [0x48ede0]
push 0x402
xor esi, esi
mov ecx, dword [eax + 0x2a8]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push 0x48ee08
mov dword [esp + 0x1c], 1
call ebx
mov edx, dword [0x48ee08]
mov eax, dword [0x48ee0c]
mov dword [0x48ee00], edx
mov dword [0x48ee04], eax
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x58]
push 0x19999
push ecx
lea ecx, [esp + 0x30]
call dword [edx + 0x34]
mov edi, eax
test edi, edi
jbe 0x404ae2
lea eax, [esp + 0x58]
push edi
push eax
lea ecx, [esp + 0x40]
call fcn.00460645
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx + 0xa60]
test eax, eax
jne 0x404bdf
push 0x48ee08
add esi, edi
call ebx
mov eax, dword [0x48ee08]
mov edx, dword [0x48ee00]
mov ecx, dword [0x48ee0c]
mov dword [0x48edf8], eax
sub eax, edx
mov edx, dword [0x48ee04]
mov dword [0x48edfc], ecx
mov dword [0x48edf0], eax
sbb ecx, edx
mov dword [0x48edf4], ecx
js 0x404b87
jg 0x404b36
test eax, eax
jbe 0x404b87
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], 0
fild qword [esp + 0x50]
fild qword [0x48edf0]
fmul qword [0x48ede8]
fmul qword [0x470a90]
fdivp st(1)
fst qword [esp + 0x10]
fcomp qword [0x470a78]
fnstsw ax
test ah, 0x41
jne 0x404b87
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push edx
push eax
lea ecx, [esp + 0x14]
push str._.1fMB_s
push ecx
call fcn.0045986b
add esp, 0x10
mov edx, dword [ebp + 0x10]
lea eax, [esp + 0xc]
push edx
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.0045b31f
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [0x48ede0]
push esi
call fcn.00404dd0
mov ecx, dword [0x48ede0]
mov eax, dword [ecx + 0xa84]
test eax, eax
je 0x404bd2
mov ecx, dword [ecx + 0xa80]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [0x48ede0]
cmp edi, 0x19999
jne 0x404bed
jmp 0x404ab8
mov ecx, dword [0x48ede0]
mov dword [esp + 0x18], 0
mov edi, dword [ecx + 0xa94]
xor eax, eax
test edi, edi
jle 0x404cb1
mov ebx, dword [ecx + 0xa94]
lea esi, [ecx + 0xa88]
cmp eax, ebx
jge 0x404c1f
test eax, eax
jl 0x404c1f
mov ecx, dword [esi + 4]
je 0x404c21
mov edx, eax
mov ecx, dword [ecx]
dec edx
jne 0x404c18
jmp 0x404c21
xor ecx, ecx
mov ecx, dword [ecx + 8]
lea edx, [esp + 0x38]
cmp edx, ecx
je 0x404c33
inc eax
cmp eax, edi
jl 0x404c09
jmp 0x404cb1
cmp eax, dword [esi + 0xc]
jge 0x404c4c
xor edx, edx
cmp eax, edx
jl 0x404c4e
mov ecx, dword [esi + 4]
je 0x404c48
mov ecx, dword [ecx]
dec eax
jne 0x404c43
mov eax, ecx
jmp 0x404c50
xor edx, edx
xor eax, eax
cmp eax, dword [esi + 4]
jne 0x404c5c
mov ecx, dword [eax]
mov dword [esi + 4], ecx
jmp 0x404c63
mov ecx, dword [eax + 4]
mov edi, dword [eax]
mov dword [ecx], edi
cmp eax, dword [esi + 8]
jne 0x404c70
mov ecx, dword [eax + 4]
mov dword [esi + 8], ecx
jmp 0x404c78
mov ecx, dword [eax]
mov edi, dword [eax + 4]
mov dword [ecx + 4], edi
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0xc]
dec eax
mov dword [esi + 0xc], eax
jne 0x404cb1
mov eax, dword [esi + 4]
cmp eax, edx
je 0x404c96
mov eax, dword [eax]
cmp eax, edx
jne 0x404c90
mov ecx, dword [esi + 0x14]
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], edx
mov dword [esi + 8], edx
mov dword [esi + 4], edx
call fcn.0045a472
mov dword [esi + 0x14], 0
lea ecx, [esp + 0x28]
call fcn.00460709
lea ecx, [esp + 0x38]
call fcn.00460709
mov eax, dword [esp + 0x18]
test eax, eax
je 0x404d5d
push ecx
mov ecx, esp
mov dword [esp + 0x14], esp
push 0x488424
call fcn.0045b618
mov ecx, dword [0x48ede0]
call fcn.0040c270
lea ecx, [esp + 0xc]
mov byte [esp + 0x666c4], 3
call fcn.0045b5aa
lea ecx, [esp + 0x38]
mov byte [esp + 0x666c4], 2
call fcn.00460431
lea ecx, [esp + 0x28]
mov byte [esp + 0x666c4], 1
call fcn.00460431
lea ecx, [ebp + 8]
mov byte [esp + 0x666c4], 0
call fcn.0045b5aa
lea ecx, [ebp + 0xc]
mov dword [esp + 0x666c4], 0xffffffff
call fcn.0045b5aa
mov eax, 1
mov ecx, dword [esp + 0x666bc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea ecx, [esp + 0xc]
mov byte [esp + 0x666c4], 3
call fcn.0045b5aa
lea ecx, [esp + 0x38]
mov byte [esp + 0x666c4], 2
call fcn.00460431
lea ecx, [esp + 0x28]
mov byte [esp + 0x666c4], 1
call fcn.00460431
lea ecx, [ebp + 8]
mov byte [esp + 0x666c4], 0
call fcn.0045b5aa
lea ecx, [ebp + 0xc]
mov dword [esp + 0x666c4], 0xffffffff
call fcn.0045b5aa
mov ecx, dword [esp + 0x666bc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc