Function at 0x404df4
Capabilities:
Delete registry key
Delete registry value
Query or enumerate registry value
Set environment variable
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x74]
mov eax, 0x1dec
call fcn.00412b10
push esi
mov esi, dword [ebp + 0x7c]
push edi
push 0x5c
push esi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov edi, eax
test edi, edi
jne 0x404e21
mov eax, 0x80070057
jmp 0x4051c2
and word [edi], 0
movzx eax, word [esi]
push 2
pop ecx
add edi, ecx
cmp ax, 0x24
mov dword [ebp + 0x68], edi
mov byte [ebp + 0x73], 0
jne 0x404e40
mov byte [ebp + 0x73], 1
jmp 0x404e56
cmp ax, 0x23
jne 0x404e4c
mov byte [ebp + 0x73], 2
jmp 0x404e56
cmp ax, 0x40
jne 0x404e58
mov byte [ebp + 0x73], 3
add esi, ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x401a94
push esi
call ebx
test eax, eax
jne 0x404e74
mov dword [ebp + 0x6c], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x404eca
push 0x401a88
push esi
call ebx
test eax, eax
jne 0x404e89
mov dword [ebp + 0x6c], SysStringLen
jmp 0x404eca
push 0x401a7c
push esi
call ebx
test eax, eax
jne 0x404e9e
mov dword [ebp + 0x6c], SysStringLen
jmp 0x404eca
push 0x401a74
push esi
call ebx
test eax, eax
jne 0x404eb3
mov dword [ebp + 0x6c], SysStringLen
jmp 0x404eca
push 0x401a68
push esi
call ebx
test eax, eax
jne 0x4051bc
mov dword [ebp + 0x6c], SysStringLen
cmp byte [ebp + 0x73], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrW]
jbe 0x404edf
push 0x2c
push 0
push edi
call esi
jmp 0x404ee8
push 0x3d
push edi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov ebx, eax
test ebx, ebx
je 0x404efe
and word [ebx], 0
add ebx, 2
push ebx
call fcn.004043d0
pop ecx
mov ebx, eax
push 0x5c
push 0
push edi
call esi
test eax, eax
je 0x4051bc
and word [eax], 0
add eax, 2
push eax
call fcn.004043d0
cmp byte [ebp + 0x73], 0
mov esi, eax
pop ecx
mov dword [ebp + 0x5c], esi
jbe 0x4050f4
xor esi, esi
push 0x40e
lea eax, [ebp - 0x576]
push esi
push eax
mov word [ebp - 0x578], si
call sub.MSVCRT.dll_memset
push 0x7ff
lea eax, [ebp - 0xd77]
push esi
push eax
mov byte [ebp - 0xd78], 0
call sub.MSVCRT.dll_memset
mov esi, 0x401a58
lea edi, [ebp - 0x104]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x92
xor esi, esi
lea eax, [ebp - 0xf6]
push esi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x24
cmp ebx, esi
jne 0x404f8f
lea ebx, [ebp - 0x104]
movzx eax, byte [ebp + 0x73]
dec eax
je 0x4050a4
dec eax
je 0x40504f
dec eax
jne 0x4050ec
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp - 0xd78]
push eax
lea eax, [ebp + 0x60]
push eax
push dword [ebp + 0x5c]
mov dword [ebp + 0x60], 3
push dword [ebp + 0x68]
mov dword [ebp + 0x64], 0x800
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x4050ec
push 7
pop ecx
mov word [ebp + 0x3c], si
lea edi, [ebp + 0x3e]
rep stosd dword es:[edi], eax
push 0xffe
stosw word es:[edi], ax
lea eax, [ebp - 0x1d76]
push esi
push eax
mov word [ebp - 0x1d78], si
call sub.MSVCRT.dll_memset
add esp, 0xc
cmp dword [ebp + 0x64], esi
jbe 0x40503d
movzx eax, byte [ebp + esi - 0xd78]
push eax
lea eax, [ebp + 0x3c]
push 0x401a48
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp + 0x3c]
push eax
lea eax, [ebp - 0x1d78]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc esi
cmp esi, dword [ebp + 0x64]
jb 0x40500b
lea eax, [ebp - 0x1d78]
push eax
call fcn.004043d0
pop ecx
jmp 0x4050da
push 4
pop eax
mov dword [ebp + 0x60], eax
mov dword [ebp + 0x64], eax
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp + 0x68]
push eax
lea eax, [ebp + 0x60]
push eax
push dword [ebp + 0x5c]
push dword [ebp + 0x68]
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x4050ec
push 0x9e
lea eax, [ebp - 0x62]
push esi
push eax
mov word [ebp - 0x64], si
call sub.MSVCRT.dll_memset
push dword [ebp + 0x68]
lea eax, [ebp - 0x64]
push 0x401a38
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x4050da
lea eax, [ebp + 0x64]
push eax
lea eax, [ebp - 0x578]
push eax
lea eax, [ebp + 0x60]
push eax
push dword [ebp + 0x5c]
mov dword [ebp + 0x60], 1
push dword [ebp + 0x68]
mov dword [ebp + 0x64], 0x208
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
test eax, eax
jne 0x4050ec
lea eax, [ebp - 0x578]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
neg eax
sbb eax, eax
inc eax
jmp 0x4051c1
xor eax, eax
inc eax
jmp 0x4051c1
test ebx, ebx
je 0x405196
movzx eax, word [ebx]
test ax, ax
je 0x405196
cmp ax, 0x23
jne 0x405126
add ebx, 2
push ebx
call fcn.00402b60
pop ecx
push 4
mov dword [ebp + 0x68], eax
pop eax
push eax
lea ecx, [ebp + 0x68]
push ecx
push eax
jmp 0x405189
cmp ax, 0x40
jne 0x405167
xor esi, esi
inc ebx
inc ebx
push ebx
call fcn.00402b60
pop ecx
push 0x20
mov byte [ebp + esi - 0x168], al
push ebx
inc esi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov ebx, eax
test ebx, ebx
je 0x405158
inc ebx
inc ebx
cmp esi, 0x104
jb 0x405130
push esi
lea eax, [ebp - 0x168]
push eax
push 3
push dword [ebp + 0x5c]
jmp 0x40518a
cmp ax, 0x22
jne 0x40517c
cmp word [ebx + 2], ax
jne 0x40517c
push 0
push 0x401a34
jmp 0x405187
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push ebx
push 1
push esi
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
jmp 0x4051c1
cmp word [esi], 0x21
jne 0x4051af
cmp word [esi + 2], 0
jne 0x4051af
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
jmp 0x4051c1
push esi
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueW]
jmp 0x4051c1
mov eax, 0x80070057
pop ebx
pop edi
pop esi
add ebp, 0x74
leave
ret