Function at 0x401890
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x684
mov eax, dword [0x41f004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0x624]
push edi
push eax
push 0x20019
push 0
push str.SYSTEMCurrentControlSetEnumUSB
push 0x80000002
call esi
test eax, eax
jne 0x401b86
push 0x104
push eax
lea eax, [ebp - 0x510]
push eax
call fcn.00405010
add esp, 0xc
mov dword [ebp - 0x634], 0x104
lea eax, [ebp - 0x67c]
mov dword [ebp - 0x620], 0
push eax
lea eax, [ebp - 0x648]
push eax
lea eax, [ebp - 0x64c]
push eax
lea eax, [ebp - 0x650]
push eax
lea eax, [ebp - 0x654]
push eax
lea eax, [ebp - 0x658]
push eax
lea eax, [ebp - 0x65c]
push eax
lea eax, [ebp - 0x620]
push eax
push 0
lea eax, [ebp - 0x634]
push eax
lea eax, [ebp - 0x510]
push eax
push dword [ebp - 0x624]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov ecx, dword [ebp - 0x620]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ecx, ecx
je 0x401b79
xor eax, eax
mov dword [ebp - 0x630], eax
test ecx, ecx
je 0x401b79
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
nop word [eax + eax]
lea ecx, [ebp - 0x67c]
mov dword [ebp - 0x638], 0xff
push ecx
push 0
push 0
push 0
lea ecx, [ebp - 0x638]
push ecx
lea ecx, [ebp - 0x208]
push ecx
push eax
push dword [ebp - 0x624]
call edi
test eax, eax
jne 0x401b60
lea eax, [ebp - 0x208]
push eax
push str.SYSTEMCurrentControlSetEnumUSB
lea eax, [ebp - 0x108]
push str._s_s
push eax
call fcn.00401050
add esp, 0x10
lea eax, [ebp - 0x62c]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call esi
test eax, eax
jne 0x401b60
mov esi, dword [ebp - 0x62c]
push 0x104
push eax
lea eax, [ebp - 0x618]
mov dword [ebp - 0x644], esi
push eax
call fcn.00405010
add esp, 0xc
mov dword [ebp - 0x63c], 0x104
lea eax, [ebp - 0x684]
mov dword [ebp - 0x61c], 0
push eax
lea eax, [ebp - 0x660]
push eax
lea eax, [ebp - 0x664]
push eax
lea eax, [ebp - 0x668]
push eax
lea eax, [ebp - 0x66c]
push eax
lea eax, [ebp - 0x670]
push eax
lea eax, [ebp - 0x674]
push eax
lea eax, [ebp - 0x61c]
push eax
push 0
lea eax, [ebp - 0x63c]
push eax
lea eax, [ebp - 0x618]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [ebp - 0x61c]
test eax, eax
je 0x401b45
xor esi, esi
test eax, eax
je 0x401b45
nop word [eax + eax]
lea eax, [ebp - 0x684]
mov dword [ebp - 0x640], 0xff
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x640]
push eax
lea eax, [ebp - 0x308]
push eax
push esi
push dword [ebp - 0x644]
call edi
test eax, eax
jne 0x401b38
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x408]
push str._s_s
push eax
call fcn.00401050
add esp, 0x10
lea eax, [ebp - 0x628]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x408]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x401b38
mov ecx, dword [ebp - 0x628]
call fcn.00401ba0
push dword [ebp - 0x628]
mov edi, eax
call ebx
cmp edi, 1
je 0x401b97
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
inc esi
cmp esi, dword [ebp - 0x61c]
jb 0x401aa0
xor esi, esi
push dword [ebp - 0x62c]
call ebx
cmp esi, 1
je 0x401b86
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [ebp - 0x630]
inc eax
mov dword [ebp - 0x630], eax
cmp eax, dword [ebp - 0x620]
jb 0x401980
push dword [ebp - 0x624]
call ebx
call fcn.004023d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403f9d
mov esp, ebp
pop ebp
ret
mov esi, 1
jmp 0x401b47