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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.00433770
call fcn.00407460
mov ecx, 0x101
mov eax, 0x3e8
mov edi, 0x6197c4
mov edx, 0x714f6c
rep stosd dword es:[edi], eax
mov dword [edx - 4], ebx
mov dword [edx], ebx
mov dword [edx + 4], ebx
mov dword [edx + 8], ebx
mov dword [edx + 0xc], ebx
mov dword [edx + 0x1c], ebx
add edx, 0x44
cmp edx, 0x7193b0
jl 0x4076a5
call fcn.0040c6d0
test eax, eax
jne 0x4076d1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [0x466b07], 0x20
call fcn.004290f0
mov ecx, dword [0x45d384]
mov dword [ebp - 0x54], ecx
mov eax, dword [str.jdqmdk21_ckk]
xor ecx, ecx
mov dword [ebp - 0x4a], ecx
mov dword [ebp - 0x46], ecx
mov edx, dword [0x45d388]
mov byte [ebp - 0x42], cl
mov ecx, dword [0x45d378]
mov dword [ebp - 0x20], ecx
mov ecx, dword [str.cdbncd_ahm]
mov dword [ebp - 0x40], ecx
xor ecx, ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
mov word [ebp - 0x2c], cx
mov dword [ebp - 0x58], eax
mov ax, word [0x45d38c]
mov byte [ebp - 0x2a], cl
mov ecx, 5
mov esi, str.EktrgHmrsqtbshnmB_bgd
lea edi, [ebp - 0x80]
rep movsd dword es:[edi], dword [esi]
mov word [ebp - 0x4c], ax
mov eax, dword [0x45d374]
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x50], edx
mov edx, dword [str.Uhqst_k_kknb]
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x28], edx
mov dx, word [0x45d37c]
mov byte [ebp - 0x12], al
mov eax, dword [0x45d36c]
movsw word es:[edi], word [esi]
mov word [ebp - 0x1c], dx
mov edx, dword [0x45d368]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x3c], edx
movsb byte es:[edi], byte [esi]
xor eax, eax
mov dl, byte [ebp + eax - 0x58]
mov cl, byte [ebp + eax - 0x28]
inc dl
inc cl
mov byte [ebp + eax - 0x58], dl
mov dl, byte [ebp + eax - 0x40]
mov byte [ebp + eax - 0x28], cl
mov cl, byte [ebp + eax - 0x80]
inc dl
inc cl
mov byte [ebp + eax - 0x40], dl
mov byte [ebp + eax - 0x80], cl
inc eax
cmp eax, 0x17
jl 0x407779
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x40]
push eax
call fcn.00404110
add esp, 8
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4078bc
xor ecx, ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], ecx
lea edx, [ebp - 0x58]
mov word [ebp - 0x2c], cx
push edx
mov byte [ebp - 0x2a], cl
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
xor eax, eax
cmp esi, ebx
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov word [ebp - 0x44], ax
mov byte [ebp - 0x42], al
je 0x40788b
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x28]
push ecx
push esi
call edi
xor edx, edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov ebx, eax
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x80]
mov dword [ebp - 0x18], edx
push eax
mov word [ebp - 0x14], dx
push esi
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x12], dl
call edi
xor ecx, ecx
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], ecx
mov word [ebp - 0x6c], cx
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x6a], cl
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
test ebx, ebx
mov dword [ebp - 0x88], eax
je 0x407889
push 0x40
push 0x1000
push dword [ebp - 4]
push 0
call dword [ebp - 0x64]
mov dword [0x71a634], eax
push dword [ebp - 4]
push eax
push dword [ebp - 0x88]
call dword [ebp - 0x84]
xor ebx, ebx
mov edi, dword [0x71a634]
cmp edi, ebx
jne 0x40789e
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [0x71a634]
push str.autoexec.scn
push ebx
mov dword [0x85b890], ecx
call fcn.004042c0
add esp, 8
test eax, eax
jne 0x4078e1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0x4c0
mov edi, 0x484670
rep stosd dword es:[edi], eax
mov ecx, 0x490
mov edi, 0x485978
rep stosd dword es:[edi], eax
cmp dword [0x46217c], ebx
mov dword [0x714f78], 1
je 0x407917
call fcn.00408250
mov dword [0x46217c], eax
call fcn.004094f0
xor esi, esi
push esi
call fcn.00428610
add esp, 4
inc esi
cmp esi, 0x12
jl 0x40791e
xor eax, eax
mov ecx, 0x12000
mov edi, 0x496b78
rep stosd dword es:[edi], eax
mov ecx, 0x12
mov edi, 0x4f7a38
rep stosd dword es:[edi], eax
mov eax, 0x45fb84
mov dword [eax], ebx
add eax, 0x20
cmp eax, 0x461b84
jl 0x40794c
mov eax, 0x496b78
mov edi, eax
add eax, 0x4000
cmp eax, 0x4deb78
mov ecx, 0x800
mov esi, 0x45fb80
rep movsd dword es:[edi], dword [esi]
jl 0x40795d
xor eax, eax
mov ecx, 0x1fc0
mov edi, 0x4eeb98
rep stosd dword es:[edi], eax
mov ecx, 0x3e8
mov edi, 0x512780
rep stosd dword es:[edi], eax
mov ecx, 0x3e8
mov edi, 0x60e6c0
rep stosd dword es:[edi], eax
mov ecx, 0xfa
mov edi, 0x4fcb60
rep stosd dword es:[edi], eax
mov ecx, 0x3e800
mov edi, 0x513720
rep stosd dword es:[edi], eax
mov ecx, 0x101
mov edi, 0x617f78
rep stosd dword es:[edi], eax
mov ecx, 0x101
mov edi, 0x617660
rep stosd dword es:[edi], eax
mov ecx, 0x100
mov edi, 0x4fa718
rep stosd dword es:[edi], eax
mov dword [0x4f7a80], ebx
mov eax, 0x4fc364
or ecx, 0xffffffff
mov dword [eax - 4], ebx
mov dword [eax], ecx
add eax, 8
cmp eax, 0x4fcb64
jl 0x4079e7
mov eax, 0x4ff77c
mov dword [eax - 4], ebx
mov dword [eax], ebx
mov dword [eax + 4], ecx
add eax, 0xc
cmp eax, 0x50037c
jl 0x4079fb
xor eax, eax
mov ecx, 0x101
mov edi, 0x4fab18
rep stosd dword es:[edi], eax
mov ecx, 0x101
mov edi, 0x617a68
rep stosd dword es:[edi], eax
mov ecx, 0x100
mov edi, 0x6193bc
rep stosd dword es:[edi], eax
mov ecx, 0x100
mov edi, 0x7193ac
rep stosd dword es:[edi], eax
mov ecx, 0x100
mov edi, 0x619bc8
mov edx, 0x511780
rep stosd dword es:[edi], eax
mov dword [edx], ebx
add edx, 0x10
cmp edx, 0x512780
jl 0x407a50
fld qword [0x4623b8]
xor eax, eax
fcomp qword [0x458488]
mov ecx, 0x404
mov edi, 0x4fb020
rep stosd dword es:[edi], eax
fnstsw ax
test ah, 0x40
jne 0x407b19
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x407a9f
fild qword [ebp - 0x10]
fmul qword [0x458498]
fstp qword [0x4623b8]
fld qword [0x4623b8]
fcomp qword [0x458488]
fnstsw ax
test ah, 0x40
jne 0x407b19
mov esi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [ebp - 0x10]
push eax
call esi
fild qword [ebp - 0x10]
push 0x1f4
fdiv qword [0x4623b8]
fstp qword [ebp - 0x68]
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x60]
push ecx
call esi
fild qword [ebp - 0x60]
fdiv qword [0x4623b8]
fsub qword [ebp - 0x68]
fcom qword [0x4584c0]
fnstsw ax
test ah, 1
jne 0x407b03
fcomp qword [0x4584b8]
fnstsw ax
test ah, 0x41
jne 0x407b19
jmp 0x407b05
fstp st(0)
mov dword [0x4623b8], 0
mov dword [0x4623bc], 0
mov edx, dword [0x71a630]
add edx, 0x2000
mov dword [0x71a638], edx
xor edx, edx
pushfd
pop eax
xor eax, 0x200000
push eax
popfd
pushfd
pop ebx
cmp eax, ebx
jne 0x407b49
mov eax, 1
cpuid
and edx, 0x800000
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x407b66
mov eax, dword [0x4623ac]
test eax, eax
je 0x407b66
mov dword [0x71a7b4], 1
xor esi, esi
mov dword [ebp - 8], esi
fild dword [ebp - 8]
fmul qword [0x4584b0]
fld st(0)
fsin
fmul qword [0x4584a8]
call sub.MSVCRT.dll__ftol
fcos
mov dword [esi*4 + 0x48e378], eax
fmul qword [0x4584a8]
call sub.MSVCRT.dll__ftol
mov dword [esi*4 + 0x491784], eax
inc esi
cmp esi, 0x100
mov dword [ebp - 8], esi
jl 0x407b6b
mov eax, dword [0x500378]
mov ecx, dword [0x7199b0]
push eax
push ecx
call fcn.00402cf0
add esp, 8
test eax, eax
jne 0x407bdc
push str.DirectInputCreate_Error.
push 0x7197b0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, 0xa6
mov edi, 0x4880c0
rep stosd dword es:[edi], eax
mov eax, dword [0x7199b0]
test eax, eax
je 0x407c6f
mov edx, dword [0x462008]
mov eax, dword [0x461ffc]
mov ecx, dword [0x461ff8]
push edx
push eax
push ecx
call fcn.0040e7d0
xor eax, eax
mov ecx, 0xa0a
mov edi, 0x4fcf48
rep stosd dword es:[edi], eax
mov eax, dword [0x462128]
add esp, 0xc
xor esi, esi
test eax, eax
jle 0x407c55
mov edx, dword [0x462008]
mov eax, dword [0x461ffc]
mov ecx, dword [0x461ff8]
push 0
push edx
push eax
push ecx
push esi
call fcn.0040d520
add esp, 0x14
test eax, eax
je 0x407c66
mov eax, dword [0x462128]
inc esi
cmp esi, eax
jl 0x407c28
push 0x4623c0
call fcn.004072c0
add esp, 4
test eax, eax
jne 0x407c6f
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [0x71a630]
pop edi
add edx, 0x4000
pop esi
mov dword [0x71a63c], edx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret