Function at 0x1400a5560
Capabilities:
Check if file exists
Create process on windows
Get common file path
Get program files directory
Get session user name
Get startup folder
Impersonate user

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2d0]
sub rsp, 0x3d0
mov rax, qword [0x14011d8d0]
xor rax, rsp
mov qword [rbp + 0x2c0], rax
mov r15, qword [rbp + 0x330]
xor r13d, r13d
mov rbx, r9
mov rsi, r8
mov qword [rbp - 0x20], rdx
mov qword [rbp - 0x28], r15
test r15, r15
jne 0x1400a55b8
mov r13d, 0x80004005
jmp 0x1400a5e40
mov word [r15], r13w
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
or r12, 0xffffffffffffffff
add rax, 0x18
mov qword [rbp - 0x78], rax
test rbx, rbx
je 0x1400a561c
test rbx, 0xffffffffffff0000
jne 0x1400a5609
movzx edi, bx
xor edx, edx
mov ecx, edi
call fcn.1400017e0
test rax, rax
je 0x1400a562e
lea rcx, [rbp - 0x78]
mov r8d, edi
mov rdx, rax
call fcn.140001f70
jmp 0x1400a562e
xor eax, eax
mov rcx, r12
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x1400a561f
mov ecx, r13d
mov r8d, ecx
lea rcx, [rbp - 0x78]
mov rdx, rbx
call fcn.140001e80
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
lea rcx, [rsp + 0x60]
add rax, 0x18
mov qword [rbp - 0x58], rax
call fcn.1400386c0
xor eax, eax
lea rdi, [rbp]
mov ecx, reloc.ATL100.DLL_Ordinal_56
lea rdx, [rbp - 0x80]
rep stosb byte [rdi], al
xor ecx, ecx
xor bl, bl
mov qword [rbp - 0x70], r13
mov dword [rbp - 0x80], r13d
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov ecx, dword [rbp - 0x80]
test eax, eax
jne 0x1400a5683
test ecx, ecx
je 0x1400a5713
mov eax, 2
mul rcx
cmovo rax, r12
mov rcx, rax
call fcn.1400ca8e8
lea rdx, [rbp - 0x80]
mov rcx, rax
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x1400a5706
test rdi, rdi
je 0x1400a5713
mov dword [rbp], reloc.ATL100.DLL_Ordinal_56
mov qword [rbp + 8], rdi
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea rdx, [rbp - 0x70]
mov ecx, eax
call sub.WTSAPI32.dll_WTSQueryUserToken
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x1400a5706
lea rdx, [rbp]
call qword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
je 0x1400a5706
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x1400a5706
mov r8, qword [rbp + 0x30]
lea rdx, [rbp - 0x58]
lea rcx, [rsp + 0x60]
call fcn.140002db0
movzx ebx, al
test rdi, rdi
je 0x1400a5713
mov rcx, rdi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void____ptr64_
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov rdx, qword [rbp + 0x30]
test rdx, rdx
je 0x1400a5731
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x1400a5744
call qword [sym.imp.USERENV.dll_UnloadUserProfile]
mov rcx, qword [rbp - 0x70]
test rcx, rcx
je 0x1400a5744
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x70], r13
lea rdx, [rbp - 0x58]
lea rcx, [rsp + 0x60]
call fcn.1400034f0
mov rcx, qword [rbp - 0x78]
lea rdx, reloc.ATL100.DLL_Ordinal_49
movzx edi, al
call qword [sym.imp.MSVCR100.dll__wcsicmp]
test eax, eax
jne 0x1400a5787
test dil, dil
jne 0x1400a577e
test bl, bl
jne 0x1400a577e
mov r13d, 0x20000025
jmp 0x1400a5df8
mov dword [rbp - 0x5c], 2
jmp 0x1400a57a7
test dil, dil
jne 0x1400a579b
test bl, bl
jne 0x1400a579b
mov r13d, 0x20000025
jmp 0x1400a5df8
mov edi, r13d
test bl, bl
sete dil
mov dword [rbp - 0x5c], edi
xor r14b, r14b
mov dword [rbp - 0x60], r14d
call fcn.1400193c0
cmp eax, 0x60
jl 0x1400a5879
call fcn.140021f80
test al, al
je 0x1400a5879
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rbp - 0x40], rdi
test rsi, rsi
je 0x1400a5825
test rsi, 0xffffffffffff0000
jne 0x1400a5812
movzx ebx, si
xor edx, edx
mov ecx, ebx
call fcn.1400017e0
test rax, rax
je 0x1400a583b
lea rcx, [rbp - 0x40]
mov r8d, ebx
mov rdx, rax
call fcn.140001f70
jmp 0x1400a5837
xor eax, eax
mov rcx, r12
mov rdi, rsi
repne scasw ax, word [rdi]
not rcx
dec rcx
jmp 0x1400a5828
mov ecx, r13d
mov r8d, ecx
lea rcx, [rbp - 0x40]
mov rdx, rsi
call fcn.140001e80
mov rdi, qword [rbp - 0x40]
lea rdx, reloc.ATL100.DLL_Ordinal_49
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll__wcsicmp]
movzx r14d, r14b
lea rdx, [rdi - 0x18]
test eax, eax
mov eax, 1
cmove r14d, eax
mov eax, r12d
mov dword [rbp - 0x60], r14d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5879
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
lea rcx, [0x14011d880]
lea rsi, [rax + 0x18]
mov rax, qword [0x14011d880]
mov qword [rbp - 0x68], rsi
call qword [rax + 0x18]
lea rdi, [rbp + 0xb0]
lea rbx, [rax + 0x18]
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
lea rdx, [rbp + 0xb0]
lea r8d, [rax + 0x26]
xor r9d, r9d
xor ecx, ecx
mov qword [rsp + 0x78], rbx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x1400a5a6d
xor eax, eax
lea rdi, [rbp + 0xb0]
mov rcx, r12
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x1400a595b
mov rdi, qword [rbx - 0x18]
cmp dword [rbx - 0x10], eax
lea rdx, [rbx - 0x18]
je 0x1400a59e0
cmp dword [rdx + 0x10], eax
jge 0x1400a5929
cmp dword [rbx - 0xc], eax
jge 0x1400a591c
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x1400a59e0
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5940
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
mov rsi, qword [rbp - 0x68]
add rax, 0x18
mov qword [rsp + 0x78], rax
jmp 0x1400a59e0
mov r15d, dword [rbx - 0x10]
lea r14, [rbp + 0xb0]
sub r14, rbx
sar r14, 1
test ecx, ecx
jns 0x1400a597b
mov ecx, 0x80070057
call fcn.140001000
int3
mov eax, dword [rbx - 0xc]
mov ecx, 1
sub ecx, dword [rbx - 8]
sub eax, edi
or ecx, eax
jge 0x1400a599d
lea rcx, [rsp + 0x78]
mov edx, edi
call fcn.140001c20
mov rbx, qword [rsp + 0x78]
movsxd rdx, dword [rbx - 0xc]
movsxd rax, edi
mov rcx, rbx
add rdx, rdx
cmp r14, r15
lea r15, [rax + rax]
mov r9, r15
ja 0x1400a59c2
lea r8, [rbx + r14*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x1400a59cf
lea r8, [rbp + 0xb0]
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp edi, dword [rbx - 0xc]
jg 0x1400a5c34
mov dword [rbx - 0x10], edi
mov word [r15 + rbx], r13w
lea rdx, str.SonyVAIO_Update
lea rcx, [rsp + 0x78]
mov r8d, reloc.ATL100.DLL_Ordinal_17
call fcn.140003c10
mov rdi, qword [rsp + 0x78]
lea rbx, [rsi - 0x18]
lea rcx, [rdi - 0x18]
cmp rcx, rbx
je 0x1400a5a49
cmp dword [rbx + 0x10], r13d
jl 0x1400a5b40
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x1400a5b40
call fcn.140001b90
mov ecx, r12d
mov rsi, rax
lock xadd dword [rbx + 0x10], ecx
dec ecx
test ecx, ecx
jg 0x1400a5a41
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 8]
add rsi, 0x18
mov qword [rbp - 0x68], rsi
lea rdx, str.ShellExeProxy.exe
lea rcx, [rsp + 0x78]
mov r8d, Ordinal_20
call fcn.140003c10
mov rbx, qword [rsp + 0x78]
mov r14d, dword [rbp - 0x60]
mov r15, qword [rbp - 0x28]
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400a5dbe
mov rax, qword [0x14011d880]
lea rcx, [0x14011d880]
call qword [rax + 0x18]
mov r9, qword [rbp - 0x20]
lea rdx, str.__s_____s____d
add rax, 0x18
lea rcx, [rbp - 0x50]
mov r8, rbx
mov qword [rbp - 0x50], rax
mov eax, dword [rbp - 0x5c]
mov dword [rsp + 0x20], eax
call fcn.140004440
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x68], r13
mov qword [rbp - 0x30], r13
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea rdx, [rsp + 0x70]
mov ecx, eax
call sub.WTSAPI32.dll_WTSQueryUserToken
mov rcx, qword [rsp + 0x70]
test r14b, r14b
je 0x1400a5c46
mov r9d, 8
lea rax, [rbp - 0x38]
lea r8, [rbp - 0x30]
lea edx, [r9 + 0xb]
mov dword [rbp - 0x38], r13d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rbp - 0x30]
test rcx, rcx
je 0x1400a5c3f
lea rax, [rsp + 0x68]
xor r8d, r8d
mov edx, 0x2000000
mov qword [rsp + 0x28], rax
mov eax, 1
lea r9d, [rax + 1]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rdx, qword [rsp + 0x68]
jmp 0x1400a5c7e
movsxd r14, dword [rdi - 0x10]
test r14d, r14d
jne 0x1400a5ba6
mov rdi, qword [rbx]
cmp dword [rbx + 8], r13d
je 0x1400a5a49
cmp dword [rbx + 0x10], r13d
jge 0x1400a5b7a
cmp dword [rsi - 0xc], r13d
jge 0x1400a5b6d
mov ecx, 0x80070057
call fcn.140001000
int3
mov dword [rsi - 0x10], r13d
mov word [rsi], r13w
jmp 0x1400a5a49
mov eax, r12d
lock xadd dword [rbx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5b94
mov rcx, qword [rbx]
mov rdx, rbx
mov rax, qword [rcx]
call qword [rax + 8]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rsi, [rax + 0x18]
jmp 0x1400a5a45
mov eax, dword [rsi - 0x10]
mov r15, rdi
sub r15, rsi
mov dword [rbp - 0x34], eax
sar r15, 1
test r14d, r14d
jns 0x1400a5bc5
mov ecx, 0x80070057
call fcn.140001000
int3
mov eax, dword [rbx + 0xc]
mov ecx, 1
sub ecx, dword [rbx + 0x10]
sub eax, r14d
or ecx, eax
jge 0x1400a5be7
lea rcx, [rbp - 0x68]
mov edx, r14d
call fcn.140001c20
mov rsi, qword [rbp - 0x68]
movsxd rdx, dword [rsi - 0xc]
mov eax, dword [rbp - 0x34]
lea rbx, [r14 + r14]
add rdx, rdx
mov rcx, rsi
mov r9, rbx
cmp r15, rax
ja 0x1400a5c0c
lea r8, [rsi + r15*2]
call qword [sym.imp.MSVCR100.dll_memmove_s]
jmp 0x1400a5c15
mov r8, rdi
call qword [sym.imp.MSVCR100.dll_memcpy_s]
cmp r14d, dword [rsi - 0xc]
jg 0x1400a5c29
mov dword [rsi - 0x10], r14d
mov word [rbx + rsi], r13w
jmp 0x1400a5a49
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 0x80070057
call fcn.140001000
int3
mov rdx, qword [rsp + 0x70]
jmp 0x1400a5c79
lea rax, [rsp + 0x68]
xor r8d, r8d
mov edx, 0x2000000
mov qword [rsp + 0x28], rax
mov eax, 1
lea r9d, [rax + 1]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov rdx, qword [rsp + 0x68]
test rdx, rdx
cmove rdx, qword [rsp + 0x70]
mov qword [rsp + 0x68], rdx
lea rcx, [rbp - 0x48]
xor r8d, r8d
mov qword [rbp - 0x48], r13
call sub.USERENV.dll_CreateEnvironmentBlock
xor eax, eax
lea rcx, [rbp + 0x48]
lea r8d, [rax + 0x60]
xor edx, edx
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rax
call sub.MSVCR100.dll_memset
mov rdi, qword [rbp - 0x50]
mov dword [rbp + 0x40], 0x68
cmp dword [rdi - 8], 1
jle 0x1400a5ccc
mov edx, dword [rdi - 0x10]
lea rcx, [rbp - 0x50]
call fcn.140001930
mov rdi, qword [rbp - 0x50]
mov rcx, qword [rsp + 0x70]
lea rax, [rbp - 0x18]
test r14b, r14b
cmovne rcx, qword [rsp + 0x68]
mov qword [rsp + 0x50], rax
lea rax, [rbp + 0x40]
mov qword [rsp + 0x48], rax
mov rax, qword [rbp - 0x48]
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x4000410
xor r9d, r9d
mov r8, rdi
xor edx, edx
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
movsxd rdx, dword [rdi - 0xc]
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_wcsnlen]
test eax, eax
js 0x1400a5e6d
cmp eax, dword [rdi - 0xc]
jg 0x1400a5e6d
mov dword [rdi - 0x10], eax
cdqe
mov word [rdi + rax*2], r13w
mov rcx, qword [rbp - 0x48]
test rcx, rcx
je 0x1400a5d54
call sub.USERENV.dll_DestroyEnvironmentBlock
mov qword [rbp - 0x48], r13
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x1400a5d85
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x1400a5d7a
cmp rcx, rax
jne 0x1400a5d7a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x70], r13
jmp 0x1400a5d95
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x70], r13
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400a5d9a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], r13
mov word [r15], r12w
lea rdx, [rdi - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5db9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x78]
lea rdx, [rbx - 0x18]
mov eax, r12d
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5dd9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp - 0x68]
mov eax, r12d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5df8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
lea rcx, [rsp + 0x60]
call fcn.1400036a0
mov rdx, qword [rbp - 0x58]
mov eax, r12d
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x1400a5e21
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r12d
dec r12d
test r12d, r12d
jg 0x1400a5e40
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, r13d
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.1400cafa0
mov rbx, qword [rsp + 0x410]
add rsp, 0x3d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov ecx, 0x80070057
call fcn.140001000
int3