Function at 0x10005208c
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], rbp
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push r12
push r14
push r15
sub rsp, 0x7e0
mov rax, qword [0x100086110]
xor rax, rsp
mov qword [rsp + 0x7d0], rax
xor ebp, ebp
or r12, 0xffffffffffffffff
mov edi, edx
cmp dword [0x1000888dc], ebp
je 0x1000520e7
cmp edx, dword [0x1000888e0]
jg 0x100052646
cmp qword [0x1000861e8], r12
jne 0x100052646
lea rax, [rsp + 0x60]
lea rdx, [0x100029498]
mov r9d, 1
xor r8d, r8d
mov rcx, 0xffffffff80000001
mov qword [rsp + 0x60], rbp
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x50], ebp
mov esi, ebp
mov dword [0x1000888dc], 1
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, 4
mov r14d, 0x104
mov r15d, 0x8000080
cmp eax, ebp
jne 0x100052286
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x80]
lea rdx, [0x1000294d8]
xor r8d, r8d
mov dword [rsp + 0x54], 1
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, ebp
jne 0x10005222a
cmp dword [rsp + 0x54], 1
jne 0x10005222a
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x80]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x28], r15d
mov byte [rsp + 0x183], bpl
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, r12
je 0x1000521eb
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rbx
cmp eax, 0xffffffff
cmove eax, ebp
cmp eax, 0x7a120
seta sil
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov ebx, 4
mov qword [rsp + 0x30], rbp
neg eax
mov dword [rsp + 0x28], r15d
lea r8d, [rbx - 3]
sbb ecx, ecx
xor r9d, r9d
mov edx, 0x40000000
and ecx, 0xfffffffe
add ecx, ebx
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x1000861e8], rax
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x58]
lea r9, [rsp + 0x54]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
lea rdx, [0x1000294e8]
xor r8d, r8d
mov dword [rsp + 0x58], ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x10005226c
cmp dword [rsp + 0x54], ebx
jne 0x10005226c
mov eax, dword [rsp + 0x50]
jmp 0x100052272
mov eax, ebp
mov dword [rsp + 0x50], eax
mov rcx, qword [rsp + 0x60]
movzx eax, ax
mov dword [0x1000888e0], eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rax, qword [0x1000861e8]
cmp rax, r12
jne 0x100052461
mov eax, dword [0x1000888e0]
cmp eax, ebp
cmove eax, ebx
cmp edi, eax
mov dword [0x1000888e0], eax
jg 0x100052646
lea rcx, [rsp + 0x80]
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
cmp eax, ebp
je 0x100052451
lea rax, [rsp + 0x80]
cmp rax, rbp
je 0x1000522e3
lea rcx, [rsp + 0x80]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea r8, str.wmsetup.log
lea rcx, [rsp + 0x80]
mov rdx, r14
call fcn.1000519d4
cmp eax, ebp
jl 0x100052451
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x80]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, r12
je 0x10005235a
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rdi
mov esi, ebp
cmp eax, 0xffffffff
cmove eax, ebp
cmp eax, 0x7a120
seta sil
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x1000861e8]
cmp rax, r12
jne 0x100052461
lea rdx, [rsp + 0x190]
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp eax, ebp
je 0x100052451
lea rax, [rsp + 0x190]
cmp rax, rbp
je 0x10005239e
lea rcx, [rsp + 0x190]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea r8, [0x100029508]
lea rcx, [rsp + 0x190]
mov rdx, r14
call fcn.1000519d4
cmp eax, ebp
jl 0x100052451
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x190]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
cmp rax, r12
je 0x100052415
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rdi
mov esi, ebp
cmp eax, 0xffffffff
cmove eax, ebp
cmp eax, 0x7a120
seta sil
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], r15d
neg eax
mov edx, 0x40000000
sbb ecx, ecx
xor r9d, r9d
and ecx, 0xfffffffe
lea r8d, [r9 + 1]
add ecx, ebx
mov dword [rsp + 0x20], ecx
lea rcx, [rsp + 0x190]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x1000861e8], rax
jmp 0x100052458
mov rax, qword [0x1000861e8]
cmp rax, r12
je 0x100052646
cmp esi, ebp
jne 0x100052479
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx edx, word [rsp + 0x74]
movzx ecx, word [rsp + 0x72]
movzx r8d, word [rsp + 0x6e]
mov eax, dword [0x1000888e0]
movzx edi, word [rsp + 0x70]
movzx r10d, word [rsp + 0x6a]
movzx r9d, word [rsp + 0x68]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], edx
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], r8d
lea rcx, [rsp + 0x80]
lea r8, [0x100029520]
mov rdx, r14
mov dword [rsp + 0x20], r10d
call fcn.10004fb28
cmp eax, ebp
jl 0x100052519
xor eax, eax
lea rdi, [rsp + 0x80]
mov rcx, r12
repne scasb al, byte [rdi]
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x80]
not rcx
mov dword [rsp + 0x50], ebp
mov qword [rsp + 0x20], rbp
lea r8, [rcx - 1]
mov rcx, qword [0x1000861e8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.1000535ec
lea rcx, [rsp + 0x190]
cmp rcx, rbp
je 0x100052541
lea rdx, [rsp + 0x190]
mov r8d, 0x7f
mov rcx, rax
call fcn.100052ef0
call fcn.100054364
lea rcx, [rsp + 0x5c0]
cmp rcx, rbp
je 0x100052569
lea rdx, [rsp + 0x5c0]
mov r8d, 0x103
mov rcx, rax
call fcn.100052ef0
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx edi, ax
lea rax, [rsp + 0x3b0]
cmp rax, rbp
je 0x100052591
lea rcx, [rsp + 0x3b0]
mov rdx, r14
call fcn.100058170
jmp 0x100052593
mov eax, ebp
cmp eax, ebp
je 0x100052646
movzx ebx, di
call fcn.100051fe0
xor edx, edx
lea ecx, [rdx + 4]
mov edi, eax
call fcn.100053778
lea rcx, [0x10002957c]
lea r9, [0x100029580]
cmp eax, ebp
lea rax, [rsp + 0x3b0]
lea r8, [0x100029590]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x5c0]
cmovne r9, rcx
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x190]
mov dword [rsp + 0x30], ebx
lea rcx, [rsp + 0x2a0]
mov rdx, r14
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call fcn.10004fb28
cmp eax, ebp
jl 0x100052646
xor eax, eax
lea rdi, [rsp + 0x2a0]
mov rcx, r12
repne scasb al, byte [rdi]
lea r9, [rsp + 0x50]
lea rdx, [rsp + 0x2a0]
not rcx
mov dword [rsp + 0x50], ebp
mov qword [rsp + 0x20], rbp
lea r8, [rcx - 1]
mov rcx, qword [0x1000861e8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x7d0]
xor rcx, rsp
call fcn.10007fa70
lea r11, [rsp + 0x7e0]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
ret