Function at 0x4044a0
Capabilities:
Delete registry value
Persist via run registry key
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x141c
call fcn.00405b60
mov al, byte [0x408021]
push ebx
push ebp
push esi
cmp al, 0x32
mov esi, 1
je 0x4047fb
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0xc]
push eax
push 2
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call ebp
test eax, eax
jne 0x40451d
mov ecx, dword [esp + 0xc]
push str.wdcertm
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov bl, 0x31
je 0x4044fe
cmp byte [0x408021], bl
jne 0x4044fe
xor esi, esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x408021], bl
jne 0x404534
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x141c
ret
cmp byte [0x408021], 0x31
jne 0x404534
xor esi, esi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x141c
ret
lea eax, [esp + 0xc]
push eax
push 8
push 0
push str.SOFTWAREWatchDataProviderName
push 0x80000002
call ebp
test eax, eax
jne 0x4047fb
push edi
mov edi, 0x408940
or ecx, 0xffffffff
mov dword [esp + 0x20], eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x82c]
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x400
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x430]
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x4047ef
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push 1
lea ecx, [esp + 0x434]
push 0
push ecx
push edx
call ebp
test eax, eax
jne 0x4047c5
lea eax, [esp + 0x24]
lea ecx, [esp + 0xc2c]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x2c]
push ecx
push edx
push 0
push str.Version
push eax
mov dword [esp + 0x3c], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4047ba
lea esi, [esp + 0x82c]
lea eax, [esp + 0xc2c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40462b
test cl, cl
je 0x404627
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40462b
add eax, 2
add esi, 2
test cl, cl
jne 0x404607
xor eax, eax
jmp 0x404630
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x4047ba
lea eax, [esp + 0x42c]
lea ecx, [esp + 0x102c]
push eax
push str.SOFTWAREMicrosoftCryptographyDefaultsProvider
push str._s_s
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x14]
lea eax, [esp + 0x102c]
push edx
push 1
push 0
push eax
push 0x80000002
call ebp
test eax, eax
je 0x404691
lea ecx, [esp + 0x42c]
lea edx, [esp + 0x2c]
push ecx
push 0x409750
push str._sWatchData_s_
push edx
call ebx
add esp, 0x10
jmp 0x4046fb
lea eax, [esp + 0x18]
lea ecx, [esp + 0x2c]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
push edx
push 0
push str.Image_Path
push eax
mov dword [esp + 0x30], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x4046dc
lea ecx, [esp + 0x42c]
lea edx, [esp + 0x2c]
push ecx
push 0x409750
push str._sWatchData_s_
push edx
call ebx
add esp, 0x10
jmp 0x4046f0
lea eax, [esp + 0x2c]
push 0x5c
push eax
call dword [sym.imp.MSVCRT.dll_strrchr]
add esp, 8
mov byte [eax + 1], 0
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, str.wdcertm.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x30]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x4047ba
lea edi, [esp + 0x2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x14]
push ecx
push 6
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000002
call ebp
test eax, eax
jne 0x4047ba
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x2c]
push edx
push eax
push 1
push 0
push str.wdcertm
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4047af
lea edi, [esp + 0xc2c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x82c]
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x42c]
inc eax
push 0x400
push ecx
push eax
push edx
mov dword [esp + 0x30], eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x4045a5
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x141c
ret