Function at 0x10015d00
Capabilities:
Create process on windows
Get common file path
Get session information
Get session user name

Disassembly:
sub esp, 0x328
mov eax, dword [0x10022018]
xor eax, esp
mov dword [esp + 0x324], eax
mov eax, dword [esp + 0x32c]
push ebx
push ebp
push esi
push edi
push 0x40
xor ebx, ebx
lea ecx, [esp + 0xa8]
push ebx
push ecx
mov dword [esp + 0x34], eax
call sub.MSVCR90.dll_memset
xor eax, eax
add esp, 0xc
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0xa0], 0x44
call fcn.100156e0
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0x1001b8b4
call ebp
mov esi, eax
cmp esi, ebx
jne 0x10015d81
push str.Load_Library_Error...
call fcn.100160d0
add esp, 4
xor eax, eax
jmp 0x1001603d
push str.WTSGetActiveConsoleSessionId
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
jne 0x10015dac
push str.GetProcAddr_Fail_to_Get_WTSGetActiveConsoleSessionId_Address
call fcn.100160d0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x1001603d
call eax
push 0x31
lea edx, [esp + 0xf1]
mov edi, eax
push ebx
push edx
mov dword [esp + 0x40], edi
mov byte [esp + 0xf8], bl
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0xffffffffffffffff
lea eax, [esp + 0xf0]
push str.Session_Id___0x
push eax
call dword [sym.imp.MSVCR90.dll_sprintf]
lea ecx, [esp + 0xf8]
add esp, 0xc
push ecx
call fcn.100160d0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, 0xffffffff
jne 0x10015e19
push str.Failed_To_get_Session_Id...
call fcn.100160d0
add esp, 4
mov eax, 5
jmp 0x1001603d
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x14]
push eax
push 1
push ebx
push ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x30], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsA
mov eax, dword [esp + 0x10]
xor edi, edi
cmp dword [esp + 0x1c], ebx
jbe 0x10015e8f
xor esi, esi
lea ebx, [ebx]
cmp dword [esi + eax], 0xffffffff
jne 0x10015e85
cmp dword [esi + eax + 8], ebx
jne 0x10015e6d
push str.Session_is_Active
call fcn.100160d0
mov eax, dword [esp + 0x14]
add esp, 4
cmp dword [esi + eax + 8], 1
jne 0x10015e85
push str.Session_is_Connected
call fcn.100160d0
mov eax, dword [esp + 0x14]
add esp, 4
inc edi
add esi, 0xc
cmp edi, dword [esp + 0x1c]
jb 0x10015e50
cmp eax, ebx
je 0x10015e99
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
push 5
push 0xffffffffffffffff
push ebx
call sub.WTSAPI32.dll_WTSQuerySessionInformationA
push str.IsWow64Process
push str.kernel32
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call esi
mov dword [0x10022450], eax
cmp eax, ebx
je 0x10015ee5
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x10022450]
mov eax, dword [esp + 0x20]
mov dword [0x10022454], eax
cmp eax, ebx
je 0x10015f48
push 0x104
lea ecx, [esp + 0x22c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea edx, [esp + 0x228]
push edx
lea eax, [esp + 0x124]
push 0x104
push eax
call dword [sym.imp.MSVCR90.dll_strcpy_s]
add esp, 0xc
push str._syswow64wtsapi32.dll
lea ecx, [esp + 0x124]
push 0x104
push ecx
call dword [sym.imp.MSVCR90.dll_strcat_s]
add esp, 0xc
lea edx, [esp + 0x120]
push edx
jmp 0x10015f4d
push str.wtsapi32.dll
call ebp
mov dword [0x10023884], eax
cmp eax, ebx
je 0x10015f67
push str.WTSQueryUserToken
push eax
call esi
mov dword [0x100238ec], eax
jmp 0x10015f6c
mov eax, dword [0x100238ec]
mov dword [esp + 0x24], ebx
cmp eax, ebx
je 0x10015f88
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x24]
push ecx
push edx
call eax
test eax, eax
je 0x10016056
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x14]
push eax
push 1
push 1
push ebx
push 0x2000000
push ecx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x10016056
mov edx, dword [esp + 0x14]
push ebx
push edx
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x24], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x10016056
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x38]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0xa4]
push edx
mov edx, dword [esp + 0x1c]
push ebx
push eax
push 0x430
push ebx
push ebx
push ebx
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x10016056
mov eax, dword [esp + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x3c]
push ecx
call esi
push 0x100238f8
mov edi, str.Create_Process_As_User_Successful
call fcn.10002690
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x10016029
push eax
call esi
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x10016038
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, 1
mov ecx, dword [esp + 0x334]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100191d2
add esp, 0x328
ret
push 0x100238f8
mov edi, str.Create_Process_As_User_Failed_so_Launching_under_system
call fcn.10002690
push 0x44
lea edx, [esp + 0x5c]
push ebx
push edx
call sub.MSVCR90.dll_memset
mov edx, dword [esp + 0x34]
add esp, 0xc
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x5c]
push ecx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edx
push ebx
mov dword [esp + 0x80], 0x44
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x10015d7a
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x4c]
push ecx
call esi
jmp 0x10016038