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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5785ab
mov eax, dword fs:[0]
push eax
mov eax, 0x11a4
call fcn.0054d370
mov eax, dword [0x5e5620]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [0x5ebc68]
mov esi, ecx
mov eax, dword [ecx + 0x25a0]
test eax, eax
cmovne esi, eax
xor edi, edi
mov dword [ebp - 0x11b0], esi
cmp dword [ecx + 0x224], edi
je 0x409536
push 0x104
lea eax, [ebp - 0xa60]
push eax
lea eax, [ecx + 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x208
lea eax, [ebp - 0x240]
push edi
push eax
call fcn.0054ee80
add esp, 0xc
mov dword [ebp - 0x1198], edi
lea eax, [ebp - 0x11a4]
mov dword [ebp - 0x11a4], edi
push eax
push 0x5c06d0
xor eax, eax
inc eax
push eax
push edi
push 0x5c06f0
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409101
mov ecx, dword [ebp - 0x11a4]
test ecx, ecx
je 0x409101
mov eax, dword [ecx]
lea edx, [ebp - 0x858]
push edi
push 0x104
push edx
push ecx
call dword [eax + 0x10]
lea eax, [ebp - 0xe70]
mov dword [ebp - 0xe74], eax
lea ecx, [ebp - 0xe74]
lea eax, [ebp - 0x858]
push eax
call fcn.0040842d
push dword [ebp - 0xe74]
lea eax, [ebp - 0x240]
mov dword [ebp - 4], edi
push 0x104
push eax
call fcn.00552893
mov eax, dword [ebp - 0x11a4]
lea edx, [ebp - 0x18]
add esp, 0xc
mov dword [ebp - 0x18], 8
mov ecx, dword [eax]
push edi
push edx
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x14]
sub eax, edi
je 0x4090c4
sub eax, 1
je 0x4090b8
sub eax, 1
je 0x4090ac
sub eax, 1
je 0x4090a0
sub eax, 1
je 0x409094
sub eax, 1
jne 0x4090ce
mov dword [ebp - 0x1198], 6
jmp 0x4090ce
mov dword [ebp - 0x1198], 5
jmp 0x4090ce
mov dword [ebp - 0x1198], 4
jmp 0x4090ce
mov dword [ebp - 0x1198], 3
jmp 0x4090ce
mov dword [ebp - 0x1198], 2
jmp 0x4090ce
mov dword [ebp - 0x1198], 1
mov eax, dword [ebp - 0x11a4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0xe70]
cmp dword [ebp - 0xe74], eax
je 0x409271
push dword [ebp - 0xe74]
call fcn.00560aa1
pop ecx
jmp 0x409271
xor eax, eax
lea edi, [ebp - 0x38]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x11a0]
push eax
push 0x20019
xor edi, edi
push edi
push str.Control_PanelDesktop
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4091b2
lea eax, [ebp - 0x119c]
mov dword [ebp - 0x119c], 0x208
push eax
lea eax, [ebp - 0x240]
push eax
push edi
push edi
push str.Wallpaper
push dword [ebp - 0x11a0]
call ebx
push 0x14
pop edi
lea eax, [ebp - 0x119c]
mov dword [ebp - 0x119c], edi
push eax
lea eax, [ebp - 0x38]
push eax
push 0
push 0
push str.TileWallpaper
push dword [ebp - 0x11a0]
call ebx
lea eax, [ebp - 0x119c]
mov dword [ebp - 0x119c], edi
push eax
lea eax, [ebp - 0x24]
xor edi, edi
push eax
push edi
push edi
push str.WallpaperStyle
push dword [ebp - 0x11a0]
call ebx
push dword [ebp - 0x11a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x38]
push 0x58b360
push eax
call fcn.005602ba
pop ecx
pop ecx
test eax, eax
jne 0x4091d5
mov dword [ebp - 0x1198], 2
jmp 0x409271
lea eax, [ebp - 0x24]
push 0x58aeb0
push eax
call fcn.005602ba
pop ecx
pop ecx
test eax, eax
je 0x409267
lea eax, [ebp - 0x24]
push 0x58b364
push eax
call fcn.005602ba
pop ecx
pop ecx
test eax, eax
jne 0x409209
mov dword [ebp - 0x1198], 3
jmp 0x409271
lea eax, [ebp - 0x24]
push 0x58b368
push eax
call fcn.005602ba
pop ecx
pop ecx
test eax, eax
jne 0x409229
mov dword [ebp - 0x1198], 4
jmp 0x409271
lea eax, [ebp - 0x24]
push 0x58b36c
push eax
call fcn.005602ba
pop ecx
pop ecx
test eax, eax
jne 0x409249
mov dword [ebp - 0x1198], 5
jmp 0x409271
lea eax, [ebp - 0x24]
push 0x58b374
push eax
call fcn.005602ba
mov dword [ebp - 0x1198], 6
pop ecx
pop ecx
test eax, eax
je 0x409271
mov dword [ebp - 0x1198], 1
push 0x208
lea eax, [ebp - 0x448]
push edi
push eax
call fcn.0054ee80
add esp, 0xc
mov dword [ebp - 0x11a8], 0x208
lea eax, [ebp - 0x11a8]
push eax
lea eax, [ebp - 0x448]
push eax
push edi
push edi
push str.Wallpaper
push dword [0x5ebc50]
call ebx
lea eax, [ebp - 0x11a8]
mov dword [ebp - 0x11ac], edi
push eax
lea eax, [ebp - 0x11ac]
mov dword [ebp - 0x11a8], 4
push eax
push edi
push edi
push str.WallpaperPos
push dword [0x5ebc50]
call ebx
lea eax, [ebp - 0x448]
push eax
lea eax, [ebp - 0xa60]
push eax
call fcn.00552def
pop ecx
pop ecx
test eax, eax
jne 0x409328
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.Wallpaper
push dword [0x5ebc50]
call esi
push str.WallpaperPos
push dword [0x5ebc50]
call esi
mov esi, dword [ebp - 0x11b0]
xor eax, eax
mov word [ebp - 0x448], ax
mov dword [ebp - 0x11ac], edi
push 0x104
lea eax, [ebp - 0x650]
push eax
push str.AppData
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x409445
push str.MicrosoftWindowsThemesTranscodedWallpaper
lea eax, [ebp - 0x650]
push 0x104
push eax
call fcn.00560020
lea eax, [ebp - 0x240]
push eax
lea eax, [ebp - 0x650]
push eax
call fcn.00552def
add esp, 0x14
test eax, eax
jne 0x409445
mov dword [ebp - 0x11a0], 0x320
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
push 0x2001f
push str.Control_PanelDesktop
push SysReAllocStringLen
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], 1
call fcn.00408671
test eax, eax
jne 0x40943d
lea eax, [ebp - 0x11a0]
push eax
lea eax, [ebp - 0x1194]
push eax
lea eax, [ebp - 0x11b0]
push eax
push edi
push str.TranscodedImageCache
push dword [ebp - 0x1c]
call ebx
test eax, eax
jne 0x40943d
cmp dword [ebp - 0x11b0], 3
jne 0x40943d
cmp dword [ebp - 0x11a0], 0x320
jne 0x40943d
mov eax, 0xc37a
cmp word [ebp - 0x1194], ax
jne 0x40943d
xor eax, eax
inc eax
cmp word [ebp - 0x1192], ax
jne 0x40943d
lea eax, [ebp - 0x117c]
push eax
lea ecx, [ebp - 0x119c]
call fcn.004073be
push dword [eax]
lea eax, [ebp - 0x240]
push 0x104
push eax
call fcn.00552893
mov ecx, dword [ebp - 0x119c]
add esp, 0xc
lea ecx, [ecx - 0x10]
call fcn.00408abd
lea ecx, [ebp - 0x1c]
call fcn.004074cb
mov ebx, 0x104
lea eax, [ebp - 0xc68]
push ebx
push eax
lea eax, [esi + 0x43c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0xc68]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.00552def
pop ecx
pop ecx
test eax, eax
jne 0x4094ad
cmp dword [ebp - 0x1198], 2
jne 0x4094ad
lea eax, [ebp - 0x448]
push eax
mov eax, dword [0x5ebc68]
add eax, 0x18
push ebx
push eax
call fcn.00552893
mov eax, dword [0x5ebc68]
add esp, 0xc
mov ecx, dword [ebp - 0x11ac]
mov dword [eax + 0x220], ecx
jmp 0x409523
lea eax, [ebp - 0x240]
push eax
mov eax, dword [0x5ebc68]
add eax, 0x18
push ebx
push eax
call fcn.00552893
mov eax, dword [0x5ebc68]
mov ecx, dword [ebp - 0x1198]
mov dword [eax + 0x220], ecx
lea eax, [ebp - 0x240]
push eax
call fcn.00552a19
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esp, 0x10
lea eax, [eax*2 + 2]
push eax
lea eax, [ebp - 0x240]
push eax
xor eax, eax
inc eax
push eax
push edi
push str.Wallpaper
push dword [0x5ebc50]
call esi
push 4
lea eax, [ebp - 0x1198]
push eax
push 4
push edi
push str.WallpaperPos
push dword [0x5ebc50]
call esi
mov esi, dword [0x5ebc68]
xor eax, eax
inc eax
push eax
call dword [sym.imp.USER32.dll_GetSysColor]
mov dword [esi + 4], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054d24a
leave
ret