Function at 0x405300
Capabilities:
Delete registry value

Disassembly:
push 0xffffffffffffffff
push 0x4287db
mov eax, dword fs:[0]
push eax
sub esp, 0x144
mov eax, dword [0x43e6bc]
xor eax, esp
mov dword [esp + 0x140], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x43e6bc]
xor eax, esp
push eax
lea eax, [esp + 0x158]
mov dword fs:[0], eax
call fcn.0040d647
xor ecx, ecx
xor edi, edi
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x405357
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x1c], esi
push 4
push edi
push edi
push edi
mov dword [esp + 0x170], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4053b9
push str.Error_:_SetupDiGetClassDevs_error...
call fcn.00403d60
lea eax, [esi - 0x10]
add esp, 4
mov dword [esp + 0x160], ebx
lea ecx, [eax + 0xc]
or edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4053af
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x4e26
jmp 0x405651
lea ecx, [esp + 0x38]
push ecx
push edi
push ebx
mov dword [esp + 0x44], 0x1c
mov dword [esp + 0x38], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x405614
lea ebx, [ebx]
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyA]
lea edx, [esp + 0x14]
push edx
push edi
push edi
lea eax, [esp + 0x3c]
push eax
push 1
lea ecx, [esp + 0x4c]
push ecx
push ebx
xor ebp, ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x50], edi
call esi
test eax, eax
jne 0x405466
mov edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0xd
je 0x4055ee
call edi
cmp eax, 0x7a
jne 0x4055ee
test ebp, ebp
je 0x405437
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [esp + 0x14]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, dword [esp + 0x14]
mov ebp, eax
lea eax, [esp + 0x14]
push eax
push ecx
push ebp
lea edx, [esp + 0x3c]
push edx
push 1
lea eax, [esp + 0x4c]
push eax
push ebx
call esi
test eax, eax
je 0x405410
xor edi, edi
cmp byte [ebp], 0
mov esi, ebp
je 0x4055e5
mov ecx, dword [esp + 0x14]
add ecx, ebp
cmp esi, ecx
jae 0x4055e5
push esi
call fcn.004160db
lea edx, [esp + 0x28]
push edx
push esi
mov dword [esp + 0x30], edi
call fcn.00402c00
add esp, 0xc
test eax, eax
je 0x4055a1
push esi
lea eax, [esp + 0x20]
push str.Info__:_Find_device__ID:__s..._n
push eax
call fcn.004034f0
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00403d60
push 0xff
lea edx, [esp + 0x68]
push edi
push edx
call fcn.00416150
lea eax, [esp + 0x70]
push eax
lea ecx, [esp + 0x58]
push ecx
push ebx
call fcn.00402680
push str.mi_
push esi
call fcn.00415c20
add esp, 0x30
test eax, eax
je 0x405545
test byte [esp + 0x24], 1
je 0x405545
push str.Info__:_pnp2.3_device_is_in_used__keep_filter__n
call fcn.00403d60
add esp, 4
push edi
lea edx, [esp + 0x2c]
push edx
push edi
push 0x2001f
push edi
push edi
push edi
push str.SYSTEMCurrentControlSetServicesew_buslwrfilter
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, edi
jne 0x40553e
mov eax, dword [esp + 0x28]
push str.McfSelectConfig
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [0x461330], 1
lea edx, [esp + 0x54]
push 0x42b0f0
push edx
call fcn.00415c20
add esp, 8
test eax, eax
je 0x4055e5
mov eax, dword [esp + 0x4c]
push edi
push eax
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], edi
call dword [sym.imp.SETUPAPI.dll_CM_Get_Child]
mov ecx, dword [esp + 0x18]
cmp ecx, edi
je 0x405592
push edi
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
mov ecx, dword [esp + 0x18]
cmp eax, edi
jne 0x4055c0
cmp ecx, edi
je 0x4055c0
test byte [esp + 0x20], 8
je 0x4055c0
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [esi + eax + 1], 0
lea esi, [esi + eax + 1]
jne 0x405472
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4055f0
sub esp, 0x1c
mov edi, esp
mov ecx, 7
lea esi, [esp + 0x54]
push ebx
rep movsd dword es:[edi], dword [esi]
call fcn.00403fb0
push str.Info__:_This_device_has_no_child_device__so_delete_it._n
call fcn.00403d60
add esp, 0x24
xor edi, edi
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4055f0
xor edi, edi
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
add eax, 1
push ecx
push eax
push ebx
mov dword [esp + 0x38], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4053e0
mov esi, dword [esp + 0x1c]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push str.Info__:_Remove_device_register_Info__END..._n
call fcn.00403d60
lea eax, [esi - 0x10]
add esp, 4
mov dword [esp + 0x160], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40564f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x158]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x140]
xor ecx, esp
call fcn.0041613d
add esp, 0x150
ret