Function at 0x459340
Capabilities:
Check if file exists
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x625be8
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x690a1c]
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 ebx, dword [ebp + 8]
mov dword [ebp - 0x238], ebx
mov dword [ebp - 0x23c], ebx
call fcn.00407410
mov ecx, eax
test ecx, ecx
je 0x459b43
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x250], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x254], 0x104
mov dword [ebp - 0x258], 1
call fcn.00407410
mov ecx, eax
test ecx, ecx
je 0x459b4d
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x244], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 1
jge 0x459400
push 0x104
lea ecx, [ebp - 0x244]
call fcn.00407e30
mov esi, dword [ebp - 0x244]
lea eax, [ebp - 0x254]
push eax
push esi
lea eax, [ebp - 0x258]
push eax
push str.Background
push str.Control_PanelColors
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
push dword [esi - 8]
push esi
call fcn.005e74c3
add esp, 8
test eax, eax
js 0x459b39
cmp eax, dword [esi - 8]
jg 0x459b39
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [esi - 0xc], ecx
jne 0x4594cd
call fcn.00407410
mov ecx, eax
test ecx, ecx
je 0x459b57
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
push 0x6331a8
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.004090c0
test al, al
jne 0x45948a
push 0
push 0x6331a8
mov ecx, ebx
call fcn.0040b220
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4594a8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4597dd
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4597dd
push str..jpg
lea ecx, [ebp - 0x24c]
call fcn.00406980
lea eax, [ebp - 0x24c]
mov byte [ebp - 4], 3
push eax
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x240]
push eax
call fcn.0042c270
add esp, 0xc
mov edx, dword [ebp - 0x24c]
or ebx, 0xffffffff
mov byte [ebp - 4], 5
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x459522
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.005e3920
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.jiandeskData
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.DesktopBkImage
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x459591
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push dword [ebp - 0x240]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x459669
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4595c2
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x250]
call fcn.0040b220
mov eax, dword [ebp - 0x250]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x248], eax
call fcn.00407150
mov edi, dword [ebp - 0x238]
add eax, 0x10
mov edx, dword [ebp - 0x240]
add esp, 4
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov dword [edi], eax
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x459628
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x459643
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x248]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x459662
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
jmp 0x4597e3
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
push 0x63634c
lea ecx, [ebp - 0x248]
mov byte [ebp - 4], 6
call fcn.004086e0
lea eax, [ebp - 0x234]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x244]
push eax
call fcn.0045ad80
mov edx, dword [ebp - 0x248]
add esp, 0xc
mov byte [ebp - 4], 6
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4596dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x230]
mov ecx, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
cmp eax, 3
jae 0x4597ff
mov ecx, dword [ebp - 0x238]
push 0x6331a8
call fcn.004086e0
mov eax, dword [ebp - 0x234]
mov byte [ebp - 4], 8
test eax, eax
je 0x459785
push dword [ebp - 0x230]
lea ecx, [ebp - 0x234]
push eax
call fcn.004570a0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
mov eax, ecx
cmp edx, 0x1000
jb 0x45975d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459b61
push edx
push ecx
call fcn.004fa0f5
add esp, 8
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov edx, dword [ebp - 0x240]
mov eax, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4597a6
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4597c1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
lock xadd dword [edi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4597dd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x238]
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.004fa103
mov esp, ebp
pop ebp
ret
push dword [ecx]
call fcn.005f9936
mov ecx, dword [ebp - 0x234]
mov dword [ebp - 0x23c], eax
push dword [ecx + 4]
call fcn.005f9936
mov ecx, dword [ebp - 0x234]
mov dword [ebp - 0x260], eax
push dword [ecx + 8]
call fcn.005f9936
movaps xmm0, xmmword [0x63adc0]
add esp, 0xc
movups xmmword [ebp - 0x228], xmm0
mov dword [ebp - 0x25c], eax
xorps xmm0, xmm0
mov dword [ebp - method.ATL::CImage.virtual_0], vtable.ATL::CImage.0
movups xmmword [ebp - 0x290], xmm0
mov dword [ebp - 0x280], 0
mov dword [ebp - 0x27c], 0
mov word [ebp - 0x278], 0
mov dword [ebp - 0x274], 0xffffffff
mov dword [ebp - 0x270], 0xffffffff
mov dword [ebp - 0x26c], 0
mov dword [ebp - 0x268], 0
mov dword [ebp - 0x264], 0
call fcn.00459280
mov ebx, eax
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [ebx + 0x1c]
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x21c]
sub ecx, dword [ebp - 0x224]
mov eax, dword [ebp - 0x220]
sub eax, dword [ebp - 0x228]
push 0
push 0
push 0
push 0x20
push ecx
push eax
lea ecx, [ebp - 0x294]
mov byte [ebp - 4], 9
call fcn.00457a40
lea ecx, [ebp - 0x294]
call fcn.00458b80
mov ebx, eax
mov eax, dword [ebp - 0x25c]
movzx edx, al
mov eax, dword [ebp - 0x260]
shl edx, 8
movzx ecx, al
mov eax, dword [ebp - 0x23c]
or edx, ecx
shl edx, 8
movzx ecx, al
or edx, ecx
push edx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
lea eax, [ebp - 0x228]
push eax
push ebx
call dword [sym.imp.USER32.dll_FillRect]
lea ecx, [ebp - 0x294]
call fcn.0045a860
push 0x6401a0
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x294]
call fcn.0045aae0
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x23c], eax
call fcn.00458140
call fcn.00459280
mov ebx, eax
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [ebx]
test ecx, ecx
je 0x45998f
push ecx
call sub.gdiplus.dll_GdiplusShutdown
lea eax, [ebx + 4]
mov dword [ebx], 0
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x23c], 0
jne 0x459a9c
lea eax, [edi - 0x10]
push eax
mov dword [ebp - 0x23c], eax
call fcn.00407150
mov edi, dword [ebp - 0x238]
lea ecx, [ebp - 0x294]
add esp, 4
add eax, 0x10
mov dword [edi], eax
call fcn.00457410
mov eax, dword [ebp - 0x234]
mov byte [ebp - 4], 0xa
test eax, eax
je 0x459a52
push dword [ebp - 0x230]
lea ecx, [ebp - 0x234]
push eax
call fcn.004570a0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
mov eax, ecx
cmp edx, 0x1000
jb 0x459a2a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459b66
push edx
push ecx
call fcn.004fa0f5
add esp, 8
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
mov edx, dword [ebp - 0x240]
or ebx, 0xffffffff
mov byte [ebp - 4], 1
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x459a76
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x459a91
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x23c]
jmp 0x459649
mov ecx, dword [ebp - 0x238]
push 0x6331a8
call fcn.004086e0
lea ecx, [ebp - 0x294]
call fcn.00457410
mov eax, dword [ebp - 0x234]
mov byte [ebp - 4], 0xb
test eax, eax
je 0x459b31
push dword [ebp - 0x230]
lea ecx, [ebp - 0x234]
push eax
call fcn.004570a0
mov eax, dword [ebp - 0x22c]
mov ecx, dword [ebp - 0x234]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
mov eax, ecx
cmp edx, 0x1000
jb 0x459b09
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x459b6b
push edx
push ecx
call fcn.004fa0f5
add esp, 8
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x22c], 0
or ebx, 0xffffffff
jmp 0x459785
push 0x80070057
call fcn.00407120
push 0x80004005
call fcn.00407120
push 0x80004005
call fcn.00407120
push 0x80004005
call fcn.00407120
call fcn.005e72a0
call fcn.005e72a0
call fcn.005e72a0
int3