Function at 0x40ee60
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411f95
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x422040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0x414244
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x40eea5
xor al, al
jmp 0x40f087
mov ecx, dword [esi + 0x10]
mov edi, 0x7ffffffe
mov eax, edi
sub eax, ecx
cmp eax, 0x34
jb 0x40f0a3
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x40eec4
mov eax, dword [esi]
push ecx
push eax
push 0x34
push str.RegistryMachineSystemCurrentControlSetServices_
push ecx
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x48]
call fcn.00409050
mov dword [ebp - 4], 0
lea eax, [ebp - 0x48]
cmp dword [ebp - 0x34], 7
cmova eax, dword [ebp - 0x48]
push eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov eax, dword [esi + 0x10]
sub edi, eax
cmp edi, 0x22
jb 0x40f0a8
cmp dword [esi + 0x14], 7
jbe 0x40ef0c
mov esi, dword [esi]
push eax
push esi
push 0x22
push str.SYSTEMCurrentControlSetServices_
push ecx
push dword [ebp - 0x4c]
lea ecx, [ebp - 0x28]
call fcn.00409050
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x4c]
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
push ecx
cmova eax, dword [ebp - 0x28]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x40ef4f
cmp eax, 2
sete bl
jmp 0x40efff
push dword [ebp - 0x4c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.NtUnloadDriver
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x30]
push ecx
call eax
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
add esp, 4
mov edx, str.___NtUnloadDriver_Status_0x
mov esi, eax
call fcn.00406130
push 0x401220
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::ios_base_____cdecl___class_std::ios_base___]
push esi
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___long_int_]
push 0x406100
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
test esi, esi
je 0x40efde
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.____Driver_Unload_Failed__
call fcn.00406130
push 0x406100
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
xor bl, bl
jmp 0x40efff
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteTreeW]
test eax, eax
je 0x40effd
xor bl, bl
jmp 0x40efff
mov bl, 1
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x40f035
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f02b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f075
push ecx
push edx
call fcn.0040fe5c
add esp, 8
mov ecx, dword [ebp - 0x34]
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
cmp ecx, 7
jbe 0x40f085
mov edx, dword [ebp - 0x48]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40f07b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40f07b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0040fe5c
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040fd39
mov esp, ebp
pop ebp
ret
call fcn.00401170
call fcn.00401170
int3