Function at 0x140003790
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 0x1400037f7
or eax, 0xffffffff
jmp 0x140004050
cmp dword [rsp + 0x50], 6
jae 0x140003807
or r13, 0xffffffffffffffff
jmp 0x14000402a
mov word [0x140018b20], si
mov rdx, qword [rax + 0x30]
lea rcx, [0x140018b20]
call fcn.140005870
mov edi, esi
lea rcx, [0x140002000]
mov eax, 0x36
cmp edi, eax
jge 0x140003863
movsxd rax, edi
mov rsi, qword [rcx + rax*8 + 0x158a0]
mov rcx, rsi
call fcn.140005524
xor ecx, ecx
mov edx, ecx
cmp edx, eax
jge 0x14000385e
movsxd rcx, edx
mov r8d, 0x17e5
xor word [rsi + rcx*2], r8w
add edx, r14d
jmp 0x140003847
add edi, r14d
jmp 0x140003820
mov rax, qword [rbx + 0x20]
mov qword [0x140017a50], 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, [0x1400035ac]
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, [0x1400173d4]
mov rcx, rdi
call fcn.1400057e8
test eax, eax
jne 0x1400038e0
mov r14d, esi
jmp 0x1400038f7
lea rdx, [0x1400173dc]
mov rcx, rdi
call fcn.1400057e8
test eax, eax
jne 0x140004011
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.140004a38
test eax, eax
jne 0x140003938
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
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.140004c94
test eax, eax
jne 0x14000397f
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
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, [0x140017590]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003ffc
lea r9, [rsp + 0x68]
mov r8, rdi
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x100]
call fcn.140003654
test eax, eax
je 0x140003ffc
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 [0x14001ab20], rax
test rax, rax
je 0x140003a53
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x58]
call qword [0x14001ab20]
cmp dword [rsp + 0x58], esi
je 0x140003ba5
mov rcx, r12
call fcn.140005524
add eax, 3
movsxd rcx, eax
mov eax, 2
mul rcx
cmovo rax, r13
mov rcx, rax
call fcn.140005338
mov r15, rax
mov rcx, qword [rbx]
call fcn.140005524
lea esi, [rax + rax - 8]
cmp word [r12], 0x22
jne 0x140003a99
add esi, 2
mov edi, esi
movsxd rbx, esi
mov r8, rbx
mov rdx, r12
mov rcx, r15
call fcn.1400058d0
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.140005870
lea ebx, [rsi + 0x68]
mov r8d, ebx
xor edx, edx
lea rcx, [rsp + 0x100]
call fcn.140005c20
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.140005c20
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.1400052c0
test ebx, ebx
je 0x140003ba5
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 0x140003ba0
cmp eax, 0x103
jne 0x140003ba0
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_Sleep]
add ebx, 2
jmp 0x140003b6e
jmp 0x140004050
mov rdi, qword [rsp + 0x70]
test r14d, r14d
jne 0x140003bd9
xor r8d, r8d
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
test eax, eax
jns 0x140003bd9
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
mov rcx, qword [rsp + 0x60]
call fcn.140005524
mov rbx, rax
mov rcx, rdi
call fcn.140005524
lea ecx, [rbx + rax + 0x10]
movsxd rcx, ecx
add rcx, rcx
call fcn.140005540
mov r15, rax
mov qword [rsp + 0x68], rax
mov rdx, rdi
mov rcx, rax
call qword [0x1400112f0]
mov rdx, qword [rsp + 0x60]
mov rcx, r15
call qword [0x1400112e8]
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, [0x140017410]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003da8
mov dword [rsp + 0x58], esi
mov dword [rsp + 0x70], esi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, [0x1400173f0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140003cea
cmp dword [rsp + 0x70], 3
jne 0x140003cea
mov eax, dword [rsp + 0x58]
cmp eax, 2
jb 0x140003cea
test al, 1
jne 0x140003cea
mov ecx, eax
call fcn.140005540
mov rbx, rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1400173f0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x140003ce6
mov rcx, rbx
call fcn.1400054b8
mov rbx, rsi
jmp 0x140003cea
mov edi, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x78], rsi
test rbx, rbx
je 0x140003da8
test edi, edi
je 0x140003da8
mov ecx, esi
lea r8, [0x140002000]
cmp ecx, edi
jge 0x140003d3c
movsxd rdx, ecx
mov eax, ecx
and eax, 0x8000001f
jge 0x140003d2b
dec eax
or eax, 0xffffffe0
inc eax
cdqe
mov al, byte [rax + r8 + 0x11a70]
xor byte [rdx + rbx], al
inc ecx
jmp 0x140003d14
cmp esi, edi
jge 0x140003da1
test r12d, r12d
jne 0x140003da1
movzx r15d, byte [rbx]
add esi, 4
cmp r15d, 0x10
jl 0x140003d9c
movsxd rax, esi
add rax, rbx
mov qword [rsp + 0x60], rax
lea r8d, [r12 + 0x10]
lea rdx, [rsp + 0xc0]
mov rcx, rax
call fcn.1400053f0
test eax, eax
jne 0x140003d9c
mov rcx, qword [rsp + 0x60]
add rcx, 0x10
lea r8d, [r12 + 0x10]
lea rdx, [rsp + 0xd0]
call fcn.1400053f0
mov ecx, 0x43001f
test eax, eax
cmove r12d, ecx
add esi, r15d
jmp 0x140003d3c
xor esi, esi
mov r15, qword [rsp + 0x68]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140003dbd
or r12d, 0x9400
cmp r14d, 1
jne 0x140003ef4
cmp r12b, 0x1f
je 0x140003ef4
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140017410]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov rcx, rbx
test eax, eax
je 0x140003e2f
call fcn.1400054b8
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
mov r12d, 0x24
add edi, r12d
movsxd rdx, edi
call fcn.140005d0c
mov rbx, rax
lea eax, [rdi - 1]
cmp eax, r12d
jl 0x140003e62
movsxd r8, eax
movsxd rcx, r12d
mov rdx, r8
sub rdx, rcx
mov cl, byte [rdx + rbx]
mov byte [r8 + rbx], cl
dec eax
jmp 0x140003e46
mov dword [rbx], 0x20
movups xmm0, xmmword [rsp + 0xc0]
movdqu xmmword [rbx + 4], xmm0
movups xmm1, xmmword [rsp + 0xd0]
movdqu xmmword [rbx + 0x14], xmm1
mov ecx, esi
lea r8, [0x140002000]
cmp ecx, edi
jge 0x140003eb3
movsxd rdx, ecx
mov eax, ecx
and eax, 0x8000001f
jge 0x140003ea2
dec eax
or eax, 0xffffffe0
inc eax
cdqe
mov al, byte [rax + r8 + 0x11a70]
xor byte [rdx + rbx], al
inc ecx
jmp 0x140003e8b
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rbx
mov r9d, 3
xor r8d, r8d
lea rdx, [0x1400173f0]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, rbx
call fcn.1400054b8
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x78], rsi
jmp 0x140003fe5
test r12d, r12d
jne 0x140003fe5
test r14d, r14d
jne 0x140003fe5
mov qword [rsp + 0x68], rsi
mov dword [rsp + 0x70], esi
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x68]
call fcn.140004620
mov rbx, qword [rsp + 0x68]
test rbx, rbx
jne 0x140003f40
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
mov qword [rsp + 0x60], rsi
lea rcx, [rsp + 0xe0]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0xe0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
test eax, eax
jne 0x140003f88
lea r8d, [rax + 0x10]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x90]
call fcn.1400058d0
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x90]
call fcn.140003000
mov r11, qword [rsp + 0x60]
mov qword [rsp + 0x68], r11
mov rax, qword [0x140017898]
lea rcx, [r11 + rax]
mov qword [rsp + 0x58], rcx
mov eax, dword [rsp + 0x70]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rbx
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0x60]
mov rcx, r15
call fcn.140004074
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
xor eax, eax
jmp 0x140004050
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x80]
call fcn.1400045cc
nop
jmp 0x14000402a
call qword [sym.imp.USER32.dll_GetForegroundWindow]
mov rcx, rax
mov r9d, 0x10
lea r8, str.Critical_error
lea rdx, str.An_error_occured_while_installing_main_application_assembly.
call qword [sym.imp.USER32.dll_MessageBoxW]
mov eax, r13d
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret