Function at 0x40cd40
Capabilities:
Check if file exists
Delete file
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437cdd
mov eax, dword fs:[0]
push eax
sub esp, 0x458
mov eax, dword [0x4450e4]
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 dword [ebp - 0x3b0], ecx
mov ebx, dword [ebp + 8]
call fcn.00402f7e
mov ecx, eax
test ecx, ecx
je 0x40d3ef
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3b8], eax
mov dword [ebp - 4], 0
call fcn.00402f7e
mov ecx, eax
test ecx, ecx
je 0x40d3f9
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x3a8], edi
mov byte [ebp - 4], 1
call fcn.00402f7e
mov ecx, eax
test ecx, ecx
je 0x40d403
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x3ac], esi
mov byte [ebp - 4], 2
call fcn.00402f7e
mov ecx, eax
test ecx, ecx
je 0x40d40d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3b4], eax
push 0xfc
lea eax, [ebp - 0x398]
mov byte [ebp - 4], 3
push 0
push eax
call fcn.00417900
mov eax, dword [ebp - 0x3b0]
add esp, 0xc
mov dword [ebp - 0x3bc], 0
cmp dword [eax], 0
je 0x40ce38
mov dword [ebp - 0x39c], 1
jmp 0x40d1ff
mov eax, ebx
sub eax, 2
je 0x40cf24
sub eax, 1
je 0x40cef2
sub eax, 0xb
je 0x40ce60
mov dword [ebp - 0x3a0], 0
jmp 0x40cf5f
push str.HaoKanWallPaper
push 0x438ab4
lea ecx, [ebp - 0x3ec]
call fcn.00403662
lea eax, [ebp - 0x3c0]
mov dword [ebp - 0x3ec], 0x438ab0
push eax
lea eax, [ebp - 0x39c]
mov dword [ebp - 0x39c], 0
push eax
lea eax, [ebp - 0x3c4]
mov dword [ebp - 0x3c0], 4
push eax
push 0
push str.oTherDver
push dword [ebp - 0x3e8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40cedc
cmp dword [ebp - 0x3c4], 4
jne 0x40cedc
mov eax, dword [ebp - 0x39c]
lea ecx, [ebp - 0x3ec]
mov dword [ebp - 0x3a0], eax
jmp 0x40cf5a
xor esi, esi
lea ecx, [ebp - 0x3ec]
mov dword [ebp - 0x3a0], esi
mov dword [ebp - 0x39c], esi
jmp 0x40cf5a
push str.HaoKanWallPaper
push str.HaoKanMini
lea ecx, [ebp - 0x404]
call fcn.00403662
lea ecx, [ebp - 0x404]
mov dword [ebp - method.CCfgOPBaseT_int_.virtual_0], vtable.CCfgPopMgr.0
call fcn.0040ca20
lea ecx, [ebp - 0x404]
jmp 0x40cf54
push str.HaoKanWallPaper
push 0x438ab4
lea ecx, [ebp - 0x41c]
call fcn.00403662
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0x438ab0
call fcn.0040ca20
lea ecx, [ebp - 0x41c]
mov dword [ebp - 0x3a0], eax
call fcn.004023fc
push 1
lea eax, [ebp - 0x3c8]
push ebx
push eax
call fcn.0040c630
add esp, 0xc
push eax
lea ecx, [ebp - 0x3ac]
mov byte [ebp - 4], 4
call fcn.00402b84
mov edx, dword [ebp - 0x3c8]
or eax, 0xffffffff
mov byte [ebp - 4], 3
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cfa3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x3ac]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40cfc7
push esi
call fcn.0040c100
add esp, 4
xor eax, eax
mov dword [ebp - 0x3a0], eax
jmp 0x40cfcd
mov eax, dword [ebp - 0x3a0]
push dword [ebp + 0xc]
lea ecx, [ebp - 0x3b8]
push ecx
push eax
push ebx
call fcn.00404f5d
mov ecx, eax
call fcn.00404b8d
test eax, eax
je 0x40d1f5
push 0xfde9
push dword [ebp - 0x3b8]
lea eax, [ebp - 0x90]
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x94], eax
call fcn.0040545a
lea eax, [ebp - 0x398]
push eax
push 0x20
push dword [ebp - 0x94]
call fcn.00433920
mov ecx, dword [ebp - 0x94]
lea edx, [ebp - 0x90]
add esp, 0xc
mov dword [ebp - 0x3a4], eax
cmp ecx, edx
je 0x40d04b
push ecx
call fcn.004197a3
mov eax, dword [ebp - 0x3a4]
add esp, 4
test eax, eax
je 0x40d1f5
cmp dword [eax], 0
jne 0x40d1f5
mov edi, dword [ebp - 0x3a4]
push str.onland
push edi
call fcn.00432920
push eax
call fcn.00432890
push 0x438ae0
push edi
mov dword [ebp - 0x3cc], eax
call fcn.00432920
add esp, 0x14
mov dword [ebp - 0x3a4], eax
test eax, eax
je 0x40d121
cmp dword [eax], 0
jne 0x40d121
push 0x4384d8
push eax
call fcn.00432920
push eax
call fcn.00432c00
add esp, 0xc
lea ecx, [ebp - 0x194]
mov dword [ebp - 0x198], ecx
lea ecx, [ebp - 0x198]
push 0xfde9
push eax
call fcn.00405392
push dword [ebp - 0x198]
lea ecx, [ebp - 0x3a8]
mov byte [ebp - 4], 5
call fcn.0040267c
mov eax, dword [ebp - 0x198]
lea ecx, [ebp - 0x194]
mov byte [ebp - 4], 3
cmp eax, ecx
je 0x40d101
push eax
call fcn.004197a3
add esp, 4
push 0x438ae4
push dword [ebp - 0x3a4]
call fcn.00432920
push eax
call fcn.00432890
add esp, 0xc
mov esi, eax
jmp 0x40d1c2
push str.config
push edi
call fcn.00432920
add esp, 8
test eax, eax
je 0x40d1c0
cmp dword [eax], 2
jne 0x40d1c0
push eax
call fcn.00432c00
add esp, 4
lea ecx, [ebp - 0x298]
mov dword [ebp - 0x29c], ecx
lea ecx, [ebp - 0x29c]
push 0xfde9
push eax
call fcn.00405392
push dword [ebp - 0x29c]
lea ecx, [ebp - 0x3b4]
mov byte [ebp - 4], 6
call fcn.0040267c
mov eax, dword [ebp - 0x29c]
lea ecx, [ebp - 0x298]
mov byte [ebp - 4], 3
cmp eax, ecx
je 0x40d198
push eax
call fcn.004197a3
add esp, 4
push 0x438af0
push dword [ebp - 0x3b4]
call fcn.00419836
add esp, 8
test eax, eax
jne 0x40d1c0
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 0x3bc], 1
xor esi, esi
cmp dword [edi + 4], 0xffffffff
je 0x40d1dc
mov eax, dword [edi + 4]
add eax, 0xffffffff
mov dword [edi + 4], eax
jne 0x40d1dc
push edi
call fcn.004327a0
add esp, 4
cmp dword [ebp - 0x3bc], 0
mov edi, dword [ebp - 0x3a8]
je 0x40d29f
mov esi, dword [ebp - 0x3ac]
mov dword [ebp - 0x39c], 0
mov edx, dword [ebp - 0x3b4]
or ebx, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d223
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40d23e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40d259
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x3b8]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40d27b
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x39c]
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.00415247
mov esp, ebp
pop ebp
ret 8
cmp dword [ebp - 0x3cc], 1
mov ecx, dword [ebp - 0x3b0]
push edi
push ebx
jne 0x40d2b7
call fcn.0040d590
jmp 0x40d2bc
call fcn.0040e130
mov dword [ebp - 0x39c], eax
cmp dword [ebp - 0x3a0], esi
jge 0x40d3e4
sub ebx, 2
je 0x40d396
sub ebx, 1
je 0x40d33d
sub ebx, 0xb
jne 0x40d3e4
push str.HaoKanWallPaper
push 0x438ab4
lea ecx, [ebp - 0x434]
call fcn.00403662
push 4
lea eax, [ebp - 0x3a4]
mov dword [ebp - 0x434], 0x438ab0
push eax
push 4
push ebx
push str.oTherDver
push dword [ebp - 0x430]
mov dword [ebp - 0x3a4], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x434]
call fcn.004023fc
mov esi, dword [ebp - 0x3ac]
jmp 0x40d1ff
push str.HaoKanWallPaper
push str.HaoKanMini
lea ecx, [ebp - 0x44c]
call fcn.00403662
push 4
lea eax, [ebp - 0x3d0]
mov dword [ebp - method.CCfgOPBaseT_int_.virtual_0], vtable.CCfgPopMgr.0
push eax
push 4
push 0
push str.dver
push dword [ebp - 0x448]
mov dword [ebp - 0x3d0], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x44c]
call fcn.004023fc
mov esi, dword [ebp - 0x3ac]
jmp 0x40d1ff
push str.HaoKanWallPaper
push 0x438ab4
lea ecx, [ebp - 0x464]
call fcn.00403662
push 4
lea eax, [ebp - 0x3d4]
mov dword [ebp - 0x464], 0x438ab0
push eax
push 4
push 0
push str.dver
push dword [ebp - 0x460]
mov dword [ebp - 0x3d4], esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x464]
call fcn.004023fc
mov esi, dword [ebp - 0x3ac]
jmp 0x40d1ff
push 0x80004005
call fcn.004031f8
push 0x80004005
call fcn.004031f8
push 0x80004005
call fcn.004031f8
push 0x80004005
call fcn.004031f8
int3