Function at 0x40b766
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 0x41b372
mov eax, dword fs:[0]
push eax
mov eax, 0x2224
call fcn.00416af0
mov eax, dword [0x423414]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0x83
mov esi, ebx
mov dword [ebp - 0x2230], ebx
mov dword [ebp - 0x2220], ecx
call fcn.00406b43
and dword [ebp - 4], 0
lea esi, [ebx + 0x38]
mov dword [ebx], 0x41ffdc
call fcn.00401892
lea esi, [ebx + 0x54]
mov byte [ebp - 4], 1
call fcn.00401892
mov byte [ebp - 4], 2
mov edi, ebx
mov byte [ebx + 0x70], 0
mov byte [ebx + 0x71], 1
mov byte [ebx + 0x72], 1
mov byte [ebx + 0x73], 1
call fcn.0040b9bc
mov eax, dword [ebp - 0x2220]
cmp dword [eax + 0x18], 8
jb 0x40b7fc
mov edi, dword [eax + 4]
jmp 0x40b7ff
lea edi, [eax + 4]
mov eax, dword [ebx + 8]
push 0x41e
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
mov ecx, eax
call fcn.00404ee7
lea eax, [ebp - 0x2224]
push eax
push 0x20019
xor edi, edi
push edi
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders
push 0x80000001
mov dword [ebp - 0x2224], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b937
push 0x1ffe
mov word [ebp - 0x221c], ax
lea eax, [ebp - 0x221a]
push edi
push eax
call fcn.0040e350
add esp, 0xc
lea eax, [ebp - 0x2220]
push eax
lea eax, [ebp - 0x221c]
push eax
lea eax, [ebp - 0x222c]
push eax
push edi
push str.374DE290_123F_4565_9164_39C4925E467B
push dword [ebp - 0x2224]
mov dword [ebp - 0x222c], edi
mov dword [ebp - 0x2220], 0x2000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40b937
lea eax, [ebp - 0x221c]
push eax
push esi
call fcn.004019aa
mov edi, str._USERPROFILE_
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x40b8b4
sub eax, edx
sar eax, 1
push eax
push edi
xor eax, eax
mov ecx, esi
call fcn.00409ec4
mov dword [ebp - 0x2228], eax
cmp eax, 0xffffffff
je 0x40b937
push 0
push 0x28
lea eax, [ebp - 0x221c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov eax, edi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x40b8f0
sub eax, ecx
lea ecx, [ebp - 0x221c]
push ecx
sar eax, 1
push eax
push dword [ebp - 0x2228]
push esi
call fcn.004018f3
cmp dword [esi + 0x18], 8
jb 0x40b91d
mov eax, dword [esi + 4]
jmp 0x40b920
lea eax, [esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40b930
test al, 0x10
jne 0x40b937
mov eax, esi
call fcn.00409db2
xor eax, eax
cmp dword [ebx + 0x68], eax
jne 0x40b95c
push eax
push 0x10
lea ecx, [ebp - 0x21c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x21c]
push eax
push esi
call fcn.004019aa
cmp dword [esi + 0x18], 8
jb 0x40b967
mov esi, dword [esi + 4]
jmp 0x40b96a
add esi, 4
mov eax, dword [ebx + 8]
push esi
push 0x423
push eax
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call fcn.00405048
pop ecx
pop ecx
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040c34a
leave
ret 4