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

Disassembly:
push ebp
lea ebp, [esp - 0x51c]
sub esp, 0x59c
mov eax, dword [0x4a9c04]
xor eax, ebp
mov dword [ebp + 0x518], eax
mov eax, dword [ebp + 0x524]
mov ecx, dword [0x4ad774]
push ebx
mov ebx, dword [ebp + 0x528]
push esi
push edi
xor esi, esi
push eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x30], esi
call fcn.00407a3d
mov dword [ebp - 0x4c], eax
mov eax, dword [0x4ad774]
cmp dword [eax + 0x124], esi
je 0x407e81
push 0x104
lea ecx, [ebp + 0x1f4]
push ecx
add eax, 0x238
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x103
lea eax, [ebp + 0x3fd]
push esi
push eax
mov byte [ebp + 0x3fc], 0
call fcn.0044f370
xor eax, eax
mov byte [ebp + 0x500], 0
lea edi, [ebp + 0x501]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosb byte es:[edi], al
xor eax, eax
mov byte [ebp + 0x50c], 0
lea edi, [ebp + 0x50d]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
stosb byte es:[edi], al
lea eax, [ebp - 0x18]
push eax
push 0x20019
push esi
push str.Control_PanelDesktop
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407b93
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x3fc]
push eax
push esi
push esi
push str.Wallpaper
push dword [ebp - 0x18]
mov dword [ebp - 0x34], 0x104
call edi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x500]
push eax
push esi
push esi
push str.TileWallpaper
push dword [ebp - 0x18]
mov dword [ebp - 0x34], 0xa
call edi
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp + 0x50c]
push eax
push esi
push esi
push str.WallpaperStyle
push dword [ebp - 0x18]
mov dword [ebp - 0x34], 0xa
call edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x20]
push eax
push 0x48d514
push 1
push esi
push 0x48d504
mov dword [ebp - 0x20], esi
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x407c5f
mov ecx, dword [ebp - 0x20]
cmp ecx, esi
je 0x407c5f
lea edi, [ebp - 0x54]
stosd dword es:[edi], eax
push esi
lea edx, [ebp - 0x58]
stosd dword es:[edi], eax
push edx
mov dword [ebp - 0x58], 0xc
mov eax, dword [ecx]
push ecx
call dword [eax + 0x28]
cmp dword [ebp - 0x50], esi
je 0x407c50
cmp dword [ebp - 0x54], esi
je 0x407c50
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push esi
mov edi, 0x104
push edi
lea edx, [ebp - 0x14]
push edx
push eax
call dword [ecx + 0x10]
push esi
push esi
push edi
lea eax, [ebp + 0x3fc]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x14]
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x20]
push esi
lea edx, [ebp - 0x38]
push edx
mov dword [ebp - 0x38], 8
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
mov eax, dword [ebp - 0x34]
cmp eax, esi
je 0x407c42
cmp eax, 1
je 0x407d32
jbe 0x407c50
cmp eax, 3
jbe 0x407d26
cmp eax, 4
jne 0x407c50
mov byte [ebp + 0x50c], 0x31
mov byte [ebp + 0x500], 0x30
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push 0x103
lea eax, [ebp + 0x2f9]
push esi
push eax
mov byte [ebp + 0x2f8], 0
call fcn.0044f370
add esp, 0xc
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp + 0x2f8]
push eax
push esi
push esi
push str.Wallpaper
push dword [0x4ad75c]
mov dword [ebp - 0x28], 0x104
call edi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
push str.WallpaperPos
push dword [0x4ad75c]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], 4
call edi
lea eax, [ebp + 0x2f8]
push eax
lea eax, [ebp + 0x1f4]
push eax
call fcn.0044f215
pop ecx
pop ecx
test eax, eax
jne 0x407d00
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push str.Wallpaper
push dword [0x4ad75c]
call edi
push str.WallpaperPos
push dword [0x4ad75c]
call edi
mov byte [ebp + 0x2f8], 0
mov dword [ebp - 0x1c], esi
lea eax, [ebp + 0x500]
push 0x488708
push eax
mov dword [ebp - 0x2c], esi
call fcn.004543a0
pop ecx
pop ecx
test eax, eax
jne 0x407d3e
mov dword [ebp - 0x2c], 2
jmp 0x407dbe
mov byte [ebp + 0x50c], 0x32
jmp 0x407c49
mov byte [ebp + 0x500], 0x31
jmp 0x407c50
lea eax, [ebp + 0x50c]
push 0x487a80
push eax
call fcn.004543a0
pop ecx
pop ecx
test eax, eax
jne 0x407d5e
mov dword [ebp - 0x2c], 1
jmp 0x407dbe
lea eax, [ebp + 0x50c]
push 0x488910
push eax
call fcn.004543a0
pop ecx
pop ecx
test eax, eax
jne 0x407d7e
mov dword [ebp - 0x2c], 3
jmp 0x407dbe
lea eax, [ebp + 0x50c]
push 0x48890c
push eax
call fcn.004543a0
pop ecx
pop ecx
test eax, eax
jne 0x407d9e
mov dword [ebp - 0x2c], 4
jmp 0x407dbe
lea eax, [ebp + 0x50c]
push 0x488908
push eax
call fcn.004543a0
neg eax
sbb eax, eax
and eax, 0xfffffffc
pop ecx
add eax, 5
pop ecx
mov dword [ebp - 0x2c], eax
lea eax, [ebp + 0x1f4]
push eax
lea eax, [ebp + 0x3fc]
push eax
call fcn.0044f215
pop ecx
pop ecx
test eax, eax
jne 0x407e04
cmp dword [ebp - 0x2c], 2
jne 0x407e04
lea eax, [ebp + 0x2f8]
push eax
mov eax, dword [0x4ad774]
add eax, 0x1c
push eax
call fcn.0044fb30
mov eax, dword [0x4ad774]
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x120], ecx
jmp 0x407e6b
lea eax, [ebp + 0x3fc]
push eax
mov eax, dword [0x4ad774]
add eax, 0x1c
push eax
call fcn.0044fb30
mov eax, dword [0x4ad774]
mov ecx, dword [ebp - 0x2c]
mov dword [eax + 0x120], ecx
lea eax, [ebp + 0x3fc]
push eax
call fcn.0044fc30
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add esp, 0xc
inc eax
push eax
lea eax, [ebp + 0x3fc]
push eax
push 1
push esi
push str.Wallpaper
push dword [0x4ad75c]
call edi
push 4
lea eax, [ebp - 0x2c]
push eax
push 4
push esi
push str.WallpaperPos
push dword [0x4ad75c]
call edi
push 1
call dword [sym.imp.USER32.dll_GetSysColor]
mov ecx, dword [0x4ad774]
mov dword [ecx + 8], eax
mov eax, dword [0x4ad774]
cmp dword [eax + 0x120], esi
je 0x407f02
cmp byte [eax + 0x1c], 0
je 0x407f02
xor edi, edi
cmp dword [str.rainbow], esi
je 0x407ed3
mov ecx, 0x4a810c
push dword [ecx]
add eax, 0x1c
push eax
call fcn.0044f215
pop ecx
pop ecx
test eax, eax
je 0x407ec2
mov eax, dword [0x4ad774]
inc edi
lea ecx, [edi*4 + 0x4a810c]
cmp dword [ecx], esi
jne 0x407e9e
jmp 0x407ed3
push edi
push ebx
call fcn.0040a0dd
pop ecx
mov dword [ebp - 0x30], eax
mov eax, dword [0x4ad774]
pop ecx
cmp dword [edi*4 + 0x4a810c], esi
jne 0x407f02
push 0x104
lea ecx, [ebp + 0x1f4]
push ecx
add eax, 0x1c
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
lea eax, [ebp + 0x1f4]
push eax
call fcn.00406d8b
pop ecx
mov dword [ebp - 0x30], eax
push dword [ebp - 0x4c]
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov edi, eax
push edi
push ebx
push dword [ebp - 0x24]
call dword [sym.imp.USER32.dll_FillRect]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp dword [ebp - 0x30], esi
je 0x408143
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push dword [ebp - 0x30]
mov dword [ebp - 0x20], eax
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x64], esi
lea edi, [ebp - 0x60]
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 - 0x64]
push eax
push 0x18
push dword [ebp - 0x30]
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [0x4ad774]
mov eax, dword [eax + 0x120]
cmp eax, 1
je 0x407f8a
cmp eax, 2
je 0x407ffd
jbe 0x408125
cmp eax, 4
jbe 0x407fb5
cmp eax, 5
jne 0x408125
mov ecx, dword [ebx + 8]
mov eax, dword [ebx]
mov edx, dword [ebp - 0x60]
mov edi, ecx
sub edi, eax
cmp edx, edi
jl 0x4080be
mov dword [ebp - 0x28], edi
mov edi, eax
mov eax, edx
sub eax, dword [ebp - 0x28]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x18], eax
jmp 0x4080cf
push 4
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
push esi
push esi
push esi
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_SetBrushOrgEx]
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebx]
push 0xcc0020
push dword [ebp - 0x5c]
sub edx, eax
push dword [ebp - 0x60]
push esi
push esi
push dword [ebp - 0x20]
push edx
mov edx, dword [ebx + 8]
sub edx, ecx
push edx
push eax
push ecx
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_StretchBlt]
jmp 0x408125
push 0x4e
call fcn.0041946e
cmp dword [ebp - 0x60], eax
jl 0x40805d
push 0x4f
call fcn.0041946e
cmp dword [ebp - 0x5c], eax
jl 0x40805d
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
push 0x4c
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x1c], ecx
sub esi, eax
sub edi, ecx
call fcn.0041946e
mov ecx, dword [ebx]
sub ecx, eax
push 0x4d
mov dword [ebp - 0x18], ecx
call fcn.0041946e
mov ecx, dword [ebx + 4]
push 0xcc0020
sub ecx, eax
push ecx
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push edi
push esi
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
jmp 0x40811c
mov eax, dword [ebx]
cmp eax, dword [ebx + 8]
mov dword [ebp - 0x18], eax
jge 0x408125
mov eax, dword [ebx + 0xc]
mov edi, dword [ebx + 4]
jmp 0x4080aa
mov ecx, dword [ebx + 8]
sub ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x60], ecx
jge 0x408081
mov ecx, dword [ebp - 0x60]
sub eax, edi
cmp dword [ebp - 0x5c], eax
jge 0x40808b
mov eax, dword [ebp - 0x5c]
push 0xcc0020
push esi
push esi
push dword [ebp - 0x20]
push eax
push ecx
push edi
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_BitBlt]
add edi, dword [ebp - 0x5c]
mov eax, dword [ebx + 0xc]
cmp edi, eax
jl 0x408073
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x60]
cmp ecx, dword [ebx + 8]
mov dword [ebp - 0x18], ecx
jl 0x40806e
jmp 0x408125
sub eax, edx
add eax, ecx
mov dword [ebp - 0x28], edx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov dword [ebp - 0x18], esi
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 4]
mov edx, ecx
sub edx, eax
mov eax, edx
mov edx, dword [ebp - 0x5c]
cmp edx, eax
mov eax, dword [ebx + 4]
jl 0x4080f8
sub ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, eax
mov eax, edx
sub eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
jmp 0x408108
sub eax, edx
add eax, ecx
mov dword [ebp - 0x1c], edx
cdq
sub eax, edx
mov ecx, eax
sar ecx, 1
xor eax, eax
push 0xcc0020
push eax
push dword [ebp - 0x18]
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
push ecx
push edi
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_BitBlt]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 0x20]
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [ebp - 0x30]
call dword [sym.imp.GDI32.dll_DeleteObject]
cmp byte [ebp + 0x530], 0
je 0x40823d
push 1
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_SetBkMode]
cmp byte [ebp + 0x534], 0
mov esi, ebx
lea edi, [ebp - 0x48]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
je 0x4081ac
mov esi, dword [sym.imp.SHELL32.dll_SHAppBarMessage]
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x6c]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x70]
push eax
push 5
mov dword [ebp - 0x70], 0x24
call esi
lea eax, [ebp - 0x70]
push eax
push 4
call esi
sub eax, 0
je 0x40819d
dec eax
dec eax
jne 0x4081ac
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x48]
push eax
push eax
call dword [sym.imp.USER32.dll_SubtractRect]
mov eax, dword [ebp + 0x52c]
mov ecx, dword [ebx + 0xc]
sub ecx, dword [ebx + 4]
neg eax
push eax
mov eax, dword [ebx + 8]
sub eax, dword [ebx]
imul eax, dword [ebp + 0x52c]
cdq
idiv ecx
neg eax
push eax
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.USER32.dll_InflateRect]
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x48]
push eax
push dword [0x4ad684]
call fcn.00413818
mov eax, dword [ebp - 0x80]
sub eax, dword [ebp - 0x78]
add dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x7c]
sub eax, dword [ebp - 0x74]
add dword [ebp - 0x3c], eax
lea eax, [ebp - 0x48]
push eax
mov eax, dword [0x4ad774]
push dword [eax + 0xc]
call fcn.0040742f
push dword [ebp - 0x4c]
mov dword [ebp - 0x48], eax
sub eax, dword [ebp - 0x80]
push dword [0x4ad684]
add eax, dword [ebp - 0x78]
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x40], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x24]
call fcn.00414e69
add esp, 0x24
mov ecx, dword [ebp + 0x518]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0044f35b
add ebp, 0x51c
leave
ret