Function at 0x40b81f
Capabilities:
Connect to wmi namespace via wbemlocator
Get hostname
Query or enumerate registry value
Reference sql statements
Reference wmi statements

Disassembly:
push ebp
sub esp, 0x310
lea ebp, [esp - 4]
mov eax, dword [0x4dbc40]
xor eax, ebp
mov dword [ebp + 0x310], eax
push 0x10c
mov eax, 0x4a8535
call fcn.00490b0e
mov eax, dword [ebp + 0x31c]
xor ebx, ebx
push ebx
push ebx
mov dword [ebp - 0x2c], eax
call dword [sym.imp.ole32.dll_CoInitializeEx]
push ebx
push ebx
push ebx
push 3
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
cmp eax, ebx
jge 0x40b879
cmp eax, 0x80010119
jne 0x40be32
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x30]
push eax
push 0x4b7980
push 1
push ebx
push 0x4b7a50
mov dword [ebp - 4], ebx
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, ebx
jl 0x40be21
mov dword [ebp - 0x24], ebx
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x30]
push str.ROOTCIMV2
lea edi, [ebp - 0x34]
call fcn.0040961b
mov byte [ebp - 4], 2
mov eax, dword [eax]
cmp eax, ebx
je 0x40b8c3
mov eax, dword [eax]
jmp 0x40b8c5
xor eax, eax
mov ecx, dword [esi]
lea edx, [ebp - 0x24]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push eax
push esi
call dword [ecx + 0xc]
lea edi, [ebp - 0x34]
mov esi, eax
call fcn.00409751
cmp esi, ebx
jl 0x40be11
push ebx
push ebx
push 3
push 3
push ebx
push ebx
push 0xa
push dword [ebp - 0x24]
call dword [sym.imp.ole32.dll_CoSetProxyBlanket]
cmp eax, ebx
jl 0x40be11
mov dword [ebp - 0x118], str.SELECT__FROM_Win32_BIOS_WHERE__SerialNumber_IS_NOT_NULL_
mov dword [ebp - 0x114], str.SoftwareElementID
mov dword [ebp - 0x110], ebx
mov dword [ebp - 0x10c], str.SELECT__FROM_Win32_Processor_WHERE__ProcessorId_IS_NOT_NULL_
mov dword [ebp - 0x108], str.ProcessorId
mov dword [ebp - 0x104], ebx
mov dword [ebp - 0x100], str.SELECT__FROM_Win32_DiskDrive_WHERE__PNPDeviceID_IS_NOT_NULL__AND__NOT__InterfaceType__USB__
mov dword [ebp - 0xfc], str.Signature
mov dword [ebp - 0xf8], ebx
mov dword [ebp - 0xf4], str.SELECT__FROM_Win32_NetworkAdapter_WHERE__MACAddress_IS_NOT_NULL__AND__NOT__PNPDeviceID_LIKE_ROOT___
mov dword [ebp - 0xf0], str.MACAddress
mov dword [ebp - 0xec], 1
mov dword [ebp - 0xe8], str.SELECT__FROM_Win32_BaseBoard_WHERE__SerialNumber_IS_NOT_NULL_
mov dword [ebp - 0xe4], ebx
mov dword [ebp - 0xe0], ebx
mov dword [ebp - 0xdc], str.SELECT__FROM_Win32_OperatingSystem
mov dword [ebp - 0xd8], ebx
mov dword [ebp - 0xd4], ebx
mov dword [ebp - 0xd0], str.SELECT__FROM_Win32_PhysicalMemory
mov dword [ebp - 0xcc], str.PartNumber
mov dword [ebp - 0xc8], ebx
mov dword [ebp - 0xc4], str.SELECT__FROM_Win32_UserAccount
mov dword [ebp - 0xc0], 0x4c5410
mov dword [ebp - 0xbc], ebx
mov dword [ebp - 0xb8], str.SELECT__FROM_Win32_SoundDevice_WHERE__PNPDeviceID_IS_NOT_NULL_
mov dword [ebp - 0xb4], ebx
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x50], 0x1b
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x50]
jge 0x40be11
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 4], 3
push dword [ebp + eax*4 - 0x118]
mov esi, dword [ebp - 0x24]
lea edi, [ebp - 0x5c]
call fcn.0040961b
mov dword [ebp - 0x18], eax
push 0x4c5498
lea edi, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.0040e64f
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
cmp ecx, ebx
je 0x40ba39
mov ecx, dword [ecx]
jmp 0x40ba3b
xor ecx, ecx
mov eax, dword [eax]
cmp eax, ebx
je 0x40ba45
mov eax, dword [eax]
jmp 0x40ba47
xor eax, eax
mov edx, dword [esi]
lea edi, [ebp - 0x1c]
push edi
push ebx
push 0x30
push ecx
push eax
push esi
call dword [edx + 0x50]
lea edi, [ebp - 0x54]
mov esi, eax
call fcn.00409751
lea edi, [ebp - 0x5c]
mov byte [ebp - 4], 3
call fcn.00409751
cmp esi, ebx
jl 0x40bdd5
cmp dword [ebp - 0x1c], ebx
je 0x40bdd5
mov eax, dword [0x4f4a0c]
mov ecx, 0x4f4a0c
mov dword [ebp - 0x34], ebx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x28], eax
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x40bdb1
mov dword [ebp - 0x20], ebx
lea edx, [ebp - 0x34]
push edx
lea edx, [ebp - 0x20]
push edx
push 1
push 0xffffffffffffffff
mov dword [ebp - 0x34], ebx
mov byte [ebp - 4], 8
mov ecx, dword [eax]
push eax
mov dword [ebp - 0x18], 0x80004005
call dword [ecx + 0x10]
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 7
jmp 0x40bae0
cmp dword [ebp - 0x18], ebx
jl 0x40bda0
cmp dword [ebp - 0x20], ebx
je 0x40bda0
cmp dword [ebp - 0x34], ebx
je 0x40bda0
push 0x4c549c
lea eax, [ebp - 0x28]
push eax
call fcn.0040742a
lea eax, [ebp - 0x6c]
push eax
mov byte [ebp - 0x11], bl
call dword [sym.imp.OLEAUT32.dll_VariantClear]
mov byte [ebp - 4], 0xa
mov esi, dword [ebp - 0x20]
push 0x4c54a0
lea edi, [ebp - 0x3c]
call fcn.0040e64f
mov byte [ebp - 4], 0xb
mov eax, dword [eax]
cmp eax, ebx
je 0x40bb38
mov eax, dword [eax]
jmp 0x40bb3a
xor eax, eax
mov ecx, dword [esi]
push ebx
push ebx
lea edx, [ebp - 0x6c]
push edx
push ebx
push eax
push esi
call dword [ecx + 0x10]
lea edi, [ebp - 0x3c]
mov esi, eax
mov byte [ebp - 4], 0xa
call fcn.00409751
cmp esi, ebx
jl 0x40bb76
cmp word [ebp - 0x6c], 8
jne 0x40bb76
cmp dword [ebp - 0x64], ebx
je 0x40bb76
push dword [ebp - 0x64]
lea eax, [ebp - 0x28]
push eax
call fcn.00406003
mov byte [ebp - 0x11], 1
mov esi, dword [sym.imp.OLEAUT32.dll_VariantClear]
lea eax, [ebp - 0x7c]
push eax
call esi
mov byte [ebp - 4], 0xc
mov eax, dword [ebp - 0x20]
push str.PNPDeviceID
lea edi, [ebp - 0x4c]
mov dword [ebp - 0x18], eax
call fcn.0040e64f
mov byte [ebp - 4], 0xd
mov eax, dword [eax]
cmp eax, ebx
je 0x40bba7
mov eax, dword [eax]
jmp 0x40bba9
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push ebx
push ebx
lea edi, [ebp - 0x7c]
push edi
push ebx
push eax
push ecx
call dword [edx + 0x10]
lea edi, [ebp - 0x4c]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xc
call fcn.00409751
cmp dword [ebp - 0x18], ebx
jl 0x40bbea
cmp word [ebp - 0x7c], 8
jne 0x40bbea
cmp dword [ebp - 0x74], ebx
je 0x40bbea
push dword [ebp - 0x74]
lea eax, [ebp - 0x28]
push eax
call fcn.00406003
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x38]
shl eax, 2
mov edi, dword [ebp + eax - 0x114]
mov dword [ebp - 0x40], eax
cmp edi, ebx
je 0x40bc59
lea eax, [ebp - 0x9c]
push eax
call esi
push ebx
push ebx
lea edx, [ebp - 0x9c]
push edx
push ebx
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x10]
cmp eax, ebx
jl 0x40bc48
cmp word [ebp - 0x9c], 8
jne 0x40bc48
cmp dword [ebp - 0x94], ebx
je 0x40bc48
push dword [ebp - 0x94]
lea eax, [ebp - 0x28]
push eax
call fcn.00406003
mov byte [ebp - 0x11], 1
mov edi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0x9c]
push eax
call edi
jmp 0x40bc5f
mov edi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
cmp byte [ebp - 0x11], bl
je 0x40bd88
lea eax, [ebp - 0x8c]
push eax
call esi
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x20]
push 0x4c54bc
lea edi, [ebp - 0x48]
mov dword [ebp - 0x18], eax
call fcn.0040e64f
mov byte [ebp - 4], 0x10
mov eax, dword [eax]
cmp eax, ebx
je 0x40bc96
mov eax, dword [eax]
jmp 0x40bc98
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push ebx
push ebx
lea edi, [ebp - 0x8c]
push edi
push ebx
push eax
push ecx
call dword [edx + 0x10]
lea edi, [ebp - 0x48]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xf
call fcn.00409751
cmp dword [ebp - 0x18], ebx
jl 0x40bcef
cmp word [ebp - 0x8c], 8
jne 0x40bcef
cmp dword [ebp - 0x84], ebx
je 0x40bcef
push dword [ebp - 0x84]
lea eax, [ebp - 0x28]
push eax
call fcn.00406003
push 0x4c4418
lea eax, [ebp - 0x28]
push eax
call fcn.0040742a
lea eax, [ebp - 0xac]
push eax
call esi
mov byte [ebp - 4], 0x11
mov esi, dword [ebp - 0x20]
push str.Manufacturer
lea edi, [ebp - 0x58]
call fcn.0040e64f
mov byte [ebp - 4], 0x12
mov eax, dword [eax]
cmp eax, ebx
je 0x40bd1a
mov eax, dword [eax]
jmp 0x40bd1c
xor eax, eax
mov ecx, dword [esi]
push ebx
push ebx
lea edx, [ebp - 0xac]
push edx
push ebx
push eax
push esi
call dword [ecx + 0x10]
lea edi, [ebp - 0x58]
mov esi, eax
mov byte [ebp - 4], 0x11
call fcn.00409751
cmp esi, ebx
jl 0x40bd6e
cmp word [ebp - 0xac], 8
jne 0x40bd6e
cmp dword [ebp - 0xa4], ebx
je 0x40bd6e
push dword [ebp - 0xa4]
lea eax, [ebp - 0x28]
push eax
call fcn.00406003
push 0x4c4418
lea eax, [ebp - 0x28]
push eax
call fcn.0040742a
mov esi, dword [sym.imp.OLEAUT32.dll_VariantCopy]
lea eax, [ebp - 0xac]
push eax
call esi
lea eax, [ebp - 0x8c]
push eax
call esi
mov edi, esi
mov eax, dword [ebp - 0x40]
cmp dword [ebp + eax - 0x110], ebx
lea eax, [ebp - 0x7c]
push eax
jne 0x40bdef
call edi
lea eax, [ebp - 0x6c]
push eax
call edi
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x40bdb1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push 0x4c54d4
push dword [ebp - 0x2c]
call fcn.0040742a
mov esi, dword [ebp - 0x28]
push dword [esi - 0xc]
mov eax, dword [ebp - 0x2c]
push esi
call fcn.004063b2
lea eax, [esi - 0x10]
call fcn.00404bfa
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
cmp eax, ebx
je 0x40bde6
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
add dword [ebp - 0x38], 3
jmp 0x40b9ef
call edi
lea eax, [ebp - 0x6c]
push eax
call edi
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x20]
cmp eax, ebx
je 0x40ba97
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x40ba97
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x24]
cmp eax, ebx
je 0x40be21
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x40be32
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
cmp dword [eax - 0xc], ebx
jne 0x40bf9f
mov edi, 0x103
push edi
lea eax, [ebp + 0x20d]
push ebx
push eax
mov byte [ebp + 0x20c], bl
call fcn.0048e0e0
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x20c]
push eax
lea eax, [ebp - 0x18]
push eax
mov esi, str.MachineGuid
push esi
push str.SOFTWAREMicrosoftCryptography
push 0x80000002
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], 1
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
jne 0x40beab
cmp byte [ebp + 0x20c], bl
je 0x40beab
lea eax, [ebp + 0x20c]
push eax
push dword [ebp - 0x2c]
call fcn.004060bc
jmp 0x40bf3b
call fcn.0042088e
test eax, eax
je 0x40bf3b
lea eax, [ebp - 0x24]
push eax
push 0x20119
push ebx
push str.SOFTWAREMicrosoftCryptography
push 0x80000002
mov dword [ebp - 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40bf3b
cmp dword [ebp - 0x24], ebx
je 0x40bf3b
push 0x104
lea eax, [ebp + 0x20c]
push ebx
push eax
call fcn.0048e0e0
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x20c]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push esi
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40bf32
cmp byte [ebp + 0x20c], bl
je 0x40bf32
lea eax, [ebp + 0x20c]
push eax
push dword [ebp - 0x2c]
call fcn.004060bc
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
lea eax, [ebp + 0x109]
push ebx
push eax
mov byte [ebp + 0x108], bl
call fcn.0048e0e0
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x108]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x4c5504
push 0x4c5514
push 0x80000001
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x1c], 0x102
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
jne 0x40bf9f
cmp byte [ebp + 0x108], bl
je 0x40bf9f
lea eax, [ebp + 0x108]
push eax
push dword [ebp - 0x2c]
call fcn.0040742a
mov eax, dword [0x4f4a0c]
mov ecx, 0x4f4a0c
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x30], eax
push 0x13
pop esi
mov dword [ebp - 4], esi
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0x14
call fcn.0040b60a
mov dword [ebp - 4], esi
jmp 0x40bfd8
mov esi, dword [ebp - 0x30]
push dword [esi - 0xc]
mov eax, dword [ebp - 0x2c]
push esi
call fcn.004063b2
mov edi, 0x104
push edi
lea eax, [ebp + 1]
push ebx
push eax
mov byte [ebp], bl
call fcn.0048e0e0
add esp, 0xc
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp]
push eax
push 4
mov dword [ebp - 0x44], edi
call dword [sym.imp.KERNEL32.dll_GetComputerNameExA]
lea eax, [ebp]
push eax
push dword [ebp - 0x2c]
call fcn.0040742a
lea eax, [esi - 0x10]
call fcn.00404bfa
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x310]
xor ecx, ebp
call fcn.00488e60
add ebp, 0x314
leave
ret