Function at 0x581420
Capabilities:
Check for time delay via queryperformancecounter
Execute anti-debugging instructions
Get memory capacity

Disassembly:
sub esp, 0x190
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatus]
mov ecx, dword [esp + 0x88]
add ecx, 0xffffff
shr ecx, 0x14
and ecx, 0xff0
mov dword [0x6bddb0], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
push edi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_GetPriorityClass]
push 0x100
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0xf
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x40]
push 0
push 4
push ecx
push edx
call fcn.005de0d0
mov ecx, dword [esp + 0x38]
add ecx, eax
mov eax, dword [esp + 0x3c]
adc eax, edx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], eax
rdtsc
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
lea ebx, [ebx]
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov ecx, dword [esp + 0x3c]
cmp ecx, dword [esp + 0x44]
jg 0x5814e0
jl 0x581501
mov edx, dword [esp + 0x38]
cmp edx, dword [esp + 0x40]
ja 0x5814e0
rdtsc
sub eax, dword [esp + 0x50]
sbb edx, dword [esp + 0x54]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
push 0
push 0x3d090
push eax
push ecx
call fcn.005de0d0
mov ecx, eax
cmp ecx, 0x3e8
mov dword [0x6bddb4], ecx
jbe 0x581561
add ecx, 0x32
mov eax, 0x51eb851f
mul ecx
shr edx, 5
mov ecx, edx
imul ecx, ecx, 0x64
mov dword [0x6bddb4], ecx
xor edx, edx
mov eax, ecx
mov esi, 0x64
div esi
cmp ecx, 0xc8
jae 0x5815cc
cmp edx, 0x5f
jbe 0x581585
mov eax, esi
sub eax, edx
add ecx, eax
mov dword [0x6bddb4], ecx
cmp edx, 0x3d
jbe 0x58159e
cmp edx, 0x47
jae 0x58159e
mov eax, 0x42
sub eax, edx
add ecx, eax
mov dword [0x6bddb4], ecx
cmp edx, 0x2d
jbe 0x5815b7
cmp edx, 0x37
jae 0x5815b7
mov eax, 0x32
sub eax, edx
add ecx, eax
mov dword [0x6bddb4], ecx
cmp edx, 0x1c
jbe 0x581616
cmp edx, 0x26
jae 0x581616
mov eax, 0x21
sub eax, edx
add ecx, eax
jmp 0x581610
cmp edx, 0x54
jbe 0x5815dc
mov eax, 0x64
sub eax, edx
add ecx, eax
jmp 0x581610
cmp edx, 0x3a
jbe 0x5815ec
mov eax, 0x42
sub eax, edx
add ecx, eax
jmp 0x581610
cmp edx, 0x2a
jbe 0x5815fc
mov eax, 0x32
sub eax, edx
add ecx, eax
jmp 0x581610
cmp edx, 0x10
jbe 0x58160c
mov eax, 0x21
sub eax, edx
add ecx, eax
jmp 0x581610
jae 0x581616
sub ecx, edx
mov dword [0x6bddb4], ecx
push str.ddraw.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.DirectDrawCreateEx
push edi
mov dword [esp + 0x3c], edi
call esi
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x48], eax
jne 0x58164d
push 1
push 0x7a
push 0x79
call fcn.00582630
add esp, 0xc
push str.DirectDrawEnumerateExA
push edi
call esi
mov esi, eax
cmp esi, ebx
jne 0x581669
push 1
push 0x7a
push 0x79
call fcn.00582630
add esp, 0xc
push 1
push ebx
push 0x580f10
call esi
mov eax, dword [0x6bddbc]
xor edi, edi
cmp eax, ebx
jbe 0x5817df
mov ebp, 0x4200
cmp edi, ebx
je 0x581697
mov eax, edi
imul eax, eax, 0x34
add eax, 0x68acb8
jmp 0x581699
xor eax, eax
push ebx
push 0x5ec844
lea ecx, [esp + 0x1c]
push ecx
push eax
call dword [esp + 0x58]
test eax, eax
jge 0x5816bb
push 1
push 0x7a
push 0x79
call fcn.00582630
add esp, 0xc
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push 8
push ebx
push eax
call dword [edx + 0x50]
xor eax, eax
mov dword [esp + 0x24], eax
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea edx, [esp + 0x14]
push edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x30], ebp
mov ecx, dword [eax]
push eax
or esi, 0xffffffff
call dword [ecx + 0x5c]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x58170d
cmp eax, 0xffffffff
jae 0x58170d
mov esi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 0x10007000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x58173c
cmp eax, esi
jae 0x58173c
mov esi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 0x10005000
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x58176b
cmp eax, esi
jae 0x58176b
mov esi, eax
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x2c]
push edx
mov dword [esp + 0x30], 0x10004040
mov ecx, dword [eax]
push eax
call dword [ecx + 0x5c]
mov eax, dword [esp + 0x10]
cmp eax, ebx
jbe 0x58179a
cmp eax, esi
jae 0x58179a
mov esi, eax
cmp esi, 0xffffffff
jne 0x581b03
push 1
push 0x7a
push 0x79
call fcn.00582630
add esp, 0xc
lea eax, [esi + 0x3ffffff]
and eax, 0xfc000000
mov ecx, edi
imul ecx, ecx, 0x34
mov dword [ecx + 0x68ace8], eax
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [0x6bddbc]
inc edi
cmp edi, eax
jb 0x581687
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov ecx, 0x104
mov edi, 0x68a8a8
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x70]
push ecx
push 0x5ec7c4
mov dword [0x68a8a0], ebx
mov dword [0x68aec8], ebx
call sub.DSOUND.dll_GetDeviceID
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x20]
push edx
push 0x612024
push 1
push ebx
push 0x612034
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x581cb1
xor eax, eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x58]
push edx
mov dword [esp + 0x5c], 0x10
mov dword [esp + 0x60], 0x6f
mov dword [esp + 0x64], ebx
mov dword [esp + 0x68], ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push eax
call dword [ecx + 0x10]
cmp dword [esp + 0x18], ebx
je 0x581ca7
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], ebx
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push str.DxDiag_DirectSound.DxDiag_SoundDevices
push eax
call dword [ecx + 0x14]
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x581c9d
mov ecx, dword [eax]
push 0x68a8a0
push eax
call dword [ecx + 0xc]
mov eax, dword [0x68a8a0]
cmp eax, 9
jbe 0x5818e6
mov eax, 9
mov dword [0x68a8a0], eax
cmp eax, ebx
mov dword [esp + 0x4c], ebx
jbe 0x581c93
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, 0x68a8ee
mov dword [esp + 0x34], 0x611cd8
mov esi, 8
lea ebx, [ebx]
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x38]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x581c6e
mov edx, dword [eax]
lea ecx, [esp + 0x24]
push ecx
push str.szGuidDeviceID
push eax
call dword [edx + 0x20]
cmp word [esp + 0x24], si
jne 0x5819fa
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0x100
lea edx, [esp + 0xac]
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
lea ecx, [esp + 0xa0]
push ecx
call fcn.005cc646
add esp, 4
lea edx, [esp + 0xa1]
lea esi, [ebp - 6]
call fcn.00581390
lea edx, [esp + 0xaa]
mov dword [esi], eax
call fcn.00581390
lea edx, [esp + 0xaf]
mov word [ebp - 2], ax
call fcn.00581390
lea ecx, [ebp + 2]
lea edx, [esp + 0xb4]
mov word [ebp], ax
call fcn.005813d0
lea ecx, [ebp + 4]
lea edx, [esp + 0xb9]
call fcn.005813d0
mov ecx, 0x10
lea edi, [esp + 0x70]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x5819dc
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x5819ea
mov edx, dword [esp + 0x4c]
mov dword [0x68aec8], edx
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, 8
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push str.szDescription
push eax
call dword [ecx + 0x20]
cmp word [esp + 0x24], si
jne 0x581a58
mov ecx, dword [esp + 0x2c]
push 0
push 0
push 0x100
lea eax, [esp + 0xac]
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call ebx
push 0x1f
lea edx, [esp + 0xa4]
push edx
lea eax, [ebp - 0x46]
push eax
call fcn.005c8ba0
add esp, 0xc
lea ecx, [esp + 0x24]
push ecx
mov byte [ebp - 0x27], 0
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
mov edx, dword [eax]
lea ecx, [esp + 0x24]
push ecx
push str.szHardwareID
push eax
call dword [edx + 0x20]
cmp word [esp + 0x24], si
jne 0x581bc5
mov eax, dword [esp + 0x2c]
push 0
push 0
push 0x100
lea edx, [esp + 0xac]
push edx
push 0xffffffffffffffff
push eax
push 0
push 0
call ebx
lea ecx, [esp + 0xa0]
push ecx
call fcn.005cc646
add esp, 4
mov edi, str.nforce
lea esi, [esp + 0xa0]
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x581ac1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x581adb
mov ecx, 0xe
mov esi, str.pci_ven_10dedev_01b0subsys_37301462rev_c2
lea edi, [esp + 0xa0]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea edx, [esp + 0xa0]
push str.ven_
push edx
call fcn.005ca410
xor esi, esi
add esp, 8
cmp eax, esi
je 0x581b37
lea edx, [eax + 4]
call fcn.00581390
mov dword [ebp + 0x12], eax
jmp 0x581b3a
cmp esi, 0x1000000
ja 0x581b1b
lea eax, [esi + 0x7fffff]
and eax, 0xff800000
jmp 0x5817bc
cmp esi, 0x4000000
ja 0x5817b1
lea eax, [esi + 0x1ffffff]
and eax, 0xfe000000
jmp 0x5817bc
mov dword [ebp + 0x12], esi
lea eax, [esp + 0xa0]
push str.dev_
push eax
call fcn.005ca410
add esp, 8
cmp eax, esi
je 0x581b60
lea edx, [eax + 4]
call fcn.00581390
mov dword [ebp + 0x16], eax
jmp 0x581b63
mov dword [ebp + 0x16], esi
lea ecx, [esp + 0xa0]
push str.subsys_
push ecx
call fcn.005ca410
add esp, 8
cmp eax, esi
je 0x581b89
lea edx, [eax + 7]
call fcn.00581390
mov dword [ebp + 0x1a], eax
jmp 0x581b8c
mov dword [ebp + 0x1a], esi
lea edx, [esp + 0xa0]
push str.rev_
push edx
call fcn.005ca410
add esp, 8
cmp eax, esi
je 0x581bb2
lea edx, [eax + 7]
call fcn.00581390
mov dword [ebp + 0x1e], eax
jmp 0x581bb5
mov dword [ebp + 0x1e], esi
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, 8
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x24]
push edx
push str.szDriverVersion
push eax
call dword [ecx + 0x20]
cmp word [esp + 0x24], si
jne 0x581c64
mov ecx, dword [esp + 0x2c]
push 0
push 0
push 0x100
lea eax, [esp + 0xac]
push eax
push 0xffffffffffffffff
push ecx
push 0
push 0
call ebx
lea edx, [esp + 0x48]
push edx
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x74]
push edx
lea eax, [esp + 0xb0]
push str._d._d._d._d
push eax
mov dword [esp + 0x60], 0
call fcn.005cb552
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
mov edi, dword [esp + 0x60]
shl ecx, 0x10
add ecx, edx
mov edx, dword [esp + 0x68]
shl edx, 0x10
add esp, 0x18
lea eax, [esp + 0x24]
add edx, edi
push eax
mov dword [ebp + 0xe], ecx
mov dword [ebp + 0xa], edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x34]
mov ecx, dword [0x68a8a0]
inc eax
add edi, 2
add ebp, 0x68
cmp eax, ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x34], edi
jb 0x581910
mov eax, dword [esp + 0x1c]
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
call dword [edx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x190
ret