Function at 0x4046e0
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411eb8
push 0x410340
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], edi
lea eax, [ebp - 0x30]
push eax
push 0xf003f
push edi
mov ecx, dword [str.SOFTWAREMDCDriverInstall]
push ecx
push 0x80000002
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
call esi
test eax, eax
je 0x40476c
mov edx, dword [str.SOFTWAREMDCDriverInstall]
push edx
push str.CreateDelRunOnceKey
push str._s_____s_does_not_exist__do_nothing
push 6
call fcn.0040bbc0
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
add esp, 0x18
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [str.SOFTWAREMDCDriverInstall]
push ecx
push str.CreateDelRunOnceKey
push str._s_____s_exists__creating_DelAegisInst_RunOnce_Key
push 6
call fcn.0040bbc0
add esp, 0x10
lea edx, [ebp - 0x20]
push edx
push 0xf003f
push edi
mov eax, dword [0x4149e0]
push eax
push 0x80000002
call esi
test eax, eax
je 0x4047f8
push edi
lea ecx, [ebp - 0x20]
push ecx
push edi
push 0xf003f
push edi
push edi
push edi
mov edx, dword [0x4149e0]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4047f8
push str.CreateDelRunOnceKey
push str._s____failed_to_open_or_create_RunOnce_registry_key
push 6
call fcn.0040bbc0
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push str.CreateDelRunOnceKey
push str._s____RunOnce_registry_key_opened
push 6
call fcn.0040bbc0
add esp, 0xc
mov ecx, 0x459f88
call fcn.00408cc0
test eax, eax
jne 0x404829
push str.CreateDelRunOnceKey
push str._s____failed_to_get_system_path
jmp 0x404930
mov dword [ebp - 0x2c], 0x45a192
mov ecx, 0x459f88
call fcn.00408a30
test eax, eax
jne 0x404870
push str.CreateDelRunOnceKey
push str._s____failed_to_get_installer_path
push 6
call fcn.0040bbc0
push 0xffffffffffffffff
lea edx, [ebp - 0x10]
push edx
call sub.MSVCRT.dll__local_unwind2
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x28], 0x45afd8
push 0x45afd8
mov esi, dword [sym.imp.MSVCRT.dll_wcslen]
call esi
mov ebx, eax
push 0x45a192
call esi
lea eax, [ebx + eax + 0x19]
mov dword [ebp - 0x24], eax
lea ebx, [eax + eax]
push ebx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, edi
jne 0x4048cb
push 0xffffffffffffffff
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll__local_unwind2
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
xor eax, eax
mov edi, esi
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
push 0x45afd8
push 0x45a192
push str.__scmd.exe___c_del__f__q__s
push esi
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0x10
push esi
push str.CreateDelRunOnceKey
push str._s____Set_RunOnce_registry_with_RunOnce_command_line:__s
push 6
call fcn.0040bbc0
add esp, 0x10
push ebx
push esi
push 1
push 0
push str.DelAegisInst
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x404958
push str.CreateDelRunOnceKey
push str._s____failed_to_set_registry_key_value
push 6
call fcn.0040bbc0
push 0xffffffffffffffff
lea ecx, [ebp - 0x10]
push ecx
call sub.MSVCRT.dll__local_unwind2
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
call fcn.0040497d
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret