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

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x690
mov rax, qword [0x1406836b8]
xor rax, rsp
mov qword [rsp + 0x680], rax
mov r14, qword [rsp + 0x6e0]
mov r15, rdx
xor edx, edx
movsxd rsi, r9d
mov ebp, ecx
mov rbx, r8
lea ecx, [rdx + 7]
call sym.ErrorReportClient.exe_SfOSVersionOK
test eax, eax
je 0x14039eb36
test ebp, ebp
jne 0x14039eb36
xor edi, edi
mov word [rbx], di
xor eax, eax
jmp 0x14039ed5c
mov rcx, qword [0x14068c270]
lea rdx, [rsp + 0x40]
xor edi, edi
mov dword [rsp + 0x30], 0x104
lea r8d, [rdi + 4]
call sym.ErrorReportClient.exe_SfLang_GetLangAbbrev
lea r9, str.Shared_Information
lea r8, str.SoftwareMAGIX
lea rdx, str._s_s
lea rcx, [rsp + 0x260]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x38]
mov r9d, 0x20019
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x260]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str.HelpFolder
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x14039ed4f
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14039ed4f
and eax, 0x10
test al, al
je 0x14039ed4f
lea rcx, [rsp + 0x50]
mov rax, 0xffffffffffffffff
nop
inc rax
cmp word [rcx + rax*2], di
jne 0x14039ec00
mov ecx, esi
sub ecx, eax
test ecx, ecx
jle 0x14039ec29
movsxd rdx, ecx
lea r8, [rsp + 0x50]
mov rcx, rbx
mov r9, 0xffffffffffffffff
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov edx, esi
mov rcx, rbx
call sym.ErrorReportClient.exe_SfAddSlashToPathName
test r14, r14
je 0x14039ec5c
mov rcx, rbx
call sym.ErrorReportClient.exe_SfGetFileNameExtensionPtrW
mov rcx, rax
mov edx, esi
sub rcx, rbx
sar rcx, 1
sub edx, ecx
test edx, edx
jle 0x14039ecb1
movsxd rdx, edx
mov r8, r14
mov rcx, rax
jmp 0x14039eca4
mov r8d, esi
lea rdx, [rsp + 0x470]
mov rcx, r15
call sym.ErrorReportClient.exe_SfGetModuleFileName
mov rcx, rbx
call sym.ErrorReportClient.exe_SfGetFileNamePtrW
mov rcx, rax
mov r14d, esi
sub rcx, rbx
mov r15, rax
sar rcx, 1
sub r14d, ecx
lea rcx, [rsp + 0x470]
call sym.ErrorReportClient.exe_SfGetFileNamePtrW
test r14d, r14d
jle 0x14039ecb1
movsxd rdx, r14d
mov r8, rax
mov rcx, r15
mov r9, 0xffffffffffffffff
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov rcx, rbx
call sym.ErrorReportClient.exe_SfGetFileNameExtensionPtrW
mov rcx, rax
mov edx, esi
sub rcx, rbx
sar rcx, 1
sub edx, ecx
test ebp, ebp
je 0x14039ecdc
cmp ebp, 1
jne 0x14039ecfa
test edx, edx
jle 0x14039ecfa
lea r8, str..chm
jmp 0x14039ece7
test edx, edx
jle 0x14039ecfa
lea r8, str..hlp
mov r9, 0xffffffffffffffff
movsxd rdx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
cmp dword [rsp + 0x6e8], edi
jne 0x14039ed3b
lea r9, [rsp + 0x40]
mov r8d, 0x104
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.14039f8f0
test eax, eax
je 0x14039ed3b
test esi, esi
jle 0x14039ed3b
mov rdx, rsi
lea r8, [rsp + 0x50]
mov r9, 0xffffffffffffffff
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
xor edx, edx
mov rcx, rbx
call sym.ErrorReportClient.exe_SfDoesFileExist
test eax, eax
mov ecx, 1
cmovne edi, ecx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
mov rcx, qword [rsp + 0x680]
xor rcx, rsp
call fcn.14039bbb0
mov rbx, qword [rsp + 0x6c0]
add rsp, 0x690
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret