Function at 0x10009ef0
Capabilities:
Check os version
Create process on windows
Link many functions at runtime

Disassembly:
sub esp, 0x2c0
mov eax, dword [0x10027074]
xor eax, esp
mov dword [esp + 0x2bc], eax
mov eax, dword [esp + 0x2c4]
push ebx
push ebp
push esi
push edi
push str.RunProcessAsLogon
push 0x40
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x2c], edx
or ebp, 0xffffffff
call fcn.10001d40
add esp, 8
xor esi, esi
push str.wtsapi32.DLL
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x1000a025
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.WTSQueryUserToken
push ebx
call edi
push str.WTSEnumerateSessionsW
push ebx
mov dword [esp + 0x24], eax
call edi
cmp eax, esi
je 0x1000a03b
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
push 1
push esi
push esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
call eax
test eax, eax
je 0x10009fff
xor edi, edi
cmp dword [esp + 0x18], esi
jbe 0x10009fe6
mov eax, dword [esp + 0x14]
jmp 0x10009fa0
mov ecx, dword [esi + eax + 8]
mov edx, dword [esi + eax + 4]
mov eax, dword [esi + eax]
push ecx
push edx
push eax
push edi
push str.SessionInfo__d_:_SessionId_d__WinStationName_s__State_d.
push 0x40
call fcn.10001d40
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + eax + 8]
add esp, 0x18
test ecx, ecx
je 0x10009fde
cmp ecx, 1
jne 0x10009fd2
mov ebp, dword [esi + eax]
inc edi
add esi, 0xc
cmp edi, dword [esp + 0x18]
jb 0x10009fa0
jmp 0x10009fe4
lea ecx, [edi + edi*2]
mov ebp, dword [eax + ecx*4]
xor esi, esi
push str.WTSFreeMemory
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x1000a03b
mov edx, dword [esp + 0x14]
push edx
call eax
jmp 0x1000a03b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6a6
jne 0x1000a01d
push str.The_Terminate_Service_not_running.
push 0x40
call fcn.10001d40
add esp, 8
jmp 0x1000a03b
push eax
push str.Failed_to_call_WTSEnumerateSessions:err0x_x
jmp 0x1000a031
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_LoadLibrary__Wtsapi32.dll__:err0x_x
push 4
call fcn.10001d40
add esp, 0xc
push ebp
push str.SessionId___d
push 0x40
call fcn.10001d40
mov edi, ebp
inc edi
add esp, 0xc
neg edi
sbb edi, edi
and edi, ebp
mov ebp, dword [esp + 0x1c]
cmp ebp, esi
je 0x1000a2ac
push 0x40
lea eax, [esp + 0x60]
push esi
push eax
mov dword [esp + 0x64], 0x44
call fcn.10012ec0
add esp, 0xc
lea edx, [esp + 0x14]
push edx
xor ecx, ecx
push edi
mov dword [esp + 0x68], str.WinSta0Default
mov word [esp + 0x90], cx
mov dword [esp + 0x8c], 1
mov dword [esp + 0x1c], esi
call ebp
test eax, eax
jne 0x1000a0c9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_WTSQueryUserToken__err_0x_x
push 4
call fcn.10001d40
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x1000a2f6
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
and eax, 0xff
cmp eax, 5
jbe 0x1000a193
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x54]
push ecx
push 4
lea edx, [esp + 0x30]
push edx
push 0x13
push eax
mov dword [esp + 0x3c], esi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [esp + 0x28]
cmp eax, esi
je 0x1000a10e
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x2c]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x3000
push 1
lea edx, [esp + 0xc8]
push edx
mov byte [esp + 0xcc], 0
mov byte [esp + 0xcd], 0
mov byte [esp + 0xce], 0
mov byte [esp + 0xcf], 0
mov byte [esp + 0xd0], 0
mov byte [esp + 0xd1], 0x10
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1000a193
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x2c]
push 8
lea ecx, [esp + 0x34]
push ecx
push 0x19
push edx
mov dword [esp + 0x44], 0x20
mov dword [esp + 0x40], eax
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push str.Userenv.DLL
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x1000a294
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateEnvironmentBlock
push esi
call ebp
push str.DestroyEnvironmentBlock
push esi
mov edi, eax
call ebp
mov dword [esp + 0x3c], eax
test edi, edi
je 0x1000a24a
test eax, eax
je 0x1000a24a
mov ebp, dword [esp + 0x18]
push 0
push ebp
lea eax, [esp + 0x24]
push eax
call edi
test eax, eax
je 0x1000a24a
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x38]
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x5c]
push edx
push 0
push eax
push 0xc20
push 0
push 0
push 0
push ecx
push edi
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x1000a224
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push str.Failed_to_call_CreateProcessAsUser:_appname___s__err0x_x.
push 4
jmp 0x1000a239
mov edx, dword [esp + 0x24]
push edx
push edi
push str.Successed_to_CreateProcessAsUser._ProName:__s__Cmd:__s
mov dword [esp + 0x2c], 1
push 0x40
call fcn.10001d40
mov eax, dword [esp + 0x2c]
add esp, 0x10
push eax
call dword [esp + 0x40]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x20], 0
je 0x1000a27c
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp + 0x48]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x44]
push ecx
call esi
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [esp + 0x20]
jmp 0x1000a2f6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_LoadLibrary__Userenv.DLL__:err0x_x
push 4
call fcn.10001d40
add esp, 0xc
jmp 0x1000a27c
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp ebx, esi
je 0x1000a2b9
push ebx
call ebp
lea esi, [esp + 0xa8]
call fcn.10009900
mov eax, dword [esp + 0x24]
push eax
mov ecx, edi
mov edx, esi
call fcn.10009a10
mov esi, eax
mov eax, dword [esp + 0x2b8]
neg esi
sbb esi, esi
neg esi
mov dword [esp + 0xa8], vtable.CreateProcessAsLogonUser::CCreateProcessAsLoggedOnUser.0
test eax, eax
je 0x1000a2f4
push eax
call ebp
mov eax, esi
mov ecx, dword [esp + 0x2cc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1000a328
add esp, 0x2c0
ret