Function at 0x49c727
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1030c
call fcn.004ae230
push esi
push edi
mov eax, dword [0x52a134]
mov dword [ebp - 0x1030c], eax
mov cl, byte [0x52a138]
mov byte [ebp - 0x10308], cl
mov ecx, 0x3e
xor eax, eax
lea edi, [ebp - 0x10307]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x218], 0
mov dword [ebp - 0x214], 0
mov edi, str.SYSTEMCurrentControlSetEnumUSBROOT_HUB
lea edx, [ebp - 0x210]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2bc]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x210]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49c7de
mov dword [ebp - 0x214], 1
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x2b4]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x2bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49c82c
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x214], 1
mov dword [ebp - 0x2ac], 0
jmp 0x49c847
mov eax, dword [ebp - 0x2ac]
add eax, 1
mov dword [ebp - 0x2ac], eax
cmp dword [ebp - 0x214], 0
jne 0x49ca20
mov ecx, dword [ebp - 0x2ac]
cmp ecx, dword [ebp - 0x2b4]
jae 0x49ca20
mov dword [ebp - 0x220], 0x80
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x2a0]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49c8bf
mov ecx, dword [ebp - 0x2bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov edi, str.SYSTEMCurrentControlSetEnumUSBROOT_HUB_
lea edx, [ebp - 0x1020c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2a0]
push ecx
lea edx, [ebp - 0x1020c]
push edx
call fcn.004ade40
add esp, 8
push 0x52a194
lea eax, [ebp - 0x1020c]
push eax
call fcn.004ade40
add esp, 8
lea ecx, [ebp - 0x2a4]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x1020c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49c954
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov dword [ebp - 0x2a8], 0xff
lea ecx, [ebp - 0x2a8]
push ecx
lea edx, [ebp - 0x108]
push edx
push 0
push 0
push 0x52a1a8
mov eax, dword [ebp - 0x2a4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49c9b2
mov ecx, dword [ebp - 0x2a4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov edi, 0x52a1b8
mov eax, dword [ebp - 0x218]
imul eax, eax, 0xff
lea ecx, [ebp + eax - 0x1010c]
mov edx, ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x104]
push ecx
mov edx, dword [ebp - 0x218]
imul edx, edx, 0xff
lea eax, [ebp + edx - 0x1010c]
push eax
call fcn.004ade40
add esp, 8
mov ecx, dword [ebp - 0x218]
add ecx, 1
mov dword [ebp - 0x218], ecx
jmp 0x49c838
cmp dword [ebp - 0x214], 0
jne 0x49ca43
mov edx, dword [ebp - 0x2a4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, str.SYSTEMCurrentControlSetEnumUSBROOT_HUB20
lea edx, [ebp - 0x210]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2bc]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x210]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49caa4
mov dword [ebp - 0x214], 1
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x2b4]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x2bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49caf2
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x214], 1
mov dword [ebp - 0x2ac], 0
jmp 0x49cb0d
mov eax, dword [ebp - 0x2ac]
add eax, 1
mov dword [ebp - 0x2ac], eax
cmp dword [ebp - 0x214], 0
jne 0x49cce6
mov ecx, dword [ebp - 0x2ac]
cmp ecx, dword [ebp - 0x2b4]
jae 0x49cce6
mov dword [ebp - 0x220], 0x80
lea edx, [ebp - 8]
push edx
push 0
push 0
push 0
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x2a0]
push ecx
mov edx, dword [ebp - 0x2ac]
push edx
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49cb85
mov ecx, dword [ebp - 0x2bc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov edi, str.SYSTEMCurrentControlSetEnumUSBROOT_HUB20_
lea edx, [ebp - 0x1020c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2a0]
push ecx
lea edx, [ebp - 0x1020c]
push edx
call fcn.004ade40
add esp, 8
push str.Device_Parameters
lea eax, [ebp - 0x1020c]
push eax
call fcn.004ade40
add esp, 8
lea ecx, [ebp - 0x2a4]
push ecx
push 0x20019
push 0
lea edx, [ebp - 0x1020c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49cc1a
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov dword [ebp - 0x2a8], 0xff
lea ecx, [ebp - 0x2a8]
push ecx
lea edx, [ebp - 0x108]
push edx
push 0
push 0
push 0x52a234
mov eax, dword [ebp - 0x2a4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2b8], 0
je 0x49cc78
mov ecx, dword [ebp - 0x2a4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x49ce31
mov edi, 0x52a244
mov eax, dword [ebp - 0x218]
imul eax, eax, 0xff
lea ecx, [ebp + eax - 0x1010c]
mov edx, ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x104]
push ecx
mov edx, dword [ebp - 0x218]
imul edx, edx, 0xff
lea eax, [ebp + edx - 0x1010c]
push eax
call fcn.004ade40
add esp, 8
mov ecx, dword [ebp - 0x218]
add ecx, 1
mov dword [ebp - 0x218], ecx
jmp 0x49cafe
cmp dword [ebp - 0x214], 0
jne 0x49cd09
mov edx, dword [ebp - 0x2a4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x2bc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x2ac], 0
jmp 0x49cd24
mov ecx, dword [ebp - 0x2ac]
add ecx, 1
mov dword [ebp - 0x2ac], ecx
mov edx, dword [ebp - 0x2ac]
cmp edx, dword [ebp - 0x218]
jae 0x49ce2b
push 0
push 0
push 3
push 0x52fd58
push 2
push 0x40000000
mov eax, dword [ebp - 0x2ac]
imul eax, eax, 0xff
lea ecx, [ebp + eax - 0x1010c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x10c], 0xffffffff
jne 0x49cd73
jmp 0x49cd15
mov edx, dword [ebp - 0x2ac]
imul edx, edx, 0xff
lea eax, [ebp + edx - 0x1010c]
mov edi, eax
mov edx, 0x52fb48
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov eax, ecx
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [ebp - 0x2b0]
push ecx
push 0x4c
lea edx, [ebp - 0x308]
push edx
push 0x4c
lea eax, [ebp - 0x308]
push eax
push 0x220408
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov dword [ebp - 0x21c], eax
cmp dword [ebp - 0x21c], 0
jne 0x49cdea
xor eax, eax
jmp 0x49ce31
push 0
mov dl, byte [ebp - 0x302]
push edx
mov eax, dword [ebp - 0x10c]
push eax
call fcn.0049be22
add esp, 0xc
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x10c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x110], 0
je 0x49ce26
mov eax, dword [ebp - 0x110]
jmp 0x49ce31
jmp 0x49cd15
mov eax, dword [ebp - 0x110]
pop edi
pop esi
mov esp, ebp
pop ebp
ret