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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [section..data]
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 0x405764
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ImpersonateNamedPipeClient__._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x40584f
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 0x405799
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenThreadToken__._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x40584f
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 0x4057ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx___failed._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x40584f
cmp dword [0x40a3cc], ebx
je 0x405802
push 4
push 0x40a3cc
push 0xc
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x405802
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetTokenInformation___failed._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x40584f
cmp dword [0x40a3c4], 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 0x40584d
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x4058ac
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 0x40585f
push eax
call esi
mov eax, dword [ebp - 8]
test eax, eax
je 0x405869
push eax
call esi
test edi, edi
je 0x405877
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 0x405885
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40588f
push eax
call esi
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
je 0x405899
push ecx
call esi
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405ae3
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 0x4058d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateEnvironmentBlock___failed._Error:__d_n
jmp 0x405845
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 [0x40a3c4]
movlpd qword [ebp - 0x5c], xmm0
push 0
push 0
push dword [0x40a3c8]
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 0x4059bd
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x522
jne 0x4059b0
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 [0x40a3c4], 0
jne 0x40599e
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x68]
push eax
push edi
push dword [ebp - 0xc]
push ebx
push dword [0x40a3c8]
push 0
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x405997
call esi
push eax
push str.CreateProcessWithTokenW___failed._Error:__d_n
jmp 0x405845
mov eax, str.___CreateProcessWithTokenW___OK_n
jmp 0x4059c2
push str.____CreateProcessWithTokenW___isnt_compatible_with_option__i_n
call fcn.004010c0
add esp, 4
jmp 0x40584d
call esi
push eax
push str.CreateProcessAsUser___failed._Error:__d_n
jmp 0x405845
mov eax, str.___CreateProcessAsUser___OK_n
push eax
call fcn.004010c0
add esp, 4
cmp dword [0x40a3c4], 0
je 0x4059f4
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 0x40584f