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

Disassembly:
sub esp, 0x624
lea eax, [esp + 4]
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0xf003f
push 0
push str.EnumPCI
push 0x80000002
call edi
test eax, eax
jne 0x403bc5
lea ecx, [esp + 0x2c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push ecx
mov ecx, dword [esp + 0x18]
push eax
push eax
push eax
lea edx, [esp + 0x34]
lea eax, [esp + 0x44]
push edx
push eax
mov esi, 0x200
push 0
push ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], 1
call ebx
test eax, eax
jne 0x403bba
mov ebp, dword [esp + 0x63c]
lea edx, [esp + 0x34]
mov dword [esp + 0x1c], esi
push edx
mov dword [esp + 0x2c], esi
call fcn.004037c0
add esp, 4
test eax, eax
je 0x403b86
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
push eax
push 0xf003f
lea ecx, [esp + 0x3c]
push 0
push ecx
push edx
call edi
test eax, eax
jne 0x403b86
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x14]
push 0
push 0
push 0
lea edx, [esp + 0x244]
push ecx
push edx
push 0
push eax
mov esi, 1
call ebx
test eax, eax
jne 0x403b5e
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push ecx
push 0xf003f
lea edx, [esp + 0x23c]
push 0
push edx
push eax
call edi
test eax, eax
jne 0x403b2b
lea ecx, [esp + 0x28]
lea edx, [esp + 0x434]
push ecx
push edx
push eax
push eax
mov eax, dword [esp + 0x28]
push str.Driver
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x403ab7
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x1c], 0x200
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x403b33
lea edi, [esp + 0x434]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x434]
repne scasb al, byte es:[edi]
not ecx
add ecx, 0xfffffffb
push ecx
push edx
call fcn.00404670
mov ecx, dword [esp + 0x640]
push ecx
push eax
call fcn.00404410
add esp, 0x10
test eax, eax
je 0x403af1
test ebp, ebp
jne 0x403b1a
mov edx, dword [esp + 0x18]
push edx
call fcn.00403c00
mov ecx, dword [esp + 0x14]
add esp, 4
lea eax, [esp + 0x234]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
dec esi
test ebp, ebp
jne 0x403bd2
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [esp + 0x1c], 0x200
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x1c]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x244]
mov eax, esi
push edx
mov edx, dword [esp + 0x24]
push ecx
push eax
push edx
inc esi
call ebx
test eax, eax
je 0x403a5c
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebp, ebp
jne 0x403b81
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
dec dword [esp + 0x20]
mov esi, 0x200
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x24]
mov eax, ecx
inc ecx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x2c]
push ecx
push 0
push 0
push 0
lea ecx, [esp + 0x44]
push edx
mov edx, dword [esp + 0x28]
push ecx
push eax
push edx
mov dword [esp + 0x44], esi
call ebx
test eax, eax
je 0x4039f1
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x624
ret
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x624
ret