Function at 0x40fbc0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b0950
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ca1d0]
xor eax, esp
push eax
lea eax, [esp + 0x50]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x30], edi
lea eax, [esp + 0x18]
push eax
xor ebp, ebp
push ebp
push ebp
call sub.pdh.dll_PdhOpenQueryW
cmp eax, ebp
jne 0x40ffd3
mov edx, dword [0x4d3dcc]
mov eax, dword [edx + 0xc]
mov ecx, 0x4d3dcc
mov dword [esp + 0x24], ebp
mov dword [esp + 0x20], ebp
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push ebp
push 0x190
lea ecx, [esp + 0x28]
push ecx
push ebp
lea edx, [esp + 0x34]
push edx
push ebp
push str.PhysicalDisk
push ebp
push ebp
mov dword [esp + 0x7c], ebp
call sub.pdh.dll_PdhEnumObjectItemsW
cmp eax, 0x800007d2
jne 0x40fe5e
mov eax, dword [0x4d3dcc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dcc
call edx
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
mov eax, dword [0x4d3dcc]
mov edx, dword [eax + 0xc]
mov ecx, 0x4d3dcc
mov byte [esp + 0x58], 1
call edx
lea edi, [eax + 0x10]
mov dword [esp + 0x28], edi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov ebx, 2
mov byte [esp + 0x58], bl
jge 0x40fcb5
push 0x104
lea ecx, [esp + 0x18]
call fcn.00407af0
mov esi, dword [esp + 0x14]
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov eax, dword [esi - 8]
push eax
push esi
call fcn.00495384
add esp, 8
cmp eax, ebp
jl 0x40fec5
cmp eax, dword [esi - 8]
jg 0x40fec5
push ebx
xor ecx, ecx
mov dword [esi - 0xc], eax
push ebp
lea edx, [esp + 0x34]
mov word [esi + eax*2], cx
push edx
lea ecx, [esp + 0x20]
call fcn.00407b90
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x5c], 3
call fcn.0040a460
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x58], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fd2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
call fcn.004081d0
mov ecx, dword [esp + 0x24]
lea edx, [ecx + ecx]
push edx
call fcn.00493bf1
mov esi, eax
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax]
push ecx
mov dword [esp + 0x34], esi
call fcn.00493bf1
add esp, 8
cmp esi, ebp
mov ebp, dword [esp + 0x14]
mov ebx, eax
je 0x40fe0b
test ebx, ebx
je 0x40fe02
push 0
push 0x190
lea edx, [esp + 0x28]
push edx
push ebx
lea eax, [esp + 0x34]
push eax
push esi
push str.PhysicalDisk
push 0
push 0
call sub.pdh.dll_PdhEnumObjectItemsW
test eax, eax
jne 0x40fe02
mov esi, ebx
cmp word [ebx], ax
je 0x40fdfe
lea esp, [esp]
push esi
lea ecx, [esp + 0x2c]
call fcn.0040c340
lea ecx, [esp + 0x28]
call fcn.004081d0
mov edi, dword [esp + 0x28]
test ebp, ebp
je 0x40fdeb
cmp dword [edi - 0xc], 0
jl 0x40fdeb
push ebp
push edi
call fcn.00493ae4
add esp, 8
test eax, eax
je 0x40fdeb
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x40fdeb
push esi
lea ecx, [esp + 0x20]
push str.PhysicalDisk__s____Idle_Time
push ecx
call fcn.00408720
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp word [esi + eax*2 + 2], 0
lea esi, [esi + eax*2 + 2]
jne 0x40fda0
mov esi, dword [esp + 0x2c]
push esi
call fcn.00493cbb
add esp, 4
test ebx, ebx
je 0x40fe18
push ebx
call fcn.00493cbb
add esp, 4
lea eax, [edi - 0x10]
mov byte [esp + 0x58], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fe39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov byte [esp + 0x58], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fe5a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
cmp dword [ecx - 0xc], 0
jne 0x40fe78
push 0x21
push str.PhysicalDisk__Total___Idle_Time
lea ecx, [esp + 0x24]
call fcn.004085c0
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x34]
push edx
push 0
push str.Processor__Total___Processor_Time
push eax
call sub.pdh.dll_PdhAddCounterW
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x38]
push ecx
push 0
push esi
push edx
call sub.pdh.dll_PdhAddCounterW
test eax, eax
je 0x40fecf
lea eax, [esi - 0x10]
mov dword [esp + 0x58], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40ffc7
push 0x80070057
call fcn.004010b0
mov ecx, dword [esp + 0x18]
push ecx
call sub.pdh.dll_PdhCollectQueryData
mov edx, dword [edi + 4]
xor esi, esi
test edx, edx
jne 0x40ff8d
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
push 0x3e8
call ebx
mov eax, dword [esp + 0x18]
push eax
call sub.pdh.dll_PdhCollectQueryData
test eax, eax
jne 0x40ff8d
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x200
push eax
call sub.pdh.dll_PdhGetFormattedCounterValue
test eax, eax
jne 0x40ff2d
fld qword [esp + 0x44]
fstp qword [edi + 8]
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x34]
push edx
push 0x200
push eax
call sub.pdh.dll_PdhGetFormattedCounterValue
test eax, eax
jne 0x40ff51
fld qword [esp + 0x44]
fstp qword [edi + 0x10]
fld qword [0x4b4020]
fcom qword [edi + 8]
fnstsw ax
test ah, 0x41
jne 0x40ffe7
fcomp qword [edi + 0x10]
fnstsw ax
test ah, 5
jp 0x40ffe9
inc esi
cmp esi, 3
jle 0x40ff82
mov ecx, dword [edi]
test ecx, ecx
je 0x40ff82
mov edx, dword [ecx]
mov eax, dword [edx]
push esi
call eax
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40fef0
mov edx, dword [esp + 0x34]
push edx
call sub.pdh.dll_PdhRemoveCounter
mov eax, dword [esp + 0x38]
push eax
call sub.pdh.dll_PdhRemoveCounter
mov ecx, dword [esp + 0x18]
push ecx
call sub.pdh.dll_PdhCloseQuery
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov dword [esp + 0x58], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ffd3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
fstp st(0)
xor esi, esi
jmp 0x40ff82