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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rsi, qword [rbp + 0x278]
xor r15d, r15d
mov r14, qword [rbp + 0x280]
mov ebx, 7
mov qword [rbp - 0x78], rbx
mov r13, r9
mov qword [rbp - 0x80], r15
mov r12d, r8d
mov word [rsp + 0x70], r15w
mov rdi, rcx
test edx, edx
jne 0x140001359
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ebx, eax
test eax, eax
jne 0x1400012ef
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x48], 0x7f
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x4c], eax
mov rcx, rsi
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r15
mov word [rsp + 0x50], r15w
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r15
jmp 0x140001817
dec eax
movsxd rdx, eax
cmp rdx, qword [rbp - 0x80]
ja 0x140001315
cmp qword [rbp - 0x78], 8
lea rax, [rsp + 0x70]
mov qword [rbp - 0x80], rdx
cmovae rax, qword [rsp + 0x70]
mov word [rax + rdx*2], r15w
jmp 0x140001326
sub rdx, qword [rbp - 0x80]
lea rcx, [rsp + 0x70]
xor r8d, r8d
call fcn.140002624
cmp qword [rbp - 0x78], 8
lea rdx, [rsp + 0x70]
mov ecx, ebx
cmovae rdx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x14000146f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x48], 0x84
jmp 0x1400012b3
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x60], r15
mov word [rbp - 0x70], r15w
cmp word [rbp - 0x10], r15w
jne 0x140001384
mov r8, r15
jmp 0x140001396
lea rax, [rbp - 0x10]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r15w
jne 0x14000138c
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x70]
call fcn.14000287c
mov eax, 0x5c
lea rdx, [rsp + 0x40]
or r8, 0xffffffffffffffff
mov word [rsp + 0x40], ax
lea rcx, [rbp - 0x70]
lea r9d, [rax - 0x5b]
call fcn.140002b30
cmp rax, 0xffffffffffffffff
jne 0x140001413
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x48], 0x8e
mov rcx, rsi
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x60], r15
mov word [rsp + 0x50], r15w
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
lea rcx, [rbp - 0x70]
mov qword [rdi], r15
jmp 0x14000180d
lea r9, [rax + 1]
mov qword [rbp - 0x38], rbx
xor r8d, r8d
mov qword [rbp - 0x40], r15
lea rdx, [rbp - 0x70]
mov word [rbp - 0x50], r15w
lea rcx, [rbp - 0x50]
call fcn.140002738
xor r8d, r8d
lea rcx, [rsp + 0x70]
mov dl, 1
call fcn.14000221c
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x70]
call fcn.140001e08
xor r8d, r8d
lea rcx, [rbp - 0x50]
mov dl, 1
call fcn.14000221c
xor r8d, r8d
lea rcx, [rbp - 0x70]
mov dl, 1
call fcn.14000221c
jmp 0x140001474
mov ebx, 7
lea rcx, [rbp - 0x30]
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x20], r15
mov word [rbp - 0x30], r15w
call fcn.140001b44
lea r8, str.Opera_installer_
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x48]
call section..text
or r9, 0xffffffffffffffff
lea rdx, [rbp - 0x30]
xor r8d, r8d
mov rcx, rax
call fcn.140002398
mov rdx, rax
mov qword [rbp - 0x38], rbx
lea rcx, [rbp - 0x50]
mov qword [rbp - 0x40], r15
mov word [rbp - 0x50], r15w
call fcn.140001e08
mov r8d, 4
lea rdx, str..dll
lea rcx, [rbp - 0x50]
call fcn.1400024c8
mov rdx, rax
mov qword [rbp - 0x58], rbx
lea rcx, [rbp - 0x70]
mov qword [rbp - 0x60], r15
mov word [rbp - 0x70], r15w
call fcn.140001e08
lea rdx, [rbp - 0x70]
mov rcx, r14
call fcn.140001d10
xor r8d, r8d
lea rcx, [rbp - 0x50]
mov dl, 1
call fcn.14000221c
xor r8d, r8d
lea rcx, [rsp + 0x48]
mov dl, 1
call fcn.14000221c
cmp qword [r14 + 0x18], 8
jb 0x140001530
mov rcx, qword [r14]
jmp 0x140001533
mov rcx, r14
mov qword [rsp + 0x30], r15
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
lea rcx, [rax + 1]
test rcx, 0xfffffffffffffffe
jne 0x1400015d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400015d7
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x48], 0x9f
mov rcx, rsi
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r15
mov word [rsp + 0x50], r15w
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r15
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140001809
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140001809
xor ecx, ecx
test r12d, r12d
je 0x140001618
mov r8d, r12d
mov qword [rsp + 0x20], rcx
sub r8d, r15d
lea r9, [rsp + 0x40]
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor ecx, ecx
test eax, eax
je 0x140001691
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140001691
add r15d, eax
cmp r15d, r12d
jne 0x1400015de
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000162b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor r13d, r13d
mov r15, rax
test rax, rax
jne 0x1400016de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x48], 0xb5
mov rcx, rsi
mov dword [rsp + 0x4c], eax
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r13
mov word [rsp + 0x50], r13w
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r13
jmp 0x140001809
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r14d, r14d
mov dword [rsp + 0x48], 0xa9
lea rdx, [rsp + 0x48]
mov dword [rsp + 0x4c], eax
mov rcx, rsi
mov qword [rsp + 0x60], r14
mov word [rsp + 0x50], r14w
mov qword [rsp + 0x68], 7
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r14
jmp 0x1400015bb
lea rdx, str.SetDefaultDllDirectories
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
test rax, rax
je 0x14000174c
mov ecx, 0x800
call r12
test eax, eax
jne 0x14000174c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x4c], eax
mov dword [rsp + 0x48], 0xc0
mov qword [rsp + 0x68], 7
mov qword [rsp + 0x60], r13
mov word [rsp + 0x50], r13w
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r13
jmp 0x140001800
mov rbx, r13
test r12, r12
je 0x140001796
lea rcx, str.version.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
test rax, rax
jne 0x140001796
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor r8d, r8d
mov dword [rsp + 0x48], 0xcd
xor edx, edx
mov dword [rsp + 0x4c], eax
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
call fcn.14000221c
jmp 0x140001728
cmp qword [r14 + 0x18], 8
jb 0x1400017a0
mov r14, qword [r14]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r14, rax
test rax, rax
jne 0x1400017ef
xor r8d, r8d
mov qword [rsp + 0x48], 0xd6
xor edx, edx
mov qword [rsp + 0x60], r13
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x68], r13
call fcn.14000221c
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140002a4c
xor r8d, r8d
lea rcx, [rsp + 0x50]
mov dl, 1
call fcn.14000221c
mov qword [rdi], r14
test rbx, rbx
je 0x140001800
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
lea rcx, [rbp - 0x30]
xor r8d, r8d
mov dl, 1
call fcn.14000221c
xor r8d, r8d
lea rcx, [rsp + 0x70]
mov dl, 1
call fcn.14000221c
mov rax, rdi
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.140002f80
mov rbx, qword [rsp + 0x358]
add rsp, 0x310
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret