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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x414a1e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
push esi
push edi
mov dword [ebp - 0x204], ecx
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x1d0], 0
mov dword [ebp - 0x1d8], 0xff
mov eax, dword [str.EnumUSBPORTS]
mov dword [ebp - 0x1cc], eax
mov ecx, dword [0x41a230]
mov dword [ebp - 0x1c8], ecx
mov edx, dword [0x41a234]
mov dword [ebp - 0x1c4], edx
mov ax, word [0x41a238]
mov word [ebp - 0x1c0], ax
mov ecx, 0x1c
xor eax, eax
lea edi, [ebp - 0x1be]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xb
mov esi, str.SystemCurrentControlSetServicesClassPorts
lea edi, [ebp - 0x148]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [ebp - 0x14c], 0
lea ecx, [ebp - 0x1e4]
push ecx
push 0xf003f
push 0
lea edx, [ebp - 0x1cc]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40249d
lea eax, [ebp - 0x1cc]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov ecx, dword [ebp - 0x1e4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4024a4
xor eax, eax
jmp 0x4028db
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x204]
mov eax, dword [edx + 0x6c]
push eax
mov ecx, dword [ebp - 0x204]
mov edx, dword [ecx + 0x68]
push edx
push str.VID__sPID__s
lea eax, [ebp - 0x1cc]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x1e4]
push ecx
push 0xf003f
push 0
lea edx, [ebp - 0x148]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4028d6
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1d0]
push eax
lea ecx, [ebp - 0x114]
push ecx
push 0
push 0
push 0
mov edx, dword [ebp - 0x1e4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
mov eax, dword [ebp - 0x1d0]
add eax, 1
push eax
call fcn.0040cfe4
add esp, 4
mov dword [ebp - 0x1f0], eax
mov ecx, dword [ebp - 0x1f0]
mov dword [ebp - 0x1e8], ecx
lea edx, [ebp - 0x148]
push edx
call fcn.00404ed0
add esp, 4
mov ecx, dword [ebp - 0x1d0]
lea edx, [eax + ecx + 2]
push edx
call fcn.0040cfe4
add esp, 4
mov dword [ebp - 0x1f4], eax
mov eax, dword [ebp - 0x1f4]
mov dword [ebp - 0x1d4], eax
mov ecx, 1
test ecx, ecx
je 0x402597
mov dword [ebp - 0x208], 0
jmp 0x4025b1
mov edx, dword [ebp - 0x114]
push edx
push str.number_of_key:_d_n_n
call fcn.00404140
add esp, 8
mov dword [ebp - 0x208], eax
mov dword [ebp - 0x1dc], 0
jmp 0x4025cc
mov eax, dword [ebp - 0x1dc]
add eax, 1
mov dword [ebp - 0x1dc], eax
mov ecx, dword [ebp - 0x1dc]
cmp ecx, dword [ebp - 0x114]
jae 0x402893
mov edx, dword [ebp - 0x1d0]
add edx, 1
mov dword [ebp - 0x1e0], edx
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1e0]
push eax
mov ecx, dword [ebp - 0x1e8]
push ecx
mov edx, dword [ebp - 0x1dc]
sub edx, dword [ebp - 0x14c]
push edx
mov eax, dword [ebp - 0x1e4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
test eax, eax
jne 0x40288e
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x148]
push ecx
mov edx, dword [ebp - 0x1d4]
push edx
call fcn.00405520
add esp, 8
push 0x41a290
mov eax, dword [ebp - 0x1d4]
push eax
call fcn.00405530
add esp, 8
mov ecx, dword [ebp - 0x1e8]
push ecx
mov edx, dword [ebp - 0x1d4]
push edx
call fcn.00405530
add esp, 8
lea eax, [ebp - 0x10]
push eax
push 0xf003f
push 0
mov ecx, dword [ebp - 0x1d4]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40285f
mov edx, 1
test edx, edx
je 0x4026a7
mov dword [ebp - 0x20c], 0
jmp 0x4026c1
mov eax, dword [ebp - 0x1d4]
push eax
push str.Success_open_key:_s_n
call fcn.00404140
add esp, 8
mov dword [ebp - 0x20c], eax
push str.None
lea ecx, [ebp - 0x110]
push ecx
call fcn.00405520
add esp, 8
mov dword [ebp - 0x1d8], 0xff
lea edx, [ebp - 0x1d8]
push edx
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x118]
push ecx
push 0
push str.MatchingDeviceId
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40282b
mov eax, 1
test eax, eax
je 0x402722
mov dword [ebp - 0x210], 0
jmp 0x40273c
lea ecx, [ebp - 0x110]
push ecx
push str.__Value:_s_n
call fcn.00404140
add esp, 8
mov dword [ebp - 0x210], eax
lea edx, [ebp - 0x110]
push edx
call fcn.004053e1
add esp, 4
push eax
lea ecx, [ebp - 0x1ec]
call fcn.0040d2f3
mov dword [ebp - 4], 0
lea eax, [ebp - 0x1cc]
push eax
lea ecx, [ebp - 0x1ec]
call fcn.0040cbce
cmp eax, 0xffffffff
je 0x402817
mov ecx, dword [ebp - 0x1d4]
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x4027c8
mov edx, dword [ebp - 0x14c]
add edx, 1
mov dword [ebp - 0x14c], edx
mov eax, 1
test eax, eax
je 0x4027b3
mov dword [ebp - 0x214], 0
jmp 0x4027c6
push str.__Key_deleted_n
call fcn.00404140
add esp, 4
mov dword [ebp - 0x214], eax
jmp 0x402817
mov ecx, 1
test ecx, ecx
je 0x4027dd
mov dword [ebp - 0x218], 0
jmp 0x4027f0
push str.__Key_deleted_fail_n
call fcn.00404140
add esp, 4
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x1f8], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.0040d285
mov eax, dword [ebp - 0x1f8]
jmp 0x4028db
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ec]
call fcn.0040d285
jmp 0x402853
mov edx, 1
test edx, edx
je 0x402840
mov dword [ebp - 0x21c], 0
jmp 0x402853
push str.__RegQueryValueEx___fail_n
call fcn.00404140
add esp, 4
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40288e
mov ecx, 1
test ecx, ecx
je 0x402874
mov dword [ebp - 0x220], 0
jmp 0x40288e
mov edx, dword [ebp - 0x1d4]
push edx
push str.Fail_open_key:_s_n
call fcn.00404140
add esp, 8
mov dword [ebp - 0x220], eax
jmp 0x4025bd
mov eax, dword [ebp - 0x1e8]
mov dword [ebp - 0x1fc], eax
mov ecx, dword [ebp - 0x1fc]
push ecx
call fcn.0040d00d
add esp, 4
mov edx, dword [ebp - 0x1d4]
mov dword [ebp - 0x200], edx
mov eax, dword [ebp - 0x200]
push eax
call fcn.0040d00d
add esp, 4
mov ecx, dword [ebp - 0x1e4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret