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

Disassembly:
push 0xffffffffffffffff
push 0x42b2e1
mov eax, dword fs:[0]
push eax
sub esp, 0x348
mov eax, dword [0x4424ac]
xor eax, esp
mov dword [esp + 0x344], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4424ac]
xor eax, esp
push eax
lea eax, [esp + 0x35c]
mov dword fs:[0], eax
xor esi, esi
push 0xfe
lea eax, [esp + 0x55]
push esi
push eax
mov dword [esp + 0x28], esi
mov byte [esp + 0x5c], 0
call fcn.00418350
push 0x103
lea ecx, [esp + 0x265]
push esi
push ecx
mov byte [esp + 0x26c], 0
call fcn.00418350
add esp, 0x18
lea edx, [esp + 0x1c]
push edx
push 0x20019
push esi
mov eax, 0x104
push str.SYSTEMCurrentControlSetControlusbflags
push 0x80000002
mov dword [esp + 0x40], eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, esi
jne 0x405bf0
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x3c]
push esi
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x27c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x405a3a
push eax
push str.CleanRegUsbFlagInfo
push str._s_Number_of_subkeys:__d_n
call fcn.00404950
mov ebp, 1
add esp, 0xc
cmp dword [esp + 0x18], ebp
jb 0x405a3a
mov ebx, dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x20]
push esi
push esi
push esi
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x64]
push ecx
push ebp
push edx
mov dword [esp + 0x50], 0xff
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
cmp eax, esi
jne 0x405a2b
call fcn.0040f25f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
je 0x405c1a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x50]
mov dword [esp + 0x364], esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x405911
sub eax, edx
push eax
lea ecx, [esp + 0x54]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004032e0
lea ecx, [esp + 0x14]
call fcn.004035b0
mov edi, dword [esp + 0x14]
push str.12d1
push edi
call fcn.00417550
add esp, 8
test eax, eax
jne 0x405972
push str.18d1
push edi
call fcn.00417550
add esp, 8
test eax, eax
jne 0x405972
push str.05c6
push edi
call fcn.00417550
add esp, 8
test eax, eax
je 0x405a04
call fcn.0040f25f
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
je 0x405c1a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x2c]
push str.SYSTEMCurrentControlSetControlusbflags_s
push edx
mov byte [esp + 0x370], 1
call fcn.00403e50
mov esi, dword [esp + 0x34]
add esp, 0xc
push esi
push 0x80000002
call ebx
test eax, eax
jne 0x4059e0
push esi
push str.CleanRegUsbFlagInfo
push str._s_Found__s_in_UsbFlag_Delete_OK_n
call fcn.00404950
add esp, 0xc
sub ebp, 1
sub dword [esp + 0x18], 1
lea eax, [esi - 0x10]
mov byte [esp + 0x364], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x364], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 1
xor esi, esi
cmp ebp, dword [esp + 0x18]
jbe 0x4058b1
mov eax, dword [esp + 0x20]
cmp eax, esi
je 0x405be5
push eax
push str._nNumber_of_values:__d_n
call fcn.00404950
add esp, 8
xor ebp, ebp
cmp dword [esp + 0x20], esi
jbe 0x405be5
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov eax, dword [esp + 0x1c]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x164]
push edx
push ebp
push eax
mov dword [esp + 0x44], 0x104
mov byte [esp + 0x170], 0
call ebx
test eax, eax
jne 0x405bd8
call fcn.0040f25f
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x405c1a
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea eax, [esp + 0x150]
mov dword [esp + 0x364], 2
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x405ad4
sub eax, edx
push eax
lea ecx, [esp + 0x154]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004032e0
mov esi, dword [esp + 0x14]
mov edi, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x405b17
push edi
lea ecx, [esp + 0x18]
call fcn.00402980
mov esi, dword [esp + 0x14]
lea edx, [edi + 1]
push edx
push esi
call fcn.00418507
push eax
call fcn.00401000
add esp, 0xc
test edi, edi
jl 0x405c24
cmp edi, dword [esi - 8]
jg 0x405c24
push str.ignorehwsernum12d1
mov dword [esi - 0xc], edi
push esi
mov byte [edi + esi], 0
call fcn.00417550
add esp, 8
test eax, eax
jne 0x405b78
push str.ignorehwsernum05c6
push esi
call fcn.00417550
add esp, 8
test eax, eax
jne 0x405b78
push str.ignorehwsernum18d1
push esi
call fcn.00417550
add esp, 8
test eax, eax
je 0x405bb1
lea eax, [esp + 0x150]
push eax
push str.SYSTEMCurrentControlSetControlusbflags
push 0x80000002
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueA]
test eax, eax
jne 0x405bb1
lea ecx, [esp + 0x150]
push ecx
push str.CleanRegUsbFlagInfo
push str._s_Found_Value:_s_in_UsbFlag_Delete_it_OK_n
call fcn.00404950
add esp, 0xc
sub ebp, 1
lea eax, [esi - 0x10]
mov dword [esp + 0x364], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405bd8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add ebp, 1
cmp ebp, dword [esp + 0x20]
jb 0x405a66
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov ecx, dword [esp + 0x35c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x344]
xor ecx, esp
call fcn.00417b3b
add esp, 0x354
ret
push 0x80004005
call fcn.00401090
push 0x80070057
call fcn.00401090
int3