Function at 0x180004d10
Capabilities:
Delete file
Get common file path
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov dword [rax + 0x20], r9d
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0xba8]
sub rsp, 0xc80
and dword [rbp + 0xbc8], 0
mov rax, rdx
mov r15, r8
mov r14, rcx
lea r8, [rbp + 0xbc8]
mov edx, 2
mov rcx, rax
call qword [sym.imp.msi.dll_MsiOpenProductW]
test eax, eax
jne 0x180004ff6
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea rcx, [rsp + 0x44]
mov dword [rsp + 0x44], eax
call qword [sym.imp.ntdll.dll_RtlRandom]
mov rcx, qword [0x180013580]
mov ebx, eax
mov eax, 0x80808081
mov r12d, 1
mul ebx
shr edx, 7
imul edx, edx, 0xff
sub ebx, edx
xor edx, edx
add ebx, r12d
mov r8d, ebx
mov esi, ebx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test ebx, ebx
je 0x180004dbd
mov r8d, esi
mov dl, r12b
mov rcx, rax
call sub.ntdll.dll_memset
test rdi, rdi
je 0x180004fea
lea rax, [rsp + 0x44]
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov rax, qword [r14 + 8]
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.1800063f0
mov r12, qword [rsp + 0x50]
mov rdx, qword [r14 + 8]
mov rcx, qword [r14]
lea rax, [rsp + 0x48]
mov r8, r15
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
call fcn.180002040
test eax, eax
je 0x180004fc6
lea rdx, [rbp + 0x170]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea r9, [rsp + 0x60]
lea rdx, [0x18001055c]
lea rcx, [rbp + 0x170]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea rdx, [0x1800104a8]
lea rcx, [rsp + 0x60]
call fcn.18000cad0
and qword [rsp + 0x30], 0
lea rcx, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x180004fb2
mov r8d, dword [rsp + 0x48]
mov rdx, qword [rsp + 0x58]
and dword [rsp + 0x50], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor ebx, ebx
mov rcx, rsi
test eax, eax
lea r14d, [rbx + 1]
cmovne ebx, r14d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x180004fb2
mov ebx, dword [rbp + 0xbc8]
mov ecx, r14d
call qword [sym.imp.msi.dll_MsiDatabaseExportA]
test eax, eax
je 0x180004fa7
lea rdx, [rsp + 0x60]
mov r8d, eax
mov ecx, ebx
call fcn.180005374
test eax, eax
je 0x180004fa7
mov edx, dword [rbp + 0xbc8]
call fcn.180005420
test eax, eax
je 0x180004fa7
mov ebx, dword [rbp + 0xbc8]
lea rax, [0x1800105a8]
lea r9, str.ValidatePID
mov qword [rsp + 0x28], rax
lea rax, str.NULL
lea r8, str.INSERT_INTO__InstallExecuteSequence____Action____Condition____Sequence___VALUES___s___s___s_
lea rcx, [rbp + 0x380]
mov edx, 0x400
mov qword [rsp + 0x20], rax
call fcn.18000cb8c
and dword [rsp + 0x40], 0
lea r8, [rsp + 0x40]
lea rdx, [rbp + 0x380]
mov ecx, ebx
call qword [sym.imp.msi.dll_MsiEnumClientsA]
test eax, eax
jne 0x180004fa7
mov ecx, dword [rsp + 0x40]
xor edx, edx
call qword [sym.imp.msi.dll_MsiViewModify]
test eax, eax
jne 0x180004fa7
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.msi.dll_MsiViewGetErrorW]
test eax, eax
jne 0x180004fa7
mov ecx, dword [rbp + 0xbc8]
call qword [sym.imp.msi.dll_MsiDatabaseGenerateTransformW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r8, qword [rsp + 0x58]
mov rcx, qword [0x180013580]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180013580]
mov r8, r12
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rcx, qword [0x180013580]
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [rbp + 0xbc8]
call qword [sym.imp.msi.dll_MsiConfigureFeatureFromDescriptorA]
lea r11, [rsp + 0xc80]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret