Function at 0x140057e50
Capabilities:
Get common file path
Set registry value
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x2b8
mov rsi, rdx
mov rdi, rcx
movzx eax, byte [0x1402da618]
test al, al
je 0x14005867e
movzx eax, byte [0x1402da620]
test al, al
je 0x1400586c4
mov eax, dword [0x1402daaa0]
mov r14, qword [0x1402622b0]
cmp qword [r14], rax
je 0x14005834b
lea rbx, [rsp + 0xb0]
mov ecx, 0x104
mov rdx, rbx
call qword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea rcx, [0x1402daa88]
mov rdx, rbx
call fcn.140076120
lea rcx, [0x1402daa70]
mov rdx, rax
call fcn.1400761e0
mov rax, qword [0x140261190]
cmp byte [rax], 0
lea r13, [rsp + 0x98]
jne 0x140057fb6
mov qword [rsp + 0x20], r13
mov rdx, qword [0x140262298]
lea rbx, [rsp + 0x50]
mov r8d, 4
mov rcx, rbx
mov r9, 0xffffffffffffffff
call fcn.140075cf0
lea rdx, str.windows_
mov rcx, rbx
call fcn.140076360
movzx r12d, byte [rax]
movzx ebx, byte [rax + 1]
movzx ebp, word [rax + 2]
mov ecx, dword [rax + 0xc]
mov dword [rsp + 0x78], ecx
mov rcx, qword [rax + 4]
mov qword [rsp + 0x70], rcx
mov r15, qword [rax + 0x10]
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
test byte [0x1402daa70], 1
je 0x140057f61
mov rcx, qword [0x1402daa80]
call fcn.140073240
mov byte [0x1402daa70], r12b
lea rdx, [0x1402daa70]
mov byte [0x1402daa71], bl
mov word [0x1402daa72], bp
mov rax, qword [rsp + 0x70]
mov qword [0x1402daa74], rax
mov eax, dword [rsp + 0x78]
mov dword [0x1402daa7c], eax
mov qword [0x1402daa80], r15
lea rcx, [0x1402daa88]
call fcn.1400761e0
test byte [rsp + 0x50], 1
je 0x140057fb6
mov rcx, qword [rsp + 0x60]
call fcn.140073240
lea rcx, [0x1402daa70]
lea rdx, [0x1402621ba]
call fcn.140076360
test byte [0x1402daa70], 1
je 0x140057fdb
mov rcx, qword [0x1402daa80]
jmp 0x140057fe2
lea rcx, [0x1402daa72]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov edx, 0x10000000
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.KERNEL32.DLL_CreateFileW]
mov rbx, rax
mov rax, qword [0x1402622a8]
mov rdx, qword [rax]
mov r8d, dword [r14]
mov qword [rsp + 0x20], 0
lea r9, [0x1402daaa0]
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
mov rcx, rbx
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
call qword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
lea r8, [rsp + 0xa8]
mov rcx, rax
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ecx, 1
mov edx, 0x3e8
call sub.msvcrt.dll_calloc
mov rbx, rax
mov dword [rsp + 0x90], 0
mov rax, qword [0x1402622a0]
mov rcx, qword [rsp + 0xa8]
lea rdx, [rsp + 0x90]
mov qword [rsp + 0x20], rdx
mov edx, 1
mov r8, rbx
mov r9d, 0x3e8
call qword [rax]
mov qword [rsp + 0x88], 0
mov rcx, qword [rbx]
lea rdx, [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidA]
lea rbp, [rsp + 0x50]
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 0
lea rdx, [0x1402621d2]
mov rcx, 0xffffffff80000001
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [rsp + 0x70], 1
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 4
lea rdx, [0x140262284]
xor r8d, r8d
mov r9d, 4
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r14, qword [rsp + 0x88]
mov rcx, r14
call sub.msvcrt.dll_strlen
cmp rax, 0xfffffffffffffff0
jae 0x14005870a
mov r15, rax
cmp rax, 0x16
ja 0x140058181
lea eax, [r15 + r15]
mov byte [rsp + 0x70], al
lea r12, [rsp + 0x71]
jmp 0x1400581b5
mov rbp, r13
mov r13, r15
or r13, 0xf
lea rcx, [r13 + 1]
call fcn.1400731c0
mov r12, rax
mov qword [rsp + 0x80], rax
add r13, 2
mov qword [rsp + 0x70], r13
mov r13, rbp
lea rbp, [rsp + 0x50]
mov qword [rsp + 0x78], r15
mov rcx, r12
mov rdx, r14
mov r8, r15
call sub.msvcrt.dll_memmove
mov byte [r12 + r15], 0
lea rdx, str.SoftwareSysinternalsSDelete
lea r14, [rsp + 0x70]
mov rcx, r14
call fcn.140075640
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x60], rcx
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x50], xmm0
xorps xmm0, xmm0
movups xmmword [rax], xmm0
mov qword [rax + 0x10], 0
test byte [rsp + 0x50], 1
je 0x140058209
mov rdx, qword [rsp + 0x60]
jmp 0x14005820e
lea rdx, [rsp + 0x51]
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 0
mov rcx, 0xffffffff80000003
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [rsp + 0x94], 1
mov rcx, qword [rsp + 0x98]
lea rax, [rsp + 0x94]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x28], 4
lea rdx, [0x140262284]
xor r8d, r8d
mov r9d, 4
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test byte [rsp + 0x50], 1
je 0x1400582a5
mov rcx, qword [rsp + 0x60]
call fcn.140073240
test byte [rsp + 0x70], 1
je 0x1400582b9
mov rcx, qword [rsp + 0x80]
call fcn.140073240
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], 0
lea rdx, str..DEFAULTSoftwareSysinternalsSDelete
mov rcx, 0xffffffff80000003
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [rsp + 0x70], 1
mov rcx, qword [rsp + 0x50]
mov qword [rsp + 0x20], r14
mov dword [rsp + 0x28], 4
lea rdx, [0x140262284]
xor r8d, r8d
mov r9d, 4
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.DLL_LocalFree]
mov rcx, rbx
call fcn.140257dd0
mov rbx, qword [rdi]
cmp rbx, qword [rdi + 8]
je 0x14005865d
movabs r14, 0x1fffffffffffffff
lea r15, [rsp + 0xb2]
lea r13, [rsp + 0xb2]
mov qword [rsp + 0xa0], rdi
jmp 0x14005839e
mov rax, qword [rsp + 0x50]
mov qword [r8], rax
add r8, 8
mov qword [rsi + 8], r8
nop dword [rax]
add rbx, 0x18
cmp rbx, qword [rdi + 8]
je 0x14005865d
movzx eax, byte [rbx]
test al, 1
je 0x1400583b0
mov rax, qword [rbx + 8]
test rax, rax
jne 0x1400583b8
jmp 0x140058390
shr rax, 1
test rax, rax
je 0x140058390
test rsi, rsi
je 0x1400584d0
mov qword [rsp + 0x50], 0
test byte [0x1402daa70], 1
lea r12, [0x1402daa72]
je 0x1400583e1
mov r12, qword [0x1402daa80]
lea rcx, [rsp + 0xb0]
lea rdx, str._nobanner__z
mov r8, rbx
call fcn.140013830
test byte [rsp + 0xb0], 1
mov rdx, r15
je 0x14005840d
mov rdx, qword [rsp + 0xc0]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov byte [rsp + 0x20], 0
mov rcx, r12
mov r8b, 1
xor r9d, r9d
call fcn.1400579b0
mov ebp, eax
test byte [rsp + 0xb0], 1
je 0x140058443
mov rcx, qword [rsp + 0xc0]
call fcn.140073240
test ebp, ebp
je 0x140058390
mov r8, qword [rsi + 8]
cmp r8, qword [rsi + 0x10]
jne 0x14005837c
mov rdi, r13
mov rcx, qword [rsi]
mov r12, r8
sub r12, rcx
mov r13, r12
sar r13, 3
lea rax, [r13 + 1]
cmp rax, r14
ja 0x140058671
mov rbp, r12
shr rbp, 2
cmp rbp, rax
cmovbe rbp, rax
movabs rax, 0x7ffffffffffffff8
cmp r12, rax
cmovae rbp, r14
test rbp, rbp
je 0x14005854f
cmp rbp, r14
ja 0x140058679
lea rcx, [rbp*8]
call fcn.1400731c0
mov rcx, qword [rsi]
mov r8, qword [rsi + 8]
jmp 0x140058551
test byte [0x1402daa70], 1
lea r12, [0x1402daa72]
je 0x1400584e7
mov r12, qword [0x1402daa80]
lea rcx, [rsp + 0xb0]
lea rdx, str._nobanner__z
mov r8, rbx
call fcn.140013830
test byte [rsp + 0xb0], 1
mov rdx, r13
je 0x140058513
mov rdx, qword [rsp + 0xc0]
mov qword [rsp + 0x28], 0
mov byte [rsp + 0x20], 0
mov rcx, r12
mov r8b, 1
xor r9d, r9d
call fcn.1400579b0
test byte [rsp + 0xb0], 1
je 0x140058390
mov rcx, qword [rsp + 0xc0]
call fcn.140073240
jmp 0x140058390
xor eax, eax
lea rdx, [rax + r13*8]
mov r9, qword [rsp + 0x50]
mov qword [rax + r13*8], r9
mov r10, r8
sub r10, rcx
je 0x140058628
add r10, 0xfffffffffffffff8
cmp r10, 0x98
jae 0x14005857f
mov r9, r8
jmp 0x140058610
add r12, rax
mov r9, r8
sub r9, r12
cmp r9, 0x20
jae 0x140058593
mov r9, r8
jmp 0x140058610
shr r10, 3
inc r10
mov r14, r10
and r14, 0xfffffffffffffffc
lea r11, [r14*8]
sub rdx, r11
mov r9, r8
sub r9, r11
lea r12, [rax + r13*8]
add r12, 0xfffffffffffffff0
mov r11, r14
neg r11
xor r15d, r15d
nop word cs:[rax + rax]
movups xmm0, xmmword [r8 + r15*8 - 0x20]
movups xmm1, xmmword [r8 + r15*8 - 0x10]
movups xmmword [r12 + r15*8], xmm1
movups xmmword [r12 + r15*8 - 0x10], xmm0
add r15, 0xfffffffffffffffc
cmp r11, r15
jne 0x1400585d0
cmp r10, r14
movabs r14, 0x1fffffffffffffff
lea r15, [rsp + 0xb2]
je 0x140058625
nop word [rax + rax]
mov r8, qword [r9 - 8]
add r9, 0xfffffffffffffff8
mov qword [rdx - 8], r8
add rdx, 0xfffffffffffffff8
cmp r9, rcx
jne 0x140058610
mov rcx, qword [rsi]
lea r8, [rax + rbp*8]
lea rax, [rax + r13*8]
add rax, 8
mov qword [rsi], rdx
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], r8
test rcx, rcx
mov r13, rdi
mov rdi, qword [rsp + 0xa0]
je 0x140058390
call fcn.140073240
jmp 0x140058390
add rsp, 0x2b8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call fcn.14003e380
call fcn.140002ba0
lea rcx, [0x1402da618]
call fcn.1400718f0
test eax, eax
je 0x140057e78
xorps xmm0, xmm0
movups xmmword [0x1402daa70], xmm0
mov qword [0x1402daa80], 0
lea rcx, [0x140058780]
call fcn.140001370
lea rcx, [0x1402da618]
call fcn.1400719cb
jmp 0x140057e78
lea rcx, [0x1402da620]
call fcn.1400718f0
test eax, eax
je 0x140057e87
xorps xmm0, xmm0
movups xmmword [0x1402daa88], xmm0
mov qword [0x1402daa98], 0
lea rcx, [0x1400587a0]
call fcn.140001370
lea rcx, [0x1402da620]
call fcn.1400719cb
jmp 0x140057e87
lea rcx, [rsp + 0x70]
call fcn.140035730
jmp 0x140058716
mov rsi, rax
test byte [rsp + 0x50], 1
je 0x14005876d
mov rcx, qword [rsp + 0x60]
jmp 0x140058768
call fcn.140073240
mov rcx, rsi
call fcn.14009d370
int3