Function at 0x401a50
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x406004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x44
xor edi, edi
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x68]
mov dword [ebp - 8], 0xffffffff
xorps xmm0, xmm0
xor ebx, ebx
push edi
push eax
mov esi, ecx
mov dword [ebp - 0xc], ebx
movups xmmword [ebp - 0x20], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
call dword [sym.imp.ADVAPI32.dll_ImpersonateNamedPipeClient]
test eax, eax
jne 0x401ab4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ImpersonateNamedPipeClient__._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x401b9f
lea eax, [ebp - 0x10]
push eax
push 0
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x401ae9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenThreadToken__._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x401b9f
lea eax, [ebp - 8]
push eax
push 1
push 2
push 0
push 0xf01ff
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x401b1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx___failed._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x401b9f
cmp dword [0x406384], ebx
je 0x401b52
push 4
push 0x406384
push 0xc
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x401b52
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetTokenInformation___failed._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x401b9f
cmp dword [0x40637c], edi
mov eax, 0x400
mov ebx, 0x410
push 0x208
cmovne ebx, eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x401b9d
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x401bfc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetSystemDirectory___failed._Error:__d_n
call fcn.004010c0
add esp, 8
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401baf
push eax
call esi
mov eax, dword [ebp - 8]
test eax, eax
je 0x401bb9
push eax
call esi
test edi, edi
je 0x401bc7
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x401bd5
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x401bdf
push eax
call esi
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x401be9
push ecx
call esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401e33
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x401c20
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateEnvironmentBlock___failed._Error:__d_n
jmp 0x401b95
lea eax, [ebp - 0x20]
mov dword [ebp - 0x64], 0
push eax
lea eax, [ebp - 0x68]
mov dword [ebp - 0x68], 0x44
push eax
push edi
push dword [ebp - 0xc]
xorps xmm0, xmm0
mov dword [ebp - 0x60], str.WinSta0Default
push ebx
push dword [0x40637c]
movlpd qword [ebp - 0x5c], xmm0
push 0
push 0
push dword [0x406380]
movlpd qword [ebp - 0x54], xmm0
push 0
push dword [ebp - 8]
movlpd qword [ebp - 0x4c], xmm0
movlpd qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x401d0d
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x522
jne 0x401d00
push str.____CreateProcessAsUser___failed_because_of_a_missing_privilege__retrying_with_CreateProcessWithTokenW__._n
call fcn.004010c0
add esp, 4
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
cmp dword [0x40637c], 0
jne 0x401cee
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x68]
push eax
push edi
push dword [ebp - 0xc]
push ebx
push dword [0x406380]
push 0
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x401ce7
call esi
push eax
push str.CreateProcessWithTokenW___failed._Error:__d_n
jmp 0x401b95
mov eax, str.___CreateProcessWithTokenW___OK_n
jmp 0x401d12
push str.____CreateProcessWithTokenW___isnt_compatible_with_option__i_n
call fcn.004010c0
add esp, 4
jmp 0x401b9d
call esi
push eax
push str.CreateProcessAsUser___failed._Error:__d_n
jmp 0x401b95
mov eax, str.___CreateProcessAsUser___OK_n
push eax
call fcn.004010c0
add esp, 4
cmp dword [0x40637c], 0
je 0x401d44
push 1
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
add esp, 4
push 0xffffffffffffffff
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, 1
jmp 0x401b9f