Function at 0x40b5c4
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.00420160
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 0x40b5f1
mov eax, 0x80070057
jmp 0x40b992
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 0x40b610
mov byte [ebp + 0x73], 1
jmp 0x40b626
cmp ax, 0x23
jne 0x40b61c
mov byte [ebp + 0x73], 2
jmp 0x40b626
cmp ax, 0x40
jne 0x40b628
mov byte [ebp + 0x73], 3
add esi, ecx
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
push 0x402680
push esi
call ebx
test eax, eax
jne 0x40b644
mov dword [ebp + 0x6c], reloc.OLEAUT32.dll_SysReAllocString
jmp 0x40b69a
push 0x402674
push esi
call ebx
test eax, eax
jne 0x40b659
mov dword [ebp + 0x6c], SysStringLen
jmp 0x40b69a
push 0x402668
push esi
call ebx
test eax, eax
jne 0x40b66e
mov dword [ebp + 0x6c], SysStringLen
jmp 0x40b69a
push 0x402660
push esi
call ebx
test eax, eax
jne 0x40b683
mov dword [ebp + 0x6c], SysStringLen
jmp 0x40b69a
push 0x402654
push esi
call ebx
test eax, eax
jne 0x40b98c
mov dword [ebp + 0x6c], SysStringLen
cmp byte [ebp + 0x73], 0
mov esi, dword [sym.imp.SHLWAPI.dll_StrRChrW]
jbe 0x40b6af
push 0x2c
push 0
push edi
call esi
jmp 0x40b6b8
push 0x3d
push edi
call dword [sym.imp.SHLWAPI.dll_StrChrW]
mov ebx, eax
test ebx, ebx
je 0x40b6ce
and word [ebx], 0
add ebx, 2
push ebx
call fcn.0040ac04
pop ecx
mov ebx, eax
push 0x5c
push 0
push edi
call esi
test eax, eax
je 0x40b98c
and word [eax], 0
add eax, 2
push eax
call fcn.0040ac04
cmp byte [ebp + 0x73], 0
mov esi, eax
pop ecx
mov dword [ebp + 0x5c], esi
jbe 0x40b8c4
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, 0x402644
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 0x40b75f
lea ebx, [ebp - 0x104]
movzx eax, byte [ebp + 0x73]
dec eax
je 0x40b874
dec eax
je 0x40b81f
dec eax
jne 0x40b8bc
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 0x40b8bc
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 0x40b80d
movzx eax, byte [ebp + esi - 0xd78]
push eax
lea eax, [ebp + 0x3c]
push 0x402634
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 0x40b7db
lea eax, [ebp - 0x1d78]
push eax
call fcn.0040ac04
pop ecx
jmp 0x40b8aa
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 0x40b8bc
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 0x402624
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
lea eax, [ebp - 0x64]
jmp 0x40b8aa
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 0x40b8bc
lea eax, [ebp - 0x578]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_SetEnvironmentVariableW]
neg eax
sbb eax, eax
inc eax
jmp 0x40b991
xor eax, eax
inc eax
jmp 0x40b991
test ebx, ebx
je 0x40b966
movzx eax, word [ebx]
test ax, ax
je 0x40b966
cmp ax, 0x23
jne 0x40b8f6
add ebx, 2
push ebx
call fcn.00403b00
pop ecx
push 4
mov dword [ebp + 0x68], eax
pop eax
push eax
lea ecx, [ebp + 0x68]
push ecx
push eax
jmp 0x40b959
cmp ax, 0x40
jne 0x40b937
xor esi, esi
inc ebx
inc ebx
push ebx
call fcn.00403b00
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 0x40b928
inc ebx
inc ebx
cmp esi, 0x104
jb 0x40b900
push esi
lea eax, [ebp - 0x168]
push eax
push 3
push dword [ebp + 0x5c]
jmp 0x40b95a
cmp ax, 0x22
jne 0x40b94c
cmp word [ebx + 2], ax
jne 0x40b94c
push 0
push 0x402620
jmp 0x40b957
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 0x40b991
cmp word [esi], 0x21
jne 0x40b97f
cmp word [esi + 2], 0
jne 0x40b97f
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
jmp 0x40b991
push esi
push edi
push dword [ebp + 0x6c]
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueW]
jmp 0x40b991
mov eax, 0x80070057
pop ebx
pop edi
pop esi
add ebp, 0x74
leave
ret