Function at 0x140004790
Capabilities:
Accept command line arguments
Check for foreground window switch
Check if file exists
Create directory
Create process on windows
Create process suspended
Create thread
Get file attributes
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push r13
push r14
push r15
sub rsp, 0x170
mov qword [rsp + 0xf0], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r12
xor esi, esi
mov dword [rsp + 0x50], esi
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov r12, rax
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov rbx, rax
mov qword [rsp + 0x80], rax
lea r14d, [rsi + 1]
cmp dword [rsp + 0x50], r14d
jne 0x1400047f7
or eax, 0xffffffff
jmp 0x140005050
cmp dword [rsp + 0x50], 6
jae 0x140004807
or r13, 0xffffffffffffffff
jmp 0x14000502a
mov word [0x140019b20], si
mov rdx, qword [rax + 0x30]
lea rcx, [0x140019b20]
call fcn.140006870
mov edi, esi
lea rcx, [0x140003000]
mov eax, 0x36
cmp edi, eax
jge 0x140004863
movsxd rax, edi
mov rsi, qword [rcx + rax*8 + 0x158a0]
mov rcx, rsi
call fcn.140006524
xor ecx, ecx
mov edx, ecx
cmp edx, eax
jge 0x14000485e
movsxd rcx, edx
mov r8d, 0x17e5
xor word [rsi + rcx*2], r8w
add edx, r14d
jmp 0x140004847
add edi, r14d
jmp 0x140004820
mov rax, qword [rbx + 0x20]
mov qword [0x140018a50], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rcx, rax
or r13, 0xffffffffffffffff
mov edx, r13d
call qword [sym.imp.KERNEL32.dll_SetThreadPriority]
xor esi, esi
mov dword [rsp + 0x88], esi
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], esi
xor r9d, r9d
lea r8, [0x1400045ac]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [rsi + 0xf]
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rdi, qword [rbx + 8]
lea rdx, [0x1400183d4]
mov rcx, rdi
call fcn.1400067e8
test eax, eax
jne 0x1400048e0
mov r14d, esi
jmp 0x1400048f7
lea rdx, [0x1400183dc]
mov rcx, rdi
call fcn.1400067e8
test eax, eax
jne 0x140005011
mov rdi, qword [rbx + 0x28]
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
mov r9, rdi
mov r8, qword [rbx + 0x20]
mov rdx, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x10]
call fcn.140005a38
test eax, eax
jne 0x140004938
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400055cc
nop
jmp 0x14000502a
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
lea r9, [rsp + 0x58]
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0xa8]
call fcn.140005c94
test eax, eax
jne 0x14000497f
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400055cc
nop
jmp 0x14000502a
movups xmm0, xmmword [rsp + 0xa8]
movaps xmmword [rsp + 0x100], xmm0
movups xmm1, xmmword [rsp + 0xb8]
movaps xmmword [rsp + 0x110], xmm1
movups xmm0, xmmword [rsp + 0xc8]
movaps xmmword [rsp + 0x120], xmm0
movsd xmm1, qword [rsp + 0xd8]
movsd qword [rsp + 0x130], xmm1
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
lea rdx, [0x140018590]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004ffc
lea r9, [rsp + 0x68]
mov r8, rdi
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x100]
call fcn.140004654
test eax, eax
je 0x140004ffc
mov dword [rsp + 0x58], esi
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rcx, rax
lea rdx, str.IsWow64Process
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14001bb20], rax
test rax, rax
je 0x140004a53
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x58]
call qword [0x14001bb20]
cmp dword [rsp + 0x58], esi
je 0x140004ba5
mov rcx, r12
call fcn.140006524
add eax, 3
movsxd rcx, eax
mov eax, 2
mul rcx
cmovo rax, r13
mov rcx, rax
call fcn.140006338
mov r15, rax
mov rcx, qword [rbx]
call fcn.140006524
lea esi, [rax + rax - 8]
cmp word [r12], 0x22
jne 0x140004a99
add esi, 2
mov edi, esi
movsxd rbx, esi
mov r8, rbx
mov rdx, r12
mov rcx, r15
call fcn.1400068d0
movsxd r11, r15d
mov eax, 0x36
mov word [r11 + rbx], ax
add esi, 2
movsxd rax, esi
mov ecx, 0x34
mov word [rax + r11], cx
lea eax, [rsi + 2]
cdqe
xor esi, esi
mov word [rax + r11], si
lea eax, [r12 + rdi]
movsxd rdx, eax
mov rcx, r15
call fcn.140006870
lea ebx, [rsi + 0x68]
mov r8d, ebx
xor edx, edx
lea rcx, [rsp + 0x100]
call fcn.140006c20
mov dword [rsp + 0x100], ebx
lea rcx, [rsp + 0x100]
call qword [sym.imp.KERNEL32.dll_GetStartupInfoW]
xor edx, edx
lea r8d, [rsi + 0x18]
lea rcx, [rsp + 0x90]
call fcn.140006c20
lea r11, [rsp + 0x90]
mov qword [rsp + 0x48], r11
lea rax, [rsp + 0x100]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
mov rdx, r15
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebx, eax
mov rcx, r15
call fcn.1400062c0
test ebx, ebx
je 0x140004ba5
mov ebx, esi
lea rdx, [rsp + 0x58]
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
mov eax, dword [rsp + 0x58]
je 0x140004ba0
cmp eax, 0x103
jne 0x140004ba0
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 2
jmp 0x140004b6e
jmp 0x140005050
mov rdi, qword [rsp + 0x70]
test r14d, r14d
jne 0x140004bd9
xor r8d, r8d
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jns 0x140004bd9
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400055cc
nop
jmp 0x14000502a
mov rcx, qword [rsp + 0x60]
call fcn.140006524
mov rbx, rax
mov rcx, rdi
call fcn.140006524
lea ecx, [rbx + rax + 0x10]
movsxd rcx, ecx
add rcx, rcx
call fcn.140006540
mov r15, rax
mov qword [rsp + 0x68], rax
mov rdx, rdi
mov rcx, rax
call qword [0x1400122f0]
mov rdx, qword [rsp + 0x60]
mov rcx, r15
call qword [0x1400122e8]
mov r12d, esi
mov qword [rsp + 0x78], rsi
mov rbx, rsi
mov edi, esi
lea rax, [rsp + 0x78]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
lea rdx, [0x140018410]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004da8
mov dword [rsp + 0x58], esi
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400055cc
nop
jmp 0x14000502a
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400055cc
nop
jmp 0x14000502a