Function at 0x40ba50
Capabilities:
Acquire debug privileges
Check os version
Create process on windows
Enumerate processes

Disassembly:
push 0xffffffffffffffff
push 0x57edbb
mov eax, dword fs:[0]
push eax
sub esp, 0x3cc
mov eax, dword [0x5e68f0]
xor eax, esp
mov dword [esp + 0x3c8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e68f0]
xor eax, esp
push eax
lea eax, [esp + 0x3e0]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3f4]
mov ebp, dword [esp + 0x3f0]
xor ebx, ebx
mov ecx, 8
mov esi, str.Winsta0Default
lea edi, [esp + 0x2dc]
push 0xe0
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x300]
push ebx
push ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], ebx
call fcn.0050fd50
push 0x44
lea edx, [esp + 0x74]
push ebx
push edx
call fcn.0050fd50
lea eax, [esp + 0x2f4]
mov ecx, 1
add esp, 0x18
mov dword [esp + 0x64], 0x44
mov dword [esp + 0x6c], eax
mov word [esp + 0x94], cx
mov dword [esp + 0x30], 0x30
call dword [sym.imp.KERNEL32.dll_GetVersion]
movzx eax, al
cmp eax, 5
jne 0x40bbce
xor esi, esi
cmp ebp, ebx
je 0x40bb6f
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40bb26
sub eax, edx
sar eax, 1
xor ecx, ecx
add eax, 2
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d4d7
mov esi, eax
mov edx, esi
add esp, 4
mov eax, ebp
sub edx, ebp
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bx
jne 0x40bb60
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x68]
push ecx
push ebx
push ebx
push 0x30
push ebx
push ebx
push ebx
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x40bbb8
mov eax, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40bba2
mov edx, dword [esp + 0x34]
mov dword [eax], edx
jmp 0x40bba9
mov eax, dword [esp + 0x34]
push eax
call edi
mov ecx, dword [esp + 0x38]
push ecx
call edi
mov dword [esp + 0x1c], 1
cmp esi, ebx
je 0x40be7e
push esi
call fcn.0040d4cc
add esp, 4
jmp 0x40be7e
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x40bc01
lea edx, [esp + 0xac]
push edx
push esi
mov dword [esp + 0xb4], 0x22c
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
jne 0x40bc08
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40be82
call fcn.0040b7b0
mov ebx, eax
mov dword [esp + 0x28], 0
or edi, 0xffffffff
lea ebx, [ebx]
mov ecx, dword [esp + 0xb4]
lea eax, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40bc3d
cmp dword [esp + 0x28], ebx
je 0x40bc51
lea edx, [esp + 0xac]
push edx
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40bc20
jmp 0x40bc58
mov edi, dword [esp + 0xb4]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp edi, 0xffffffff
je 0x40bc01
lea ecx, [esp + 0x18]
call fcn.00401760
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x3ec], 0
call fcn.0040b840
add esp, 4
test eax, eax
jne 0x40bc9b
lea ecx, [esp + 0x18]
call fcn.00401790
xor eax, eax
jmp 0x40be82
mov eax, dword [esp + 0x18]
call fcn.0040b960
mov dword [esp + 0x48], eax
test eax, eax
je 0x40bc8b
push edi
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [esp + 0x24]
push ecx
mov edi, eax
push 0x201eb
push edi
mov dword [esp + 0x50], edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40be51
lea edx, [esp + 0x4c]
push edx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x40be51
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x14]
push edx
push 1
push 1
push 0
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x34]
push 0x2000000
push eax
mov dword [esp + 0x6c], 1
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov ecx, dword [esp + 0x14]
push 4
push ebx
push 0xc
push ecx
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov eax, dword [esp + 0x14]
xor ebx, ebx
push ebx
push ebx
push 0x10
lea edx, [esp + 0x60]
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x40be51
mov ecx, dword [esp + 0x14]
push 1
push ecx
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40bd7e
mov edi, 0x430
jmp 0x40bd86
mov edi, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
xor esi, esi
test ebp, ebp
je 0x40bdd3
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40bd91
sub eax, edx
sar eax, 1
xor ecx, ecx
add eax, 2
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040d4d7
mov esi, eax
mov edx, esi
add esp, 4
mov eax, ebp
sub edx, ebp
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40bdc4
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x68]
push ecx
push 0
push edx
push edi
push 0
push 0
push 0
push esi
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x40be2b
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40be0d
mov ecx, dword [esp + 0x34]
mov dword [eax], ecx
jmp 0x40be18
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40be3a
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
test esi, esi
je 0x40be47
push esi
call fcn.0040d4cc
add esp, 4
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40be5c
push eax
call esi
mov ecx, dword [esp + 0x48]
push ecx
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x40be6e
push eax
call esi
test edi, edi
je 0x40be75
push edi
call esi
lea ecx, [esp + 0x18]
call fcn.00401790
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3e0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3c8]
xor ecx, esp
call fcn.0050c2f2
add esp, 0x3d8
ret 8