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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418807
mov eax, dword fs:[0]
push eax
mov eax, 0x2a40
call fcn.00414790
mov eax, dword [0x41f414]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 4]
push 0x239
push eax
call dword [sym.imp.USER32.dll_LoadBitmapW]
push eax
call dword [sym.imp.GDI32.dll_CreatePatternBrush]
mov dword [ebx + 0x10], eax
xor eax, eax
mov dword [ebp - 0x2a44], 0x41c
mov dword [ebp - 0x2a40], 0x41f
lea edi, [ebp - 0x2a3c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
xor esi, esi
fld dword [0x41bf7c]
mov eax, dword [ebx + 8]
push edi
push edi
push ecx
fstp dword [esp]
push dword [ebp + esi*4 - 0x2a44]
push eax
call fcn.0040877b
add esp, 0x14
inc esi
cmp esi, 4
jb 0x4093dc
mov dword [ebp - 0x2a48], edi
push str.Software_
mov edi, 0x800
push edi
mov esi, 0x4211d0
push esi
call fcn.0040ab83
add esp, 0xc
push str.Microsoft_
push edi
push esi
call fcn.0040adbf
add esp, 0xc
push str.Windows_
push edi
push esi
call fcn.0040adbf
add esp, 0xc
push str.CurrentVersion_
push edi
push esi
call fcn.0040adbf
add esp, 0xc
push str.Explorer_
push edi
push esi
call fcn.0040adbf
add esp, 0xc
push str.User_Shell_Folders
push edi
push esi
call fcn.0040adbf
add esp, 0xc
lea eax, [ebp - 0x2a48]
push eax
push 0x20019
xor edi, edi
push edi
push esi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409606
push 0x1ffe
mov word [ebp - 0x2a18], ax
lea eax, [ebp - 0x2a16]
push edi
push eax
call fcn.0040bff0
add esp, 0xc
lea eax, [ebp - 0x2a4c]
push eax
lea eax, [ebp - 0x2a18]
push eax
lea eax, [ebp - 0x2a38]
push eax
push edi
push str.374DE290_123F_4565_9164_39C4925E467B
push dword [ebp - 0x2a48]
mov dword [ebp - 0x2a38], edi
mov dword [ebp - 0x2a4c], 0x2000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409606
lea eax, [ebp - 0x2a18]
push eax
lea edi, [ebx + 0x34]
push edi
call fcn.0040185f
xor eax, eax
push 0x7fe
push eax
mov word [ebp - 0xa18], ax
lea eax, [ebp - 0xa16]
push eax
call fcn.0040bff0
add esp, 0xc
push str._123USERPROFILE_
lea esi, [ebp - 0x2a34]
call fcn.00401757
and dword [ebp - 4], 0
push 0x41b9bc
push 3
push 1
mov eax, esi
push eax
call fcn.004017a4
cmp dword [ebp - 0x2a1c], 8
mov eax, dword [ebp - 0x2a30]
jae 0x409551
lea eax, [ebp - 0x2a30]
push eax
lea eax, [ebp - 0xa18]
push 0x400
push eax
call fcn.0040ab83
lea eax, [ebp - 0xa18]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40956f
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0xa18]
push eax
mov eax, edi
call fcn.004099c4
mov esi, eax
cmp esi, 0xffffffff
je 0x4095f1
push 0
push 0x28
lea eax, [ebp - 0x2a18]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0xa18]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x4095af
sub eax, edx
lea ecx, [ebp - 0x2a18]
push ecx
sar eax, 1
push eax
push esi
push edi
call fcn.004017a4
cmp dword [edi + 0x18], 8
jb 0x4095d7
mov eax, dword [edi + 4]
jmp 0x4095da
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4095ea
test al, 0x10
jne 0x4095f1
mov eax, edi
call fcn.00409945
or dword [ebp - 4], 0xffffffff
push 0
push 1
lea esi, [ebp - 0x2a34]
call fcn.004019da
xor edi, edi
cmp dword [ebx + 0x48], edi
jne 0x40962c
push edi
push 0x10
lea eax, [ebp - 0x218]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebx + 0x34]
push eax
call fcn.0040185f
cmp dword [ebx + 0x4c], 8
jb 0x409637
mov ecx, dword [ebx + 0x38]
jmp 0x40963a
lea ecx, [ebx + 0x38]
mov eax, dword [ebx + 8]
push ecx
mov esi, 0x423
push esi
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call fcn.00404d18
xor eax, eax
mov dword [ebp - 0x2a40], esi
lea edi, [ebp - 0x2a38]
mov dword [ebp - 0x2a3c], 0x41e
pop ecx
stosd dword es:[edi], eax
xor edi, edi
pop ecx
xor esi, esi
fld dword [0x41bf70]
push 1
push edi
push ecx
fstp dword [esp]
push dword [ebp + esi*4 - 0x2a40]
push dword [ebx + 8]
call fcn.0040877b
add esp, 0x14
inc esi
cmp esi, 3
jb 0x409670
mov dword [ebp - 0x2a3c], 0x422
mov dword [ebp - 0x2a38], 0x41d
xor esi, esi
fld dword [0x41bf78]
push edi
push edi
push ecx
fstp dword [esp]
push dword [ebp + esi*4 - 0x2a3c]
push dword [ebx + 8]
call fcn.0040877b
add esp, 0x14
inc esi
cmp esi, 2
jb 0x4096ab
mov dword [ebp - 0x2a3c], 0x426
mov dword [ebp - 0x2a38], 0x425
xor esi, esi
fld dword [0x41bf74]
push edi
push edi
push ecx
fstp dword [esp]
push dword [ebp + esi*4 - 0x2a3c]
push dword [ebx + 8]
call fcn.0040877b
add esp, 0x14
inc esi
cmp esi, 2
jb 0x4096e5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409fdb
leave
ret