Function at 0x140016188
Capabilities:
Get common file path
Get file size
Query or enumerate registry value
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x918]
sub rsp, 0x9f0
mov rax, qword [0x1400502a8]
xor rax, rsp
mov qword [rbp + 0x8e0], rax
or rdi, 0xffffffffffffffff
xor r15d, r15d
cmp dword [0x1400516e4], r15d
mov esi, edx
je 0x1400161ea
cmp edx, dword [0x1400516e0]
jg 0x1400166ea
cmp qword [0x140050310], rdi
jne 0x1400166ea
mov r13d, 1
mov qword [rsp + 0x60], r15
lea rax, [rsp + 0x60]
mov dword [rsp + 0x50], r15d
mov r9d, r13d
mov dword [0x1400516e4], r13d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftMediaPlayer
mov rcx, 0xffffffff80000001
mov ebx, r15d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea edx, [r13 + 3]
mov r12d, 0x104
mov r14d, 0x8000080
test eax, eax
jne 0x140016386
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
lea rax, [rbp - 0x80]
mov dword [rsp + 0x54], r13d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SetupLogFile
mov dword [rsp + 0x58], r12d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x14001631f
cmp dword [rsp + 0x54], r13d
jne 0x14001631f
mov qword [rsp + 0x30], r15
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov byte [rbp + 0x83], r15b
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, rdi
je 0x1400162e3
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov rcx, r14
cmove eax, r15d
cmp eax, 0x7a120
seta bl
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov qword [rsp + 0x30], r15
xor eax, r13d
lea rcx, [rbp - 0x80]
mov r14d, 0x8000080
xor r9d, r9d
mov dword [rsp + 0x28], r14d
mov r8d, r13d
mov edx, 0x40000000
lea eax, [rax*2 + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x140050310], rax
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x54]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x58], 4
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SetupLogLevel
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140016366
cmp dword [rsp + 0x54], 4
jne 0x140016366
mov eax, dword [rsp + 0x50]
jmp 0x14001636d
mov eax, r15d
mov dword [rsp + 0x50], eax
mov rcx, qword [rsp + 0x60]
movzx eax, ax
mov dword [0x1400516e0], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, 4
mov rcx, qword [0x140050310]
cmp rcx, rdi
jne 0x140016537
mov eax, dword [0x1400516e0]
test eax, eax
cmove eax, edx
mov dword [0x1400516e0], eax
cmp esi, eax
jg 0x14001652e
mov edx, r12d
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x140016527
lea rcx, [rbp - 0x80]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea r8, str.wmsetup.log
mov rdx, r12
lea rcx, [rbp - 0x80]
call fcn.1400158b0
test eax, eax
js 0x140016527
mov qword [rsp + 0x30], r15
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, rdi
je 0x14001643e
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, r15d
mov rcx, rsi
cmp eax, 0xffffffff
cmove eax, r15d
cmp eax, 0x7a120
seta bl
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x140050310]
cmp rcx, rdi
jne 0x140016537
lea rdx, [rbp + 0x90]
mov ecx, r12d
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x140016527
lea rcx, [rbp + 0x90]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea r8, [0x140041eb0]
mov rdx, r12
lea rcx, [rbp + 0x90]
call fcn.1400158b0
test eax, eax
js 0x140016527
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x90]
mov dword [rsp + 0x28], r14d
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rsi, rax
cmp rax, rdi
je 0x1400164e9
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, r15d
mov rcx, rsi
cmp eax, 0xffffffff
cmove eax, r15d
cmp eax, 0x7a120
seta bl
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov qword [rsp + 0x30], r15
neg eax
mov dword [rsp + 0x28], r14d
mov r8d, r13d
mov edx, 0x40000000
sbb ecx, ecx
xor r9d, r9d
and ecx, 0xfffffffe
add ecx, 4
mov dword [rsp + 0x20], ecx
lea rcx, [rbp + 0x90]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rcx, rax
mov qword [0x140050310], rax
jmp 0x14001652e
mov rcx, qword [0x140050310]
cmp rcx, rdi
je 0x1400166ea
test ebx, ebx
jne 0x14001654a
lea r9d, [rbx + 2]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rsp + 0x74]
movzx edx, word [rsp + 0x72]
movzx r8d, word [rsp + 0x70]
mov eax, dword [0x1400516e0]
movzx r10d, word [rsp + 0x6e]
movzx r11d, word [rsp + 0x6a]
movzx r9d, word [rsp + 0x68]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ecx
lea rcx, [rbp - 0x80]
mov dword [rsp + 0x38], edx
mov rdx, r12
mov dword [rsp + 0x30], r8d
lea r8, str._r_n_WMC_Logging_begun_at__lu__02lu__02lu____02lu:_02lu_:_02lu.__Logging_at_level:__lu.
mov dword [rsp + 0x28], r10d
mov dword [rsp + 0x20], r11d
call fcn.140013d18
test eax, eax
js 0x1400165df
mov dword [rsp + 0x50], r15d
lea rax, [rbp - 0x80]
mov r8, rdi
inc r8
cmp byte [rax + r8], r15b
jne 0x1400165bb
mov rcx, qword [0x140050310]
lea r9, [rsp + 0x50]
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.140017620
mov r8d, 0x7f
lea rdx, [rbp + 0x90]
mov rcx, rax
call fcn.140016f30
call fcn.140018260
mov r8d, 0x103
lea rdx, [rbp + 0x4c0]
mov rcx, rax
call fcn.140016f30
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
mov r8d, 0x105
lea rdx, [rbp + 0x6d0]
xor ecx, ecx
movzx ebx, ax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400166ea
lea rcx, [rbp + 0x6d0]
call fcn.1400182b8
mov r8, r12
lea rdx, [rbp + 0x2b0]
mov rcx, rax
call fcn.140016f30
test eax, eax
js 0x1400166ea
movzx ebx, bx
call fcn.140015ec4
lea rcx, [rbp + 0x2b0]
mov rdx, r12
mov qword [rsp + 0x40], rcx
lea r9, [0x140041f1c]
lea rcx, [rbp + 0x4c0]
mov qword [rsp + 0x38], rcx
lea r8, str.OS_is__s.__OSVer_is__S._lu._System_Lang_is__lu._Prev_version_system_is__S._Setup_version__S.__r_n
mov dword [rsp + 0x30], ebx
lea rcx, [rbp + 0x1a0]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0x90]
mov qword [rsp + 0x20], rax
call fcn.140013d18
test eax, eax
js 0x1400166ea
mov dword [rsp + 0x50], r15d
lea rax, [rbp + 0x1a0]
inc rdi
cmp byte [rax + rdi], r15b
jne 0x1400166c0
mov rcx, qword [0x140050310]
lea r9, [rsp + 0x50]
mov r8, rdi
mov qword [rsp + 0x20], r15
lea rdx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rbp + 0x8e0]
xor rcx, rsp
call fcn.14003c810
lea r11, [rsp + 0x9f0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret