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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51ed80
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x440
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [eax], ebx
cmp esi, ebx
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x12], bl
mov byte [ebp - 0x13], 1
mov byte [ebp - 0x11], bl
mov dword [ebp - 0x2c], ebx
mov dword [ecx], ebx
jne 0x41eced
cmp dword [ebp + 0xc], ebx
je 0x41f056
cmp esi, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
jne 0x41f07c
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.SHLWAPI.dll_StrDupW]
mov ebx, eax
mov edi, ebx
mov dword [ebp - 0x24], ebx
cmp word [ebx], 0x22
mov dword [ebp + 0xc], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], edi
jne 0x41edac
lea eax, [ebx + 2]
mov byte [ebp - 0x13], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp + 8], eax
mov cx, word [eax]
test cx, cx
je 0x41ed3d
cmp cx, 0x22
jne 0x41eda1
mov dword [ebp - 0x18], eax
mov edi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
lea edx, [ebp - 0x44c]
push 0
push edx
mov cx, word [eax]
mov word [eax], 0
mov eax, dword [ebp + 8]
push 0x104
push 0x5621b0
push eax
push 0
mov word [ebp - 0x28], cx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
mov esi, eax
shl esi, 1
mov dword [ebp - 0x30], esi
je 0x41edd9
cmp esi, 0x208
jae 0x41edd9
lea ecx, [ebp - 0x44c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x41ed99
test al, 0x10
jne 0x41f026
add esi, 2
jmp 0x41ef6b
add eax, 2
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
jmp 0x41ed2c
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
mov ax, word [edi]
test ax, ax
je 0x41ed40
cmp ax, 0x20
je 0x41edd1
cmp ax, 9
je 0x41edd1
add edi, 2
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
jmp 0x41edb2
mov dword [ebp - 0x18], edi
jmp 0x41ed40
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x20]
push edx
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x41ef02
mov ecx, dword [ebp - 0x20]
push 0x561820
push ecx
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x41ef5f
mov ecx, 0x81
lea edi, [ebp - 0x243]
mov byte [ebp - 0x244], al
mov dword [ebp - 0x3c], 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x38], 0x208
stosb byte es:[edi], al
call sub.MFC42.DLL_CString::CString_3
mov edx, dword [ebp - 0x20]
mov byte [ebp - 4], 2
push edx
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
lea eax, [ebp - 0x34]
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_Paths_s
push eax
call sub.MFC42.DLL_CString::Format
add esp, 0xc
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x244]
lea eax, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x34]
push edx
push eax
push 0x56f01c
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
jne 0x41eef4
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x244]
shr eax, 1
test edx, edx
mov dword [ebp - 0x30], eax
jne 0x41ee9b
xor edi, edi
jmp 0x41eed4
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.004c79b0
mov edi, esp
push esi
push edi
lea ecx, [ebp - 0x244]
push 0xffffffffffffffff
push ecx
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea edx, [ebp - 0x244]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x44c]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov esi, dword [ebp - 0x30]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
jmp 0x41ef59
mov eax, dword [ebp - 0x20]
test eax, eax
mov ebx, eax
jne 0x41ef0f
xor edi, edi
jmp 0x41ef42
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.004c79b0
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
lea ecx, [ebp - 0x44c]
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x24]
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
test esi, esi
je 0x41f026
cmp esi, 0x208
jae 0x41f026
mov eax, dword [ebp - 0x18]
mov dx, word [ebp - 0x28]
lea ecx, [ebp - 0x44c]
mov word [eax], dx
mov al, byte [ebp - 0x11]
test al, al
mov dword [ebp + 8], ecx
jne 0x41efa4
mov al, byte [ebp - 0x12]
test al, al
je 0x41f0c0
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [eax + eax + 6]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [ebp - 0x2c], esi
je 0x41f0aa
push 0x562174
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
mov al, byte [ebp - 0x11]
add esp, 8
test al, al
je 0x41eff0
mov dx, word [ebx]
mov word [ebx], 0
mov word [ebp - 0x28], dx
push edi
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
push esi
call edi
push 0x562174
push esi
call edi
mov al, byte [ebp - 0x11]
add esp, 0x10
test al, al
je 0x41f0c0
mov ecx, dword [ebp - 0x2c]
mov ax, word [ebp - 0x28]
push ebx
push ecx
mov word [ebx], ax
call edi
add esp, 8
jmp 0x41f0c0
mov eax, dword [ebp - 0x18]
mov dx, word [ebp - 0x28]
mov word [eax], dx
cmp word [edi], 0
je 0x41f04f
mov al, byte [ebp - 0x13]
test al, al
je 0x41f04f
add edi, 2
mov byte [ebp - 0x11], 1
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
jmp 0x41edac
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x458]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x41f056
push esi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x41f056
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x41f09e
cmp word [eax], bx
jne 0x41f0c0
mov byte [ebp - 0x12], 1
mov dword [ebp + 0xc], esi
jmp 0x41efa7
mov al, byte [ebp - 0x11]
test al, al
je 0x41f0b5
mov byte [ebp - 0x11], 0
mov al, byte [ebp - 0x12]
test al, al
je 0x41f0c0
mov byte [ebp - 0x12], 0
mov edx, dword [ebp + 8]
mov esi, dword [sym.imp.SHLWAPI.dll_StrDupW]
push edx
call esi
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov al, byte [ebp - 0x11]
test al, al
jne 0x41f0e2
mov al, byte [ebp - 0x12]
test al, al
mov eax, dword [ebp + 0xc]
je 0x41f0e5
mov eax, dword [ebp - 0x2c]
push eax
call esi
mov edx, dword [ebp + 0x14]
mov esi, 1
mov dword [edx], eax
jmp 0x41f0f7
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x41f105
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x41f113
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
jmp 0x41f058