Function at 0x419140
Capabilities:
Check os version
Create process on windows
Create process suspended
Get session information
Get session user name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9b4
mov eax, dword [0x5ad880]
xor eax, esp
mov dword [esp + 0x9b0], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
xor ebx, ebx
push 1
push ebx
push ebx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], ebx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsA]
test eax, eax
je 0x41942e
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x1c], ebx
jbe 0x419407
mov dword [esp + 0x20], ebx
lea esp, [esp]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edi, dword [ecx + eax]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
push 8
push edi
push ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x50], ebx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x4193ef
mov eax, dword [esp + 0x30]
mov esi, dword [eax]
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
cmp esi, ebx
jne 0x4193ef
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x4193ef
mov esi, dword [esp + 0x10]
push 4
mov dword [esp + 0x48], ebx
call fcn.004302c3
add esp, 4
lea edx, [esp + 0xa0]
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0xa4], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x419277
cmp dword [esp + 0xb0], 2
jne 0x419277
cmp dword [esp + 0xa4], 6
jb 0x419277
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x44]
push eax
push 4
push ecx
push 0x13
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x419273
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
mov dword [esp + 0x10], edx
jmp 0x419277
mov dword [esp + 0x10], esi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push 1
push 2
push ebx
push 0x20f01ff
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x4193ef
lea edx, [esp + 0x40]
push edx
lea eax, [esp + 0x38]
push eax
push 5
push edi
push ebx
mov dword [esp + 0x54], ebx
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x4192c0
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
lea edx, [esp + 0x58]
push edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [esp + 0x14]
push ebx
push eax
lea ecx, [esp + 0x34]
push ecx
mov dword [esp + 0x64], 0x44
mov dword [esp + 0x6c], str.winsta0default
mov dword [esp + 0x38], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x4193ef
push 0x800
lea edx, [esp + 0x1bc]
push ebx
push edx
call fcn.005296a0
mov eax, dword [ebp + 8]
lea edx, [esp + 0x1c4]
add esp, 0xc
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x419325
lea edi, [esp + 0x1b8]
add edi, 0xfffffffe
mov edi, edi
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x419340
mov eax, dword [0x5869cc]
mov dword [edi], eax
mov eax, dword [esp + 0x38]
mov esi, eax
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x419360
lea edi, [esp + 0x1b8]
sub eax, esi
add edi, 0xfffffffe
jmp 0x419380
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x419380
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x5c]
push edx
push ebx
push ebx
push 0x30
push ebx
push ebx
push ebx
lea eax, [esp + 0x1d8]
push eax
push ebx
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x4193e9
push eax
call esi
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, dword [esp + 0x28]
add dword [esp + 0x20], 0xc
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x1c]
jb 0x4191a0
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x9b0]
xor ecx, esp
call fcn.005232d4
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x9bc]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.005232d4
mov esp, ebp
pop ebp
ret 8