Function at 0x1001c12
Capabilities:
Delete registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x1006074]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
or dword [ebp - 0x128], 0xffffffff
push esi
xor esi, esi
cmp eax, esi
mov dword [ebp - 0x144], eax
jne 0x1001c4b
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1001e73
push 4
push esi
push esi
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
cmp eax, 0xffffffff
mov dword [ebp - 0x128], eax
je 0x1001e73
lea eax, [ebp - 0x124]
push eax
push esi
push dword [ebp - 0x128]
mov dword [ebp - 0x124], 0x1c
mov dword [ebp - 0x134], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x1001e73
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push edi
mov edi, dword [sym.imp.msvcrt.dll_sprintf]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
xor eax, eax
lea ecx, [ebp - 0x130]
push ecx
push eax
push eax
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x13c]
push eax
push 4
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x128]
call esi
test eax, eax
jne 0x1001ceb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1001ceb
cmp eax, 0xd
jne 0x1001e71
jmp 0x1001e39
push dword [ebp - 0x130]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 0x138], eax
je 0x1001e71
lea ecx, [ebp - 0x130]
push ecx
push dword [ebp - 0x130]
push eax
lea eax, [ebp - 0x13c]
push eax
push 4
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x128]
call esi
test eax, eax
je 0x1001e62
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xd
je 0x1001e39
push dword [ebp - 0x138]
push dword [ebp - 0x144]
call dword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
pop ecx
pop ecx
jne 0x1001e2d
and dword [ebp - 0x12c], eax
push 0x20019
push 1
push eax
push 1
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x128]
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x140], esi
je 0x1001e71
lea eax, [ebp - 0x12c]
push eax
xor eax, eax
push eax
push eax
push eax
push 0x10012b0
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 0x12c], 0
je 0x1001e6a
push dword [ebp - 0x12c]
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov esi, eax
lea eax, [ebp - 0x12c]
push eax
push esi
push 0
push 0
push 0x10012b0
push dword [ebp - 0x140]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push esi
lea eax, [ebp - 0x108]
push 0x10012f0
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call ebx
push esi
lea eax, [ebp - 0x108]
push 0x10012bc
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x108]
push eax
push 0x80000002
call ebx
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [ebp - 0x138]
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc dword [ebp - 0x134]
lea eax, [ebp - 0x124]
push eax
push dword [ebp - 0x134]
push dword [ebp - 0x128]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x1001c9f
jmp 0x1001e71
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1001e71
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x128], 0xffffffff
mov esi, eax
je 0x1001e90
push dword [ebp - 0x128]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [ebp - 4]
xor eax, eax
test esi, esi
setne al
xor ecx, ebp
pop esi
call fcn.01003ba3
leave
ret 4