Function at 0x406e58
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.004196e0
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 0x406e85
mov eax, 0x80070057
jmp 0x407226
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 0x406ea4
mov byte [ebp + 0x73], 1
jmp 0x406eba
cmp ax, 0x23
jne 0x406eb0
mov byte [ebp + 0x73], 2
jmp 0x406eba
cmp ax, 0x40
jne 0x406ebc
mov byte [ebp + 0x73], 3
add esi, ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push 0x401ee0
push esi
call ebx
test eax, eax
jne 0x406ed8
mov dword [ebp + 0x6c], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x406f2e
push 0x401ed4
push esi
call ebx
test eax, eax
jne 0x406eed
mov dword [ebp + 0x6c], SysReAllocString
jmp 0x406f2e
push 0x401ec8
push esi
call ebx
test eax, eax
jne 0x406f02
mov dword [ebp + 0x6c], SysReAllocString
jmp 0x406f2e
push 0x401ec0
push esi
call ebx
test eax, eax
jne 0x406f17
mov dword [ebp + 0x6c], VariantCopy
jmp 0x406f2e
push 0x401eb4
push esi
call ebx
test eax, eax
jne 0x407220
mov dword [ebp + 0x6c], VariantCopy
cmp byte [ebp + 0x73], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrW]
jbe 0x406f43
push 0x2c
push 0
push edi
call esi
jmp 0x406f4c
push 0x3d
push edi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov ebx, eax
test ebx, ebx
je 0x406f62
and word [ebx], 0
add ebx, 2
push ebx
call fcn.00406343
pop ecx
mov ebx, eax
push 0x5c
push 0
push edi
call esi
test eax, eax
je 0x407220
and word [eax], 0
add eax, 2
push eax
call fcn.00406343
cmp byte [ebp + 0x73], 0
mov esi, eax
pop ecx
mov dword [ebp + 0x5c], esi
jbe 0x407158
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, 0x401ea4
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 0x406ff3
lea ebx, [ebp - 0x104]
movzx eax, byte [ebp + 0x73]
dec eax
je 0x407108
dec eax
je 0x4070b3
dec eax
jne 0x407150
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 0x407150
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 0x4070a1
movzx eax, byte [ebp + esi - 0xd78]
push eax
lea eax, [ebp + 0x3c]
push 0x401e94
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 0x40706f
lea eax, [ebp - 0x1d78]
push eax
call fcn.00406343
pop ecx
jmp 0x40713e
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 0x407150
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 0x401e84
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x40713e
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 0x407150
lea eax, [ebp - 0x578]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
neg eax
sbb eax, eax
inc eax
jmp 0x407225
xor eax, eax
inc eax
jmp 0x407225
test ebx, ebx
je 0x4071fa
movzx eax, word [ebx]
test ax, ax
je 0x4071fa
cmp ax, 0x23
jne 0x40718a
add ebx, 2
push ebx
call fcn.00403470
pop ecx
push 4
mov dword [ebp + 0x68], eax
pop eax
push eax
lea ecx, [ebp + 0x68]
push ecx
push eax
jmp 0x4071ed
cmp ax, 0x40
jne 0x4071cb
xor esi, esi
inc ebx
inc ebx
push ebx
call fcn.00403470
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 0x4071bc
inc ebx
inc ebx
cmp esi, 0x104
jb 0x407194
push esi
lea eax, [ebp - 0x168]
push eax
push 3
push dword [ebp + 0x5c]
jmp 0x4071ee
cmp ax, 0x22
jne 0x4071e0
cmp word [ebx + 2], ax
jne 0x4071e0
push 0
push 0x401e80
jmp 0x4071eb
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 0x407225
cmp word [esi], 0x21
jne 0x407213
cmp word [esi + 2], 0
jne 0x407213
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
jmp 0x407225
push esi
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueW]
jmp 0x407225
mov eax, 0x80070057
pop ebx
pop edi
pop esi
add ebp, 0x74
leave
ret