Function at 0x497030
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x497020
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
mov ebx, ecx
mov dword [ebp - 0x34], ebx
cmp dword [ebx], 0
je 0x4972ee
cmp dword [ebx + 4], 0
je 0x4972ee
call fcn.00408ce0
mov ecx, eax
test ecx, ecx
jne 0x497079
push 0x80004005
call fcn.00408b40
mov eax, dword [ecx]
push esi
push edi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 4], 0
push str.SELECT_PercentIdleTime_FROM_Win32_PerfFormattedData_Counters_ProcessorInformation_WHERE_Name_Total
push eax
call fcn.00409830
mov edi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x24]
add esp, 8
mov dword [ebp - 0x10], 0
push edi
call fcn.00409c80
mov esi, eax
push 0x4ad928
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 1
call fcn.00409c80
mov esi, dword [esi]
mov byte [ebp - 4], 2
test esi, esi
je 0x4970d2
mov esi, dword [esi]
jmp 0x4970d4
xor esi, esi
mov eax, dword [eax]
test eax, eax
je 0x4970de
mov edx, dword [eax]
jmp 0x4970e0
xor edx, edx
mov eax, dword [ebx + 4]
lea ebx, [ebp - 0x10]
push ebx
push 0
push 0x30
mov ecx, dword [eax]
push esi
push edx
push eax
call dword [ecx + 0x50]
mov esi, dword [ebp - 0x20]
mov edx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov ebx, dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [ebp - 0x30], eax
test esi, esi
je 0x497155
lea ecx, [esi + 8]
push ecx
call edx
test eax, eax
jne 0x497148
test esi, esi
je 0x497148
mov eax, dword [esi]
test eax, eax
je 0x497126
push eax
call ebx
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x49713d
push eax
call fcn.004495c9
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.004495bb
add esp, 8
mov edx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov dword [ebp - 0x20], 0
mov esi, dword [ebp - 0x24]
mov byte [ebp - 4], 0
test esi, esi
je 0x4971a6
lea eax, [esi + 8]
push eax
call edx
test eax, eax
jne 0x49719f
test esi, esi
je 0x49719f
mov eax, dword [esi]
test eax, eax
je 0x49717d
push eax
call ebx
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x497194
push eax
call fcn.004495c9
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.004495bb
add esp, 8
mov dword [ebp - 0x24], 0
or ebx, 0xffffffff
cmp dword [ebp - 0x30], 0
je 0x4971bd
mov edx, dword [ebp - 0x34]
or esi, ebx
mov byte [edx + 0x11], 1
jmp 0x4972bf
mov ecx, dword [ebp - 0x10]
xor eax, eax
xor esi, esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], eax
test ecx, ecx
je 0x4972ab
lea edx, [ebp - 0x28]
mov dword [ebp - 0x14], 0
mov eax, dword [ecx]
push edx
lea edx, [ebp - 0x14]
push edx
push 1
push 0xffffffffffffffff
push ecx
call dword [eax + 0x10]
cmp dword [ebp - 0x28], 0
je 0x497295
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x44]
push 0
push 0
push edx
mov ecx, dword [eax]
push 0
push str.PercentIdleTime
push eax
call dword [ecx + 0x10]
test eax, eax
jne 0x497271
call fcn.00408ce0
test eax, eax
je 0x49706f
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x3c]
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 3
push 0x4ad954
push eax
call fcn.0040a0b0
inc esi
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x2c]
push esi
call fcn.00452cb3
add dword [ebp - 0x18], eax
add esp, 0x10
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x49726e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x497288
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [ebp - 0x10]
test ecx, ecx
jne 0x4971d2
jmp 0x497298
mov ecx, dword [ebp - 0x10]
test esi, esi
jle 0x4972ab
mov eax, dword [ebp - 0x18]
cdq
idiv esi
mov esi, 0x64
sub esi, eax
jmp 0x4972ae
or esi, 0xffffffff
mov edx, dword [ebp - 0x34]
test esi, esi
push ecx
sete al
mov byte [edx + 0x11], al
mov eax, dword [ecx]
call dword [eax + 8]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4972db
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
or eax, 0xffffffff
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret