Function at 0x40a777
Capabilities:
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [0x49f2a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x41c], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x43c], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x440], eax
xor ebx, ebx
lea eax, [ebp - 0x108]
push str.SnapshotAddDriver
push eax
mov dword [ebp - 0x430], 1
mov dword [ebp - 0x418], ebx
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x428], ebx
call fcn.00450c76
pop ecx
pop ecx
mov esi, 0x104
push esi
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.___total_physical_size__lu_MB_GetWindowsDirectoryA]
push eax
lea eax, [ebp - 0x310]
push eax
push edi
call fcn.00450f08
add esp, 0xc
test eax, eax
jne 0x40a825
lea eax, [ebp - 0x108]
push str.SYSTEM
push eax
call fcn.00450c76
pop ecx
pop ecx
push 4
pop edi
jmp 0x40a8e2
push edi
push str._s_system32config_system
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00450d91
add esp, 0x10
test eax, eax
jns 0x40a847
xor eax, eax
inc eax
jmp 0x40acaa
push 4
pop edi
lea eax, [ebp - 0x20c]
push edi
push eax
call fcn.00450d79
pop ecx
pop ecx
cmp eax, 0xffffffff
jne 0x40a885
lea eax, [ebp - 0x20c]
push eax
push str.The_registry_file__s_is_not_readable.
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x168
push str.ADDDRIVER
call fcn.0044dc85
add esp, 0x14
jmp 0x40a83f
xor esi, esi
push str.SeRestorePrivilege
inc esi
push esi
call fcn.0040a51d
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x108]
push eax
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegLoadKeyA]
test eax, eax
je 0x40a8dc
lea eax, [ebp - 0x20c]
push eax
push str.Loading_registry__s_failed
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x170
push str.ADDDRIVER
call fcn.0044dc85
add esp, 0x14
mov eax, esi
jmp 0x40acaa
mov dword [ebp - 0x438], esi
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x108]
push eax
push str._sSelect
mov dword [ebp - 0x424], ebx
mov dword [ebp - 0x420], ebx
mov dword [ebp - 0x434], edi
call fcn.0042f614
pop ecx
pop ecx
push eax
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegOpenKeyA]
mov esi, dword [sym.imp.ical_size__lu_MB_RegQueryValueExA]
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x418]
push eax
push ebx
push ebx
push str.Current
push dword [ebp - 0x424]
call esi
test eax, eax
je 0x40a985
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x418]
push eax
push ebx
push ebx
push str.Default
push dword [ebp - 0x424]
call esi
test eax, eax
je 0x40a985
push str.Cant_get_active_Control_Set.
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x17d
push str.ADDDRIVER
call fcn.0044dc85
add esp, 0x10
jmp 0x40abf1
push dword [ebp - 0x418]
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x414]
push str._sControlSet_03u
push eax
call fcn.00450c76
add esp, 0x10
lea eax, [ebp - 0x420]
push eax
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
mov esi, str._sControlSet_03uServices_s
push eax
push esi
call fcn.0042f614
add esp, 0x10
push eax
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegCreateKeyA]
test eax, eax
je 0x40aa11
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
push eax
push esi
call fcn.0042f614
add esp, 0x10
push eax
push str.Creating_new__s_key_failed
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x187
jmp 0x40ab98
mov esi, dword [sym.imp.ical_size__lu_MB_RegSetValueExA]
push edi
lea eax, [ebp - 0x418]
push eax
push edi
push ebx
push str.Start
push dword [ebp - 0x420]
mov dword [ebp - 0x418], ebx
call esi
push edi
lea eax, [ebp - 0x418]
push eax
push edi
push ebx
push str.ErrorControl
push dword [ebp - 0x420]
call esi
push edi
lea eax, [ebp - 0x418]
push eax
push edi
push ebx
push str.Type
push dword [ebp - 0x420]
mov dword [ebp - 0x418], 1
call esi
push dword [ebp - 0x41c]
mov dword [ebp - 0x430], ebx
call fcn.0040a73b
cmp eax, 1
jne 0x40abf1
lea eax, [ebp - 0x42c]
push eax
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
push eax
push str._sControlSet_03uServices_sParameters
call fcn.0042f614
add esp, 0x10
push eax
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegCreateKeyA]
test eax, eax
je 0x40aaf4
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
push eax
push str._sControlSet_03uServices_sParameters
call fcn.0042f614
add esp, 0x10
push eax
push str.Creating_new_key___s__failed
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x19d
jmp 0x40ab98
push edi
lea eax, [ebp - 0x418]
push eax
push edi
push ebx
push str.BusType
push dword [ebp - 0x42c]
mov dword [ebp - 0x418], 8
call esi
push dword [ebp - 0x418]
test eax, eax
jne 0x40abe5
push str.additional_value__u_for__BusType__added
call fcn.0041c7ee
pop ecx
pop ecx
lea eax, [ebp - 0x428]
push eax
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
push eax
push str._sControlSet_03uServices_sPnpInterface
call fcn.0042f614
add esp, 0x10
push eax
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegCreateKeyA]
test eax, eax
je 0x40aba7
push dword [ebp - 0x41c]
lea eax, [ebp - 0x108]
push dword [ebp - 0x418]
push eax
push str._sControlSet_03uServices_sPnpInterface
call fcn.0042f614
add esp, 0x10
push eax
push str.Creating_new_key___s__failed
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x1ae
push str.ADDDRIVER
call fcn.0044dc85
add esp, 0x14
jmp 0x40abf1
push edi
lea eax, [ebp - 0x418]
push eax
push edi
push ebx
push 0x46987c
push dword [ebp - 0x428]
mov dword [ebp - 0x418], 1
call esi
test eax, eax
jne 0x40abd9
push dword [ebp - 0x418]
push str.Setting_value_to__u_for__PnpInterface5_
jmp 0x40abea
push str.Cant_set_value_for__PnpInterface5_
call fcn.0041c7ee
jmp 0x40abf0
push str.Cant_set_value_to__u_for__BusType_
call fcn.0041c7ee
pop ecx
pop ecx
mov esi, dword [sym.imp.ical_size__lu_MB_RegCloseKey]
cmp dword [ebp - 0x424], ebx
je 0x40ac07
push dword [ebp - 0x424]
call esi
cmp dword [ebp - 0x420], ebx
je 0x40ac17
push dword [ebp - 0x420]
call esi
cmp dword [ebp - 0x42c], ebx
je 0x40ac27
push dword [ebp - 0x42c]
call esi
cmp dword [ebp - 0x428], ebx
je 0x40ac37
push dword [ebp - 0x428]
call esi
cmp dword [ebp - 0x430], ebx
jne 0x40ac63
push dword [ebp - 0x440]
lea eax, [ebp - 0x414]
push dword [ebp - 0x43c]
push dword [ebp - 0x41c]
push eax
call fcn.0040a5ad
mov dword [ebp - 0x430], eax
cmp dword [ebp - 0x438], ebx
je 0x40aca4
push str.SnapshotAddDriver
push reloc.lu_heads___lu_sectors___lu_byte_Ordinal_2
call dword [sym.imp.ical_size__lu_MB_RegUnLoadKeyA]
test eax, eax
je 0x40aca4
lea eax, [ebp - 0x20c]
push eax
push str.Unloading_registry__s_failed
call dword [sym.imp.___total_physical_size__lu_MB_GetLastError]
push eax
push 0x1ca
push str.ADDDRIVER
call fcn.0044dc85
add esp, 0x14
mov eax, dword [ebp - 0x430]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00450b32
leave
ret 0x10