Function at 0x4086e0
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4baacd
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4f4164]
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 eax, dword [ebp + 8]
test eax, eax
je 0x408727
push eax
push 0x104
push 0x4fa658
call fcn.004989ad
add esp, 0xc
jmp 0x40874f
push 0x104
push 0x4fa658
push 0x400000
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40893a
push 0x4fa658
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x30]
mov dword [ebp - 0x28], str.skinltr_
push eax
push 0x20019
push 0
push str..DEFAULTSoftwareSetID
push VariantInit
mov dword [ebp - 0x24], str..._skinltr_
mov dword [ebp - 0x20], str.skin_
mov dword [ebp - 0x1c], str.skin_rtl_
mov dword [ebp - 0x18], str..._skin_rtl_
mov dword [ebp - 0x14], str.skin_
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 4
mov dword [ebp - 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4087dd
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 0x4e1308
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 0x2c]
xor edx, edx
push dword [ebp - 0x30]
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2c], 1
lea edi, [ebp - 0x1c]
lea eax, [ebp - 0x28]
cmovne edi, eax
xor ebx, ebx
mov dword [ebp - 0x34], edi
or esi, 0xffffffff
push 0x4fa658
lea ecx, [ebp - 0x2c]
call fcn.00404e30
mov dword [ebp - 4], 0
mov edx, 1
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x104
or ecx, edx
jge 0x40882e
push 0x104
lea ecx, [ebp - 0x2c]
call fcn.00405520
mov eax, dword [ebp - 0x2c]
push dword [edi + ebx*4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
test eax, eax
je 0x408913
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x40884b
xor ecx, ecx
jmp 0x408864
push dword [eax - 8]
push eax
call fcn.00498b33
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x408958
mov eax, dword [ebp - 0x2c]
cmp ecx, dword [eax - 8]
jg 0x408958
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebp - 0x2c]
mov word [eax + ecx*2], dx
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4088c5
mov dword [ebp - 4], eax
mov eax, esi
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4088b9
lfence
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4c758c]
mov ecx, edi
call esi
mov edi, dword [ebp - 0x34]
or esi, 0xffffffff
inc ebx
cmp ebx, 3
jb 0x4087f2
jmp 0x40893a
push dword [ebp - 0x2c]
push 0x104
push 0x4fa658
call fcn.004989ad
mov ecx, dword [ebp - 0x2c]
add esp, 0xc
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x408901
lfence
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4c758c]
mov ecx, edi
call esi
push str.images_2_
push 0x4fa658
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x40893c
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x40893a
lfence
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4c758c]
mov ecx, edi
call esi
xor eax, 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.00450df0
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404140
int3