Function at 0x403ef0
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, 0x1420
call fcn.00405290
mov al, byte [0x408021]
push ebx
push ebp
push esi
cmp al, 0x32
mov esi, 1
je 0x404224
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 0x403f6d
mov ecx, dword [esp + 0xc]
push str.wdcertm
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
mov bl, 0x31
je 0x403f4e
cmp byte [0x408021], bl
jne 0x403f4e
xor esi, esi
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [0x408021], bl
jne 0x403f84
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1420
ret
cmp byte [0x408021], 0x31
jne 0x403f84
xor esi, esi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1420
ret
lea eax, [esp + 0xc]
push eax
push 8
push 0
push str.SOFTWAREWatchDataProviderName
push 0x80000002
call ebp
test eax, eax
jne 0x404224
mov dword [esp + 0x1c], eax
mov cl, byte [eax + 0x408830]
mov byte [esp + eax + 0x82c], cl
inc eax
test cl, cl
jne 0x403fa5
mov edx, dword [esp + 0xc]
push edi
lea ecx, [esp + 0x430]
push 0x400
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x40421c
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push 1
lea ecx, [esp + 0x438]
push 0
push ecx
push edx
call ebp
test eax, eax
jne 0x4041f2
lea eax, [esp + 0x2c]
lea ecx, [esp + 0xc30]
push eax
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x28]
push ecx
push edx
push 0
push str.Version
push eax
mov dword [esp + 0x44], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4041e5
lea esi, [esp + 0x830]
lea eax, [esp + 0xc30]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x40406c
test cl, cl
je 0x404068
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x40406c
add eax, 2
add esi, 2
test cl, cl
jne 0x404048
xor eax, eax
jmp 0x404071
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x4041e5
lea eax, [esp + 0x430]
lea ecx, [esp + 0x1030]
push eax
push str.SOFTWAREMicrosoftCryptographyDefaultsProvider
push str._s_s
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x14]
lea eax, [esp + 0x1030]
push edx
push 1
push 0
push eax
push 0x80000002
call ebp
test eax, eax
je 0x4040d2
lea ecx, [esp + 0x430]
lea edx, [esp + 0x30]
push ecx
push 0x4095d8
push str._sWatchData_s_
push edx
call ebx
add esp, 0x10
jmp 0x404138
lea eax, [esp + 0x18]
lea ecx, [esp + 0x30]
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x28]
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 0x40411d
lea ecx, [esp + 0x430]
lea edx, [esp + 0x30]
push ecx
push 0x4095d8
push str._sWatchData_s_
push edx
call ebx
add esp, 0x10
jmp 0x404131
lea eax, [esp + 0x30]
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 edi
mov edi, str.wdcertm.exe
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x30]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
lea eax, [esp + 0x34]
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
jne 0x4041e5
lea edi, [esp + 0x30]
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 0x4041e5
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x30]
push edx
push eax
push 1
push 0
push str.wdcertm
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4041da
mov cl, byte [esp + eax + 0xc30]
mov byte [esp + eax + 0x830], cl
inc eax
test cl, cl
jne 0x4041c7
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call edi
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x430]
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 0x403fe6
mov eax, dword [esp + 0x10]
push eax
call edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1420
ret