Function at 0x10036391
Capabilities:
Check os version
Compare security identifiers
Create process on windows
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x718
mov eax, dword [0x102a8430]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
lea ecx, [ebp - 0x6bc]
inc eax
push eax
call fcn.100350b9
cmp dword [ebp - 0x6bc], 0
je 0x10036d88
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 4]
mov esi, dword [esi]
cmp esi, edi
je 0x10036d74
push ebx
lea eax, [ebp - 0x128]
push esi
push eax
call fcn.1000a0c0
mov ebx, eax
mov dword [ebp - 0x6b8], eax
pop ecx
pop ecx
cmp dword [ebx + 0x14], 0x10
jb 0x100363f8
mov ebx, dword [ebx]
mov dword [ebp - 0x6b8], ebx
test ebx, ebx
je 0x10036d57
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call fcn.1003c940
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003641b
sub ecx, edx
cmp ecx, 2
jbe 0x10036446
cmp byte [ebx + 1], 0x3a
jne 0x10036446
push ebx
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.10040564
add esp, 0xc
jmp 0x10036475
push 0x104
lea eax, [ebp - 0x108]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push ebx
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0x110
lea eax, [ebp - 0x578]
push 0
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x57c], 0x114
lea eax, [ebp - 0x57c]
xor ebx, ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x100364b7
cmp dword [ebp - 0x578], 6
push 1
pop edx
cmove ebx, edx
jmp 0x100364ba
xor edx, edx
inc edx
xor ecx, ecx
mov dword [ebp - 0x6a8], ecx
test ebx, ebx
jne 0x10036768
push 0x110
push ecx
lea eax, [ebp - 0x464]
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x468], 0x114
lea eax, [ebp - 0x468]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x1003661d
cmp dword [ebp - 0x464], 5
jne 0x1003661d
cmp dword [ebp - 0x460], ebx
jne 0x1003661d
push ebx
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x694], eax
cmp eax, 0xffffffff
jne 0x10036537
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x10036958
and dword [ebp - 0x698], 0
lea eax, [ebp - 0x350]
push 0x228
push 0
push eax
mov ebx, 0x490
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x354], 0x22c
lea eax, [ebp - 0x354]
push eax
push dword [ebp - 0x694]
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x100365b8
lea eax, [ebp - 0x330]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x100365a8
lea eax, [ebp - 0x354]
push eax
push dword [ebp - 0x694]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x10036579
jmp 0x100365c0
mov eax, dword [ebp - 0x34c]
xor ebx, ebx
mov dword [ebp - 0x698], eax
jmp 0x100365c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x694]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x698]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x6ac], eax
test eax, eax
je 0x1003652a
lea ecx, [ebp - 0x6a8]
push ecx
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1003660c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push dword [ebp - 0x6ac]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10036958
lea eax, [ebp - 0x694]
xor ecx, ecx
push eax
lea eax, [ebp - 0x698]
mov dword [ebp - 0x698], ecx
push eax
push 1
push ecx
mov ebx, ecx
mov dword [ebp - 0x694], ecx
push ecx
mov dword [ebp - 0x6a0], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
je 0x10036697
mov edx, dword [ebp - 0x698]
xor ecx, ecx
mov ebx, 0x490
cmp dword [ebp - 0x694], ecx
jbe 0x10036687
lea eax, [edx + 8]
cmp dword [eax], 0
je 0x10036679
inc ecx
add eax, 0xc
cmp ecx, dword [ebp - 0x694]
jb 0x10036666
jmp 0x10036687
imul eax, ecx, 0xc
xor ebx, ebx
mov eax, dword [eax + edx]
mov dword [ebp - 0x6a0], eax
push edx
call sub.WTSAPI32.dll_WTSFreeMemory
test ebx, ebx
jne 0x100366d4
mov ebx, dword [ebp - 0x6a0]
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.WTSQueryUserToken
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x100366bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x100366cc
lea ecx, [ebp - 0x6a8]
push ecx
push ebx
call eax
test eax, eax
je 0x100366b2
xor ebx, ebx
test ebx, ebx
je 0x10036956
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x694], eax
cmp eax, 0xffffffff
je 0x1003652a
and dword [ebp - 0x698], 0
lea eax, [ebp - 0x350]
push 0x228
push 0
push eax
mov ebx, 0x490
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x354], 0x22c
lea eax, [ebp - 0x354]
push eax
push dword [ebp - 0x694]
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x100365b8
lea eax, [ebp - 0x330]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x100365a8
lea eax, [ebp - 0x354]
push eax
push dword [ebp - 0x694]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x10036732
jmp 0x100365c0
lea eax, [ebp - 0x69c]
mov dword [ebp - 0x694], ecx
push eax
lea eax, [ebp - 0x698]
mov dword [ebp - 0x698], ecx
push eax
push edx
push ecx
mov ebx, ecx
mov dword [ebp - 0x69c], ecx
push ecx
mov dword [ebp - 0x6a0], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
je 0x100367e5
mov edx, dword [ebp - 0x698]
xor ecx, ecx
mov ebx, 0x490
cmp dword [ebp - 0x69c], ecx
jbe 0x100367d5
lea eax, [edx + 8]
cmp dword [eax], 0
je 0x100367c7
inc ecx
add eax, 0xc
cmp ecx, dword [ebp - 0x69c]
jb 0x100367b4
jmp 0x100367d5
imul eax, ecx, 0xc
xor ebx, ebx
mov eax, dword [eax + edx]
mov dword [ebp - 0x6a0], eax
push edx
call sub.WTSAPI32.dll_WTSFreeMemory
test ebx, ebx
jne 0x10036822
mov ebx, dword [ebp - 0x6a0]
push str.wtsapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.WTSQueryUserToken
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1003680a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x1003681a
lea ecx, [ebp - 0x694]
push ecx
push ebx
call eax
test eax, eax
je 0x10036800
xor ebx, ebx
test ebx, ebx
je 0x10036923
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x1003683d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1003691a
and dword [ebp - 0x698], 0
mov eax, 0x490
push 0x228
mov dword [ebp - 0x69c], eax
lea eax, [ebp - 0x350]
push 0
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x354], 0x22c
lea eax, [ebp - 0x354]
push eax
push ebx
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x100368ba
lea eax, [ebp - 0x330]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x100368aa
lea eax, [ebp - 0x354]
push eax
push ebx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x10036880
jmp 0x100368c6
mov eax, dword [ebp - 0x34c]
mov dword [ebp - 0x698], eax
xor eax, eax
jmp 0x100368c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x69c], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x698]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x10036832
lea eax, [ebp - 0x694]
push eax
push 0xf01ff
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1003690d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x69c], eax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x69c]
test eax, eax
je 0x10036923
or ebx, 0xffffffff
jmp 0x10036958
lea eax, [ebp - 0x6d4]
push eax
push 4
lea eax, [ebp - 0x6c0]
push eax
push 0x13
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [ebp - 0x6c0]
test eax, eax
cmove ecx, dword [ebp - 0x694]
mov dword [ebp - 0x6a8], ecx
xor ebx, ebx
test ebx, ebx
jne 0x10036d42
push 0x40
lea eax, [ebp - 0x714]
mov dword [ebp - 0x718], 0x44
push ebx
push eax
call fcn.1003c940
add esp, 0xc
mov ebx, dword [ebp - 0x6a8]
xor ecx, ecx
mov dword [ebp - 0x6ac], ebx
lea eax, [ebp - 0x694]
mov byte [ebp - 0x6a1], cl
xorps xmm0, xmm0
mov dword [ebp - 0x694], ecx
push eax
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], ecx
push eax
movups xmmword [ebp - 0x6d0], xmm0
mov word [ebp - 0x10c], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x10036a8c
lea eax, [ebp - 0x6b4]
push eax
push 0
push 0
push 2
push ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x10036a01
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10036a8c
push dword [ebp - 0x6b4]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
lea eax, [ebp - 0x6b4]
push eax
push dword [ebp - 0x6b4]
push ebx
push 2
push dword [ebp - 0x6ac]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x10036a81
and dword [ebp - 0x698], 0
cmp dword [ebx], 0
jbe 0x10036a81
lea eax, [ebx + 4]
mov dword [ebp - 0x6a0], eax
push dword [eax]
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10036a7a
mov ecx, dword [ebp - 0x698]
mov eax, dword [ebp - 0x6a0]
inc ecx
add eax, 8
mov dword [ebp - 0x698], ecx
mov dword [ebp - 0x6a0], eax
cmp ecx, dword [ebx]
jb 0x10036a46
jmp 0x10036a81
mov byte [ebp - 0x6a1], 1
test ebx, ebx
je 0x10036a8c
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x694], 0
je 0x10036aa1
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp byte [ebp - 0x6a1], 0
jne 0x10036c01
lea eax, [ebp - 0x6a0]
xor ebx, ebx
push eax
lea eax, [ebp - 0x6ac]
mov dword [ebp - 0x69c], ebx
push eax
push 1
push ebx
push ebx
mov dword [ebp - 0x694], ebx
mov dword [ebp - 0x698], ebx
mov dword [ebp - 0x6ac], ebx
mov dword [ebp - 0x6a0], ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
test eax, eax
jne 0x10036b34
push 0x110
lea eax, [ebp - 0x68c]
push ebx
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x690], 0x114
lea eax, [ebp - 0x690]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x10036b2c
cmp dword [ebp - 0x68c], 6
jne 0x10036b2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x10036b73
mov dword [ebp - 0x698], ebx
jmp 0x10036b7b
mov edx, dword [ebp - 0x6ac]
xor ecx, ecx
mov ebx, 0x490
cmp dword [ebp - 0x6a0], ecx
jbe 0x10036b6d
lea eax, [edx + 8]
cmp dword [eax], 0
je 0x10036b5f
inc ecx
add eax, 0xc
cmp ecx, dword [ebp - 0x6a0]
jb 0x10036b4c
jmp 0x10036b6d
imul eax, ecx, 0xc
xor ebx, ebx
mov eax, dword [eax + edx]
mov dword [ebp - 0x698], eax
push edx
call sub.WTSAPI32.dll_WTSFreeMemory
test ebx, ebx
jne 0x10036c01
lea eax, [ebp - 0x69c]
push eax
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
cmp dword [ebp - 0x69c], 0
je 0x10036c01
lea eax, [ebp - 0x694]
push eax
xor eax, eax
inc eax
push eax
push eax
push ebx
push 0x2000000
push dword [ebp - 0x69c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp dword [ebp - 0x694], 0
push dword [ebp - 0x69c]
jne 0x10036bcf
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10036c01
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
lea eax, [ebp - 0x698]
push eax
push 0xc
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov ecx, dword [ebp - 0x6a8]
test eax, eax
cmovne ecx, dword [ebp - 0x694]
mov dword [ebp - 0x6a8], ecx
and dword [ebp - 0x6b0], 0
xor eax, eax
push str.userenv.dll
mov dword [ebp - 0x710], str.Winsta0Default
mov dword [ebp - 0x6ac], 0x30
mov dword [ebp - 0x698], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
mov dword [ebp - 0x694], ebx
test ebx, ebx
je 0x10036c9a
push str.CreateEnvironmentBlock
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.DestroyEnvironmentBlock
push dword [ebp - 0x694]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x698], eax
test ebx, ebx
je 0x10036c94
push 0
push dword [ebp - 0x6a8]
lea eax, [ebp - 0x6b0]
push eax
call ebx
mov ebx, dword [ebp - 0x694]
test eax, eax
je 0x10036c8b
mov dword [ebp - 0x6ac], 0x430
jmp 0x10036c9a
and dword [ebp - 0x6b0], 0
jmp 0x10036c9a
mov ebx, dword [ebp - 0x694]
push 0x104
lea eax, [ebp - 0x458]
push 0
push eax
call fcn.1003c940
push dword [ebp - 0x6b8]
lea eax, [ebp - 0x458]
push 0x103
push eax
call fcn.10040564
add esp, 0x18
lea eax, [ebp - 0x6d0]
xor ecx, ecx
push eax
lea eax, [ebp - 0x718]
push eax
push ecx
push dword [ebp - 0x6b0]
lea eax, [ebp - 0x458]
push dword [ebp - 0x6ac]
push ecx
push ecx
push ecx
push eax
push ecx
push dword [ebp - 0x6a8]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
cmp dword [ebp - 0x6d0], 0
je 0x10036d10
push dword [ebp - 0x6d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6cc], 0
je 0x10036d25
push dword [ebp - 0x6cc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x698]
test eax, eax
je 0x10036d37
push dword [ebp - 0x6b0]
call eax
test ebx, ebx
je 0x10036d42
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x6a8], 0
je 0x10036d57
push dword [ebp - 0x6a8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
lea ecx, [ebp - 0x128]
push 0
inc eax
push eax
call fcn.10001360
add esi, 0x18
cmp esi, edi
jne 0x100363d3
pop ebx
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
push dword [ebp - 0x6bc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003ae2a
mov esp, ebp
pop ebp
ret