Function at 0x140057f80
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, 0x2d8
movaps xmmword [rsp + 0x2c0], xmm6
mov rsi, rdx
mov rdi, rcx
movzx eax, byte [0x1402885b8]
test al, al
je 0x1400587c6
movzx eax, byte [0x1402885c0]
test al, al
je 0x14005880c
mov eax, dword [0x140288a40]
mov r14, qword [str.p_t_]
cmp qword [r14], rax
je 0x14005848d
lea rbx, [rsp + 0xb0]
mov ecx, 0x104
mov rdx, rbx
call qword [sym.imp.KERNEL32.DLL_GetTempPathW]
lea rcx, [0x140288a28]
mov rdx, rbx
call fcn.140072c50
lea rcx, [0x140288a10]
mov rdx, rax
call fcn.140072d10
mov rax, qword [0x1401fd040]
cmp byte [rax], 0
lea r13, [rsp + 0x98]
jne 0x1400580ee
mov qword [rsp + 0x20], r13
mov rdx, qword [0x1401ff988]
lea rbx, [rsp + 0x50]
mov r8d, 4
mov rcx, rbx
mov r9, 0xffffffffffffffff
call fcn.140072820
lea rdx, str.windows_
mov rcx, rbx
call fcn.140072e90
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 [0x140288a10], 1
je 0x140058099
mov rcx, qword [0x140288a20]
call fcn.14006fbd0
mov byte [0x140288a10], r12b
lea rdx, [0x140288a10]
mov byte [0x140288a11], bl
mov word [0x140288a12], bp
mov rax, qword [rsp + 0x70]
mov qword [0x140288a14], rax
mov eax, dword [rsp + 0x78]
mov dword [0x140288a1c], eax
mov qword [0x140288a20], r15
lea rcx, [0x140288a28]
call fcn.140072d10
test byte [rsp + 0x50], 1
je 0x1400580ee
mov rcx, qword [rsp + 0x60]
call fcn.14006fbd0
lea rcx, [0x140288a10]
lea rdx, [0x1401fe15a]
call fcn.140072e90
test byte [0x140288a10], 1
je 0x140058113
mov rcx, qword [0x140288a20]
jmp 0x14005811a
lea rcx, [0x140288a12]
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 [0x1401ff9a8]
mov rdx, qword [rax]
mov r8d, dword [r14]
mov qword [rsp + 0x20], 0
lea r9, [0x140288a40]
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]
nop dword [rax + rax]
mov ecx, 1
mov edx, 0x3e8
call sub.msvcrt.dll_calloc
test rax, rax
je 0x1400581a0
mov rbx, rax
mov dword [rsp + 0x90], 0
mov rax, qword [0x1401ff990]
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, [0x1401fe172]
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, [0x1401ff976]
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 0x140058852
mov r15, rax
cmp rax, 0x16
ja 0x1400582c3
lea eax, [r15 + r15]
mov byte [rsp + 0x70], al
lea r12, [rsp + 0x71]
jmp 0x1400582f7
mov rbp, r13
mov r13, r15
or r13, 0xf
lea rcx, [r13 + 1]
call fcn.14006fb50
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.140071fd0
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 0x14005834b
mov rdx, qword [rsp + 0x60]
jmp 0x140058350
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, [0x1401ff976]
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 0x1400583e7
mov rcx, qword [rsp + 0x60]
call fcn.14006fbd0
test byte [rsp + 0x70], 1
je 0x1400583fb
mov rcx, qword [rsp + 0x80]
call fcn.14006fbd0
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, [0x1401ff976]
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.1401f47c0
mov rbx, qword [rdi]
cmp rbx, qword [rdi + 8]
je 0x14005879d
movabs r14, 0x1fffffffffffffff
lea r15, [rsp + 0xb2]
lea r13, [rsp + 0xb2]
xorps xmm6, xmm6
mov qword [rsp + 0xa0], rdi
jmp 0x1400584ee
mov rax, qword [rsp + 0x50]
mov qword [r8], rax
add r8, 8
mov qword [rsi + 8], r8
nop word cs:[rax + rax]
add rbx, 0x18
cmp rbx, qword [rdi + 8]
je 0x14005879d
movzx eax, byte [rbx]
test al, 1
je 0x140058500
mov rax, qword [rbx + 8]
test rax, rax
jne 0x140058508
jmp 0x1400584e0
shr rax, 1
test rax, rax
je 0x1400584e0
test rsi, rsi
je 0x140058620
mov qword [rsp + 0x50], 0
test byte [0x140288a10], 1
lea r12, [0x140288a12]
je 0x140058531
mov r12, qword [0x140288a20]
lea rcx, [rsp + 0xb0]
lea rdx, str._nobanner__z
mov r8, rbx
call fcn.140013d30
test byte [rsp + 0xb0], 1
mov rdx, r15
je 0x14005855d
mov rdx, qword [rsp + 0xc0]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x30], 0
mov byte [rsp + 0x20], 0
mov rcx, r12
mov r8b, 1
xor r9d, r9d
call fcn.140057a40
mov ebp, eax
test byte [rsp + 0xb0], 1
je 0x14005859c
mov rcx, qword [rsp + 0xc0]
call fcn.14006fbd0
test ebp, ebp
je 0x1400584e0
mov r8, qword [rsi + 8]
cmp r8, qword [rsi + 0x10]
jne 0x1400584c1
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 0x1400587b9
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 0x14005869b
cmp rbp, r14
ja 0x1400587c1
lea rcx, [rbp*8]
call fcn.14006fb50
mov rcx, qword [rsi]
mov r8, qword [rsi + 8]
jmp 0x14005869d
test byte [0x140288a10], 1
lea r12, [0x140288a12]
je 0x140058637
mov r12, qword [0x140288a20]
lea rcx, [rsp + 0xb0]
lea rdx, str._nobanner__z
mov r8, rbx
call fcn.140013d30
test byte [rsp + 0xb0], 1
mov rdx, r13
je 0x140058663
mov rdx, qword [rsp + 0xc0]
movups xmmword [rsp + 0x28], xmm6
mov byte [rsp + 0x20], 0
mov rcx, r12
mov r8b, 1
xor r9d, r9d
call fcn.140057a40
test byte [rsp + 0xb0], 1
je 0x1400584e0
mov rcx, qword [rsp + 0xc0]
call fcn.14006fbd0
jmp 0x1400584e0
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 0x140058768
add r10, 0xfffffffffffffff8
cmp r10, 0x98
jae 0x1400586cb
mov r9, r8
jmp 0x140058750
add r12, rax
mov r9, r8
sub r9, r12
cmp r9, 0x20
jae 0x1400586df
mov r9, r8
jmp 0x140058750
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
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 0x140058710
cmp r10, r14
movabs r14, 0x1fffffffffffffff
lea r15, [rsp + 0xb2]
je 0x140058765
nop word [rax + rax]
mov r8, qword [r9 - 8]
add r9, 0xfffffffffffffff8
mov qword [rdx - 8], r8
add rdx, 0xfffffffffffffff8
cmp r9, rcx
jne 0x140058750
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 0x1400584e0
call fcn.14006fbd0
jmp 0x1400584e0
movaps xmm6, xmmword [rsp + 0x2c0]
add rsp, 0x2d8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rsi
call fcn.1400404e0
call fcn.140002f60
lea rcx, [0x1402885b8]
call fcn.14006e284
test eax, eax
je 0x140057fb0
xorps xmm0, xmm0
movups xmmword [0x140288a10], xmm0
mov qword [0x140288a20], 0
lea rcx, [0x1400588c0]
call fcn.140001370
lea rcx, [0x1402885b8]
call fcn.14006e35f
jmp 0x140057fb0
lea rcx, [0x1402885c0]
call fcn.14006e284
test eax, eax
je 0x140057fbf
xorps xmm0, xmm0
movups xmmword [0x140288a28], xmm0
mov qword [0x140288a38], 0
lea rcx, [0x1400588e0]
call fcn.140001370
lea rcx, [0x1402885c0]
call fcn.14006e35f
jmp 0x140057fbf
lea rcx, [rsp + 0x70]
call fcn.140030800
jmp 0x14005885e
mov rsi, rax
test byte [rsp + 0x50], 1
je 0x1400588b5
mov rcx, qword [rsp + 0x60]
jmp 0x1400588b0
call fcn.14006fbd0
mov rcx, rsi
call fcn.14009a110
int3