Function at 0x10004010
Capabilities:
Check if file exists
Get common file path
Get program files directory
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1050
call fcn.10009cf0
mov eax, dword [0x100320ac]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x208
lea eax, [ebp - 0x824]
mov dword [ebp - 0x1048], ecx
push 0
push eax
call fcn.1000c490
push 0x208
lea eax, [ebp - 0xc34]
push 0
push eax
call fcn.1000c490
push 0x208
lea eax, [ebp - 0xa2c]
push 0
push eax
call fcn.1000c490
push 0x208
lea eax, [ebp - 0x414]
push 0
push eax
call fcn.1000c490
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.1000c490
push 0x208
lea eax, [ebp - 0x1044]
push 0
push eax
call fcn.1000c490
add esp, 0x48
lea eax, [ebp - 0x824]
push 0
push 0x2b
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x100040c1
mov eax, dword [0x10022344]
mov dword [edi], eax
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
nop dword [eax]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x100040e0
mov ecx, 8
mov esi, str.HaoKanWallPaper
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x10004101
mov dword [edi], eax
lea edi, [ebp - 0x824]
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10004120
mov ecx, 8
mov esi, str.HaoKanWallPaper
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x824]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x10004141
mov eax, dword [str..ini]
mov dword [ecx], eax
mov eax, dword [0x10022644]
mov dword [ecx + 4], eax
mov ax, word [0x10022648]
mov word [ecx + 8], ax
lea eax, [ebp - 0x824]
push eax
push 0x104
lea eax, [ebp - 0xc34]
push eax
push 0x10022340
push str.InstallPath
push str.AppConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10004190
lea ebx, [ebp - 0x414]
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x100041b1
sub ebx, ecx
sar ebx, 1
test ebx, ebx
jle 0x10004290
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100041d0
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10004290
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1000c490
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10004215
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10004236
lea eax, [ebp - 0x61c]
mov ecx, 0xa
mov esi, str.HaoKanWallPaper.exe
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10004290
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
push ebx
push eax
lea ecx, [esi + 0x30]
call fcn.10001ad0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004280
jmp 0x1000470b
push 0x1f4
lea eax, [ebp - 0xe28]
push 0
push eax
call fcn.1000c490
movups xmm0, xmmword [str.SOFTWARE_]
mov eax, dword [0x100226b0]
lea edi, [ebp - 0xe3c]
add esp, 0xc
mov dword [ebp - 0xe2c], eax
movups xmmword [ebp - 0xe3c], xmm0
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100042d0
lea eax, [ebp - 0x104c]
mov ecx, 8
push eax
push 0x20019
push 0
lea eax, [ebp - 0xe3c]
mov esi, str.HaoKanWallPaper
push eax
rep movsd dword es:[edi], dword [esi]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10004460
lea eax, [ebp - 0x1050]
mov dword [ebp - 0x1050], 0x104
push eax
lea eax, [ebp - 0x1044]
push eax
push 0
push 0
push str.InstallPath
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10004460
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x1044]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10004350
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10004370
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x10004466
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1000c490
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x100043c0
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100043e1
lea eax, [ebp - 0x61c]
mov ecx, 0xa
mov esi, str.HaoKanWallPaper.exe
rep movsd dword es:[edi], dword [esi]
push eax
call ebx
test eax, eax
je 0x10004466
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004420
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x30]
call fcn.10001ad0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004450
jmp 0x1000470b
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push dword [ebp - 0x104c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x26
lea eax, [ebp - 0xa2c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea edi, [ebp - 0xa2c]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x10004490
mov eax, dword [0x10022344]
mov dword [edi], eax
lea edi, [ebp - 0xa2c]
add edi, 0xfffffffe
nop dword [eax]
mov dx, word [edi + 2]
add edi, 2
test dx, dx
jne 0x100044b0
mov ecx, 8
mov esi, str.HaoKanWallPaper
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0xa2c]
add edi, 0xfffffffe
mov cx, word [edi + 2]
lea edi, [edi + 2]
test cx, cx
jne 0x100044d1
mov dword [edi], eax
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x100044e1
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10004500
lea eax, [ebp - 0x20c]
push eax
call ebx
test eax, eax
je 0x100045d0
push 0x208
lea eax, [ebp - 0x61c]
push 0
push eax
call fcn.1000c490
add esp, 0xc
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x20c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x61e], ax
test ax, ax
jne 0x10004541
lea edi, [ebp - 0x61c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x10004562
lea eax, [ebp - 0x61c]
mov ecx, 0xa
mov esi, str.HaoKanWallPaper.exe
rep movsd dword es:[edi], dword [esi]
push eax
call ebx
test eax, eax
je 0x100045d0
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004590
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x30]
call fcn.10001ad0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045c0
jmp 0x1000470b
lea ecx, [ebp - 0xc34]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100045e0
sub ecx, edx
sar ecx, 1
test ecx, ecx
jle 0x10004690
lea eax, [ebp - 0xc34]
push eax
call ebx
test eax, eax
je 0x10004690
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0xc34]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10004610
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x10004630
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004651
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x30]
call fcn.10001ad0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004680
jmp 0x1000470b
xor ecx, ecx
movzx eax, word [ebp + ecx - 0xa2c]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x416], ax
test ax, ax
jne 0x10004692
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x414]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x20e], ax
test ax, ax
jne 0x100046b0
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100046d1
mov esi, dword [ebp - 0x1048]
lea eax, [ebp - 0x414]
sub ecx, edx
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x30]
call fcn.10001ad0
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10004700
sub ecx, edx
lea eax, [ebp - 0x20c]
sar ecx, 1
push ecx
push eax
lea ecx, [esi + 0x18]
call fcn.10001ad0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10009cb3
mov esp, ebp
pop ebp
ret