Function at 0x405600
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x45ea07
mov eax, dword fs:[0]
push eax
mov eax, 0x2fb4
call fcn.0044bf30
mov eax, dword [0x47b038]
xor eax, esp
mov dword [esp + 0x2fb0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47b038]
xor eax, esp
push eax
lea eax, [esp + 0x2fc8]
mov dword fs:[0], eax
mov esi, dword [esp + 0x2fd8]
mov eax, dword [esp + 0x2fdc]
mov ebp, ecx
mov ecx, dword [esp + 0x2fe0]
xor ebx, ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x28], esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x2c], ebx
mov byte [esp + 0x17], bl
cmp dword [ebp + 0x438], ebx
jne 0x40567f
xor eax, eax
jmp 0x405dc9
cmp byte [ebp + 0x43c], bl
jne 0x405692
push ebx
push ebx
push 1
mov ecx, ebp
call fcn.00401c90
test byte [esp + 0x2fe4], 2
mov eax, 4
je 0x4056a6
mov eax, 6
mov edx, dword [ebp + 0x438]
push ebx
push ebx
push ebx
push eax
push ebx
push ebx
push ebx
call edx
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, 0xffffffff
je 0x405da5
push ebx
push esi
push ebx
lea eax, [esp + 0x50]
push eax
push ebx
push edi
mov ecx, ebp
mov dword [esp + 0x50], ebx
call fcn.00401cc0
cmp eax, ebx
je 0x405d97
cmp eax, 1
jne 0x405d6f
push esi
push str.FOUND___s__n
call fcn.0043e2c0
push 0x3fe
lea edx, [esp + 0x27c2]
xor ecx, ecx
push ebx
push edx
mov byte [esp + 0x2b], 1
mov word [esp + 0x27c8], cx
call fcn.0044ac90
add esp, 0x14
lea eax, [esp + 0x24]
push eax
push 0x104
lea ecx, [esp + 0x27bc]
push ecx
lea edx, [esp + 0x48]
push edx
push 0xc
lea eax, [esp + 0x58]
push eax
push edi
mov dword [esp + 0x40], 0x104
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
mov dword [esp + 0x1c], eax
cmp eax, ebx
jne 0x4059d4
mov eax, dword [ebp + 4]
cmp dword [eax], 0x17
jl 0x4059d4
push 0x206
lea edx, [esp + 0x2bba]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x2bc0], cx
call fcn.0044ac90
add esp, 0xc
push ebx
push 0x104
lea eax, [esp + 0x2bbc]
push eax
lea ecx, [esp + 0x50]
push ecx
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
setne al
test al, al
je 0x4059d4
cmp word [esp + 0x2bb4], bx
je 0x4059d4
push 8
call fcn.0044ad7f
add esp, 4
mov dword [esp + 0x18], eax
mov dword [esp + 0x2fd0], ebx
cmp eax, ebx
je 0x4057da
mov ecx, eax
call fcn.004156c0
mov dword [esp + 0x18], eax
jmp 0x4057de
mov dword [esp + 0x18], ebx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x2fd0], 0xffffffff
call fcn.004156f0
cmp eax, ebx
jne 0x4059b8
mov esi, dword [0x461cc4]
mov edi, dword [0x461cc8]
mov ebp, dword [0x461ccc]
mov ebx, dword [0x461cd0]
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x23ae]
push eax
mov word [esp + 0x23b0], dx
call fcn.0044ac90
add esp, 0xc
push 1
push 0
lea ecx, [esp + 0x23ac]
push ecx
mov ecx, dword [0x462080]
sub esp, 0x14
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x462084]
mov dword [eax + 4], ecx
mov ecx, dword [0x462088]
mov dword [eax + 8], ecx
mov ecx, dword [0x46208c]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x462090]
mov dword [eax + 0x10], ecx
mov ecx, dword [0x461cd4]
lea edx, [esp + 0x2bd4]
push edx
sub esp, 0x14
mov eax, esp
mov dword [eax], esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebp
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ecx
mov ecx, dword [esp + 0x50]
push str.ProviderMicrosoft.Base.PnP
call fcn.00415a50
lea eax, [esp + 0x23a4]
push eax
push str.PKEY_PNPX_WIA_FRIENDLY_NAME____s__n
call fcn.0043e2c0
add esp, 8
cmp word [esp + 0x23a4], 0
je 0x4058dd
xor eax, eax
movzx ecx, word [esp + eax + 0x23a4]
mov word [esp + eax + 0x27b4], cx
add eax, 2
test cx, cx
jne 0x4058c0
jmp 0x4059a8
push str.Still_nothing__try_registry_n
call fcn.0043e2c0
mov edx, dword [esp + 0x24]
add esp, 4
push 0x20019
push 2
push 0
push 1
lea ecx, [esp + 0x54]
push ecx
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x21a6]
push ecx
mov word [esp + 0x21a8], ax
call fcn.0044ac90
add esp, 0xc
cmp esi, 0xffffffff
je 0x40596c
push 0x20019
lea edx, [esp + 0x21a0]
push edx
push str.FriendlyName
push 0x4626e4
push esi
call fcn.0044a470
add esp, 0x14
test eax, eax
je 0x405965
lea eax, [esp + 0x219c]
push eax
push str.FriendlyName____s__n
call fcn.0043e2c0
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [esp + 0x219c], 0
je 0x4059b0
push str.found__use_this_one_n
call fcn.0043e2c0
add esp, 4
xor eax, eax
jmp 0x405990
movzx ecx, word [esp + eax + 0x219c]
mov word [esp + eax + 0x27b4], cx
add eax, 2
test cx, cx
jne 0x405990
mov dword [esp + 0x1c], 1
mov ebp, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
test esi, esi
je 0x4059d0
mov ecx, esi
call fcn.004156d0
push esi
call fcn.0044ad0a
add esp, 4
mov esi, dword [esp + 0x28]
xor bl, bl
cmp word [esp + 0x27b4], 0
jne 0x405a01
test esi, esi
je 0x405a08
lea edx, [esp + 0x27b4]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4059f0
jmp 0x405a08
cmp dword [esp + 0x1c], 0
je 0x405a37
mov esi, dword [esp + 0x34]
test esi, esi
je 0x405a45
lea ecx, [esp + 0x27b4]
push ecx
push esi
call fcn.0044b362
add esp, 8
test eax, eax
jne 0x405a3b
push esi
push str.__Found_Friendly_name___s__n
call fcn.0043e2c0
add esp, 8
mov bl, 1
jmp 0x405a3b
mov esi, dword [esp + 0x34]
test esi, esi
je 0x405a45
cmp word [esi], 0
jne 0x405a47
mov bl, 1
lea edx, [esp + 0x24]
push edx
push 0x104
lea eax, [esp + 0x27bc]
push eax
lea ecx, [esp + 0x48]
push ecx
push 1
lea edx, [esp + 0x58]
push edx
push edi
mov dword [esp + 0x40], 0x104
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x405d51
mov esi, dword [esp + 0x40]
test esi, esi
je 0x405d51
lea eax, [esp + 0x27b4]
push eax
push esi
call fcn.0044b362
add esp, 8
test eax, eax
jne 0x405d51
push esi
push str.__Found_HWID___s__n
call fcn.0043e2c0
add esp, 8
test bl, bl
je 0x405d62
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x25b6]
push edx
mov word [esp + 0x25b8], cx
call fcn.0044ac90
add esp, 0xc
push 0xf003f
push 2
push 0
push 1
lea eax, [esp + 0x54]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
cmp esi, 0xffffffff
je 0x405b2c
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x25b0]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.InfPath
push esi
mov dword [esp + 0x3c], 0x104
mov dword [esp + 0x34], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x44]
push ecx
push edi
push 5
call dword [sym.imp.SETUPAPI.dll_SetupDiCallClassInstaller]
test eax, eax
je 0x405d3b
xor ebx, ebx
mov esi, 1
mov dword [esp + 0x2c], esi
cmp word [esp + 0x25ac], bx
je 0x405d6f
push 0x206
lea eax, [esp + 0x1f9a]
xor edx, edx
push ebx
push eax
mov word [esp + 0x1fa0], dx
call fcn.0044ac90
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x25b8]
push ecx
add edx, 0x218
push edx
lea eax, [esp + 0x1fa8]
push str._sInf_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
push ebx
lea ecx, [esp + 0x1f98]
push ecx
mov ecx, dword [ebp + 4]
call fcn.004421d0
test al, al
je 0x405d6f
push 0x4fc8
call fcn.0044ad7f
add esp, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2fd0], esi
cmp eax, ebx
je 0x405bed
push ebx
lea edx, [esp + 0x1f98]
push edx
mov ecx, eax
call fcn.0043f710
mov esi, eax
mov dword [esp + 0x18], esi
jmp 0x405bf3
mov dword [esp + 0x18], ebx
mov esi, ebx
mov dword [esp + 0x2fd0], 0xffffffff
cmp esi, ebx
je 0x405d6f
lea ecx, [esp + 0x60]
call fcn.00404ba0
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x60]
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x2fd8], 2
call fcn.00441470
cmp eax, ebx
je 0x405d15
mov eax, dword [esp + 0x1f50]
mov dword [esp + 0x1c], eax
test eax, eax
jle 0x405ccc
mov edx, dword [esp + 0x1f4c]
mov eax, dword [edx + ebx*8]
mov ecx, dword [eax + 4]
mov edx, dword [esp + 0x1f34]
mov ecx, dword [edx + ecx*8]
add eax, 0x210
push eax
push ecx
lea eax, [esp + 0x2dc4]
push 0x461a90
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
xor esi, esi
add esp, 0x10
cmp dword [ebp + 0x444], esi
jle 0x405cc1
jmp 0x405c90
mov ecx, dword [ebp + 0x440]
mov edi, dword [ecx + esi*8]
lea edx, [esp + 0x2dbc]
push edx
push edi
call fcn.0044b362
add esp, 8
test eax, eax
jne 0x405cb4
dec dword [edi + 0x208]
inc esi
cmp esi, dword [ebp + 0x444]
jl 0x405c90
mov edi, dword [esp + 0x20]
inc ebx
cmp ebx, dword [esp + 0x1c]
jl 0x405c46
xor esi, esi
cmp dword [ebp + 0x444], esi
jle 0x405d11
jmp 0x405ce0
mov eax, dword [ebp + 0x440]
mov edi, dword [eax + esi*8]
lea ecx, [esp + 0x1f94]
push ecx
push edi
call fcn.0044b362
add esp, 8
test eax, eax
jne 0x405d04
dec dword [edi + 0x208]
inc esi
cmp esi, dword [ebp + 0x444]
jl 0x405ce0
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ecx, esi
call fcn.00440470
push esi
call fcn.0044ad0a
add esp, 4
lea ecx, [esp + 0x60]
mov dword [esp + 0x2fd0], 0xffffffff
call fcn.00404d70
jmp 0x405d6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetupDiCallClassInstaller2___ld__n
call fcn.0043e2c0
add esp, 8
jmp 0x405d6f
push str.bHwIdMatch_is_not_match_n
call fcn.0043e2c0
add esp, 4
test bl, bl
jne 0x405d6f
push str.bFriendNameMatch_is_not_match_n
call fcn.0043e2c0
add esp, 4
mov esi, dword [esp + 0x28]
mov eax, dword [esp + 0x38]
xor ebx, ebx
push ebx
push esi
push ebx
lea edx, [esp + 0x50]
inc eax
push edx
push eax
push edi
mov ecx, ebp
mov dword [esp + 0x50], eax
call fcn.00401cc0
cmp eax, ebx
jne 0x4056e1
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
cmp byte [esp + 0x17], 0
jne 0x405dad
mov dword [esp + 0x2c], 1
cmp byte [ebp + 0x43c], 0
jne 0x405dc5
mov eax, dword [esp + 0x2c]
push ebx
push eax
push 2
mov ecx, ebp
call fcn.00401c90
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x2fc8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2fb0]
xor ecx, esp
call fcn.0044ac80
add esp, 0x2fc0
ret 0x10