Function at 0x1002c790
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x1009c70c
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x100c230c]
xor eax, esp
mov dword [esp + 0x248], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100c230c]
xor eax, esp
push eax
lea eax, [esp + 0x260]
mov dword fs:[0], eax
push 2
xor esi, esi
push esi
push esi
mov edi, ecx
push 0x100a66f0
mov dword [esp + 0x30], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1002c7f7
mov dword [edi + 0x1c], 1
or eax, eax
jmp 0x1002cc0d
xor eax, eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x40]
push eax
push esi
push ebx
mov dword [esp + 0x4c], 0x1c
mov dword [esp + 0x40], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x48], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x1002cbdc
mov edi, edi
push 0x1fe
lea edx, [esp + 0x62]
xor ecx, ecx
push esi
push edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x24], 4
mov word [esp + 0x68], cx
call fcn.10079c60
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
add esp, 0xc
lea eax, [esp + 0x18]
push eax
push 0x200
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x30]
push edx
push 9
lea eax, [esp + 0x54]
push eax
push ebx
call ebp
test eax, eax
je 0x1002cbba
lea ecx, [esp + 0x18]
push ecx
push 0x200
lea edx, [esp + 0x64]
push edx
lea eax, [esp + 0x30]
push eax
push esi
lea ecx, [esp + 0x54]
push ecx
push ebx
call ebp
test eax, eax
je 0x1002cbba
lea edx, [esp + 0x18]
push edx
push 0x200
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0x16
lea edx, [esp + 0x54]
push edx
push ebx
call ebp
cmp eax, esi
je 0x1002c9a3
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x60]
call fcn.10002500
mov dword [esp + 0x268], esi
mov ecx, dword [esp + 0x38]
push 0x100aaf68
push ecx
call fcn.10075d21
add esp, 8
cmp eax, esi
jne 0x1002c98f
lea edx, [esp + 0x18]
push edx
push 0x200
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x30]
push ecx
push 4
lea edx, [esp + 0x54]
push edx
push ebx
call ebp
cmp eax, esi
je 0x1002c98f
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x60]
call fcn.10002500
mov byte [esp + 0x268], 1
lea edi, [esp + 0x2c]
call fcn.1000fad0
mov eax, dword [esp + 0x2c]
cmp dword [eax - 0xc], esi
jl 0x1002c973
push 0x100aaf70
push eax
call fcn.10075f11
add esp, 8
cmp eax, esi
je 0x1002c973
sub eax, dword [esp + 0x2c]
sar eax, 1
cmp eax, 0xffffffff
jne 0x1002c97e
mov ecx, dword [esp + 0x20]
mov dword [ecx + 0x10], 1
mov byte [esp + 0x268], 0
lea ecx, [esp + 0x2c]
call fcn.100025b0
mov dword [esp + 0x268], 0xffffffff
lea ecx, [esp + 0x38]
call fcn.100025b0
lea edx, [esp + 0x18]
push edx
push 0x200
lea eax, [esp + 0x64]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0xe
lea edx, [esp + 0x54]
push edx
push ebx
call ebp
cmp eax, esi
je 0x1002cbba
push 0xf003f
push 2
push esi
push 1
lea eax, [esp + 0x50]
push eax
push ebx
mov dword [esp + 0x40], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x1002cbfc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x30]
push eax
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push str.MasterDeviceTimingMode
push ebp
call esi
test eax, eax
jne 0x1002cad7
mov edi, dword [esp + 0x5c]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x30]
push eax
push 0
push str.MasterDeviceType
push ebp
call esi
test eax, eax
jne 0x1002cad7
cmp dword [esp + 0x5c], 1
jne 0x1002cad7
test edi, edi
je 0x1002cad7
mov ecx, edi
call fcn.1002c120
cmp eax, 1
jne 0x1002cad7
mov ecx, dword [esp + 0x20]
cmp dword [ecx + 8], 0
mov dword [esp + 0x34], eax
jne 0x1002cad7
push eax
sub esp, 0x1c
mov edi, esp
push ebx
sub esp, 0x1c
mov ecx, 7
lea esi, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov eax, str.MasterDeviceTimingMode
mov ecx, esp
mov dword [esp + 0x5c], esp
call fcn.10006660
mov dword [esp + 0x2a8], 2
mov dword [esp + 0x2a8], 0xffffffff
mov ecx, dword [esp + 0x60]
mov edx, ebp
call fcn.1002c420
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x1002cac7
mov dword [esp + 0x1c], 1
jmp 0x1002cad7
mov dword [esp + 0x1c], 0
mov dword [esp + 0x30], 1
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0
push str.SlaveDeviceTimingMode
push ebp
call esi
test eax, eax
jne 0x1002cbb1
mov edi, dword [esp + 0x5c]
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x30]
push ecx
push 0
push str.SlaveDeviceType
push ebp
call esi
test eax, eax
jne 0x1002cbb1
cmp dword [esp + 0x5c], 1
jne 0x1002cbb1
test edi, edi
je 0x1002cbb1
mov ecx, edi
call fcn.1002c120
cmp eax, 1
jne 0x1002cbb1
mov edx, dword [esp + 0x20]
cmp dword [edx + 8], 0
mov dword [esp + 0x34], eax
jne 0x1002cbb1
push eax
sub esp, 0x1c
mov edi, esp
push ebx
sub esp, 0x1c
mov ecx, 7
lea esi, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov eax, str.SlaveDeviceTimingMode
mov ecx, esp
mov dword [esp + 0x5c], esp
call fcn.10006660
mov dword [esp + 0x2a8], 3
mov dword [esp + 0x2a8], 0xffffffff
mov ecx, dword [esp + 0x60]
mov edx, ebp
call fcn.1002c420
test eax, eax
je 0x1002cba1
mov dword [esp + 0x1c], 1
jmp 0x1002cbb1
mov dword [esp + 0x1c], 0
mov dword [esp + 0x30], 1
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x40]
inc eax
push ecx
push eax
push ebx
mov dword [esp + 0x48], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1002c840
mov edi, dword [esp + 0x20]
cmp ebx, esi
je 0x1002cbe7
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
cmp dword [edi + 8], esi
jne 0x1002cc09
mov eax, dword [esp + 0x30]
neg eax
sbb eax, eax
not eax
and eax, dword [esp + 0x1c]
jmp 0x1002cc0d
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
jmp 0x1002cc0d
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x260]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x248]
xor ecx, esp
call fcn.100755ed
add esp, 0x258
ret