Function at 0x4199b0
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 [0x5ae8e0]
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 0x419c9e
mov dword [esp + 0x28], ebx
cmp dword [esp + 0x1c], ebx
jbe 0x419c77
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 0x419c5f
mov eax, dword [esp + 0x30]
mov esi, dword [eax]
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
cmp esi, ebx
jne 0x419c5f
lea ecx, [esp + 0x10]
push ecx
push edi
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
je 0x419c5f
mov esi, dword [esp + 0x10]
push 4
mov dword [esp + 0x48], ebx
call fcn.004308c3
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 0x419ae7
cmp dword [esp + 0xb0], 2
jne 0x419ae7
cmp dword [esp + 0xa4], 6
jb 0x419ae7
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 0x419ae3
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 0x419ae7
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 0x419c5f
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 0x419b30
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 + 0x38], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x419c5f
push 0x800
lea edx, [esp + 0x1bc]
push ebx
push edx
call fcn.0052a4d0
mov eax, dword [ebp + 8]
lea edx, [esp + 0x1c4]
add esp, 0xc
sub edx, eax
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x419b90
lea edi, [esp + 0x1b8]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
add edi, 2
cmp ax, bx
jne 0x419bb0
mov eax, dword [0x587edc]
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 0x419bd0
lea edi, [esp + 0x1b8]
sub eax, esi
add edi, 0xfffffffe
jmp 0x419bf0
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x419bf0
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 0x419c59
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 0x419a10
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.00524074
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.00524074
mov esp, ebp
pop ebp
ret 8