Function at 0x10019ed
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1006074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x3c], 1
jne 0x1001a22
mov dword [ebp - 0x24], 0x57
jmp 0x1001bad
push 4
push ebx
push ebx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, 0xffffffff
mov dword [ebp - 0x28], eax
jne 0x1001a43
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
jmp 0x1001bad
lea ecx, [ebp - 0x20]
push ecx
push ebx
push eax
mov dword [ebp - 0x20], 0x1c
mov dword [ebp - 0x38], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x1001ba4
push esi
push edi
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
call edi
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x1001aa3
call esi
cmp eax, 0x7a
mov dword [ebp - 0x24], eax
je 0x1001aa3
cmp eax, 0xd
jne 0x1001ba2
jmp 0x1001be0
push dword [ebp - 0x2c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 0x34], eax
je 0x1001bfd
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x44]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x28]
call edi
test eax, eax
je 0x1001bfd
call esi
cmp eax, 0xd
je 0x1001be0
push dword [ebp - 0x34]
push dword [ebp - 0x40]
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x1001bd7
push 0x20019
push 1
push ebx
push 1
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x28]
mov dword [ebp - 0x30], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov edi, eax
cmp edi, 0xffffffff
je 0x1001bfd
lea eax, [ebp - 0x30]
push eax
push ebx
push ebx
push ebx
push 0x10012b0
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0x30], ebx
je 0x1001c04
push dword [ebp - 0x30]
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov esi, eax
lea eax, [ebp - 0x30]
push eax
push esi
push ebx
push ebx
push 0x10012b0
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1001b5e
sub eax, edi
je 0x1001bcf
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x1001bc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
mov dword [ebp - 0x24], eax
je 0x1001bcf
push esi
mov dword [ebp - 0x3c], ebx
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop esi
push dword [ebp - 0x28]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x3c]
xor ecx, ebp
pop ebx
call fcn.01003ba3
leave
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc dword [ebp - 0x38]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x38]
push dword [ebp - 0x28]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1001a63
jmp 0x1001ba2
call esi
mov dword [ebp - 0x24], eax
jmp 0x1001ba2
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1001ba2