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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ba643
mov eax, dword fs:[0]
push eax
sub esp, 0x704
mov eax, dword [0x100e70dc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub esp, 0x18
mov dword [ebp - 4], 0
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.10003cc0
lea ecx, [ebp - 0x710]
call fcn.10004940
add esp, 0x18
mov dword [ebp - 0x6f8], eax
mov ebx, eax
mov byte [ebp - 4], 1
cmp dword [ebx + 0x14], 0x10
jb 0x10005341
mov ebx, dword [ebx]
mov dword [ebp - 0x6f8], ebx
test ebx, ebx
je 0x10005c74
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.100953e0
mov ecx, ebx
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10005364
sub ecx, edx
cmp ecx, 2
jbe 0x1000538f
cmp byte [ebx + 1], 0x3a
jne 0x1000538f
push ebx
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.10098119
add esp, 0xc
jmp 0x100053be
push 0x104
lea eax, [ebp - 0x114]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
push ebx
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push 0x110
lea eax, [ebp - 0x574]
push 0
push eax
call fcn.100953e0
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x578]
add esp, 0xc
mov dword [ebp - 0x578], 0x114
xor esi, esi
push eax
call ebx
test eax, eax
je 0x10005402
cmp dword [ebp - 0x574], 6
mov eax, 1
cmove esi, eax
test esi, esi
mov dword [ebp - 0x694], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x100056c4
push 0x110
lea eax, [ebp - 0x460]
push 0
push eax
call fcn.100953e0
add esp, 0xc
mov dword [ebp - 0x464], 0x114
lea eax, [ebp - 0x464]
push eax
call ebx
test eax, eax
je 0x10005539
cmp dword [ebp - 0x460], 5
jne 0x10005539
cmp dword [ebp - 0x45c], 0
jne 0x10005539
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
jne 0x1000547f
call esi
mov esi, eax
jmp 0x100056b1
push 0x228
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x118], 0
push 0
push eax
mov esi, 0x490
call fcn.100953e0
add esp, 0xc
mov dword [ebp - 0x350], 0x22c
lea eax, [ebp - 0x350]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1000567f
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
nop word [eax + eax]
lea eax, [ebp - 0x32c]
push str.explorer.exe
push eax
call fcn.10097fa4
add esp, 8
test eax, eax
je 0x10005529
lea eax, [ebp - 0x350]
push eax
push edi
call ebx
test eax, eax
jne 0x100054d0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x118]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
jne 0x1000568e
call ebx
mov esi, eax
jmp 0x100056b1
mov eax, dword [ebp - 0x348]
xor esi, esi
mov dword [ebp - 0x118], eax
jmp 0x100054f6
lea eax, [ebp - 0x118]
xor ebx, ebx
push eax
lea eax, [ebp - 0x698]
mov dword [ebp - 0x698], ebx
push eax
push 1
push ebx
push ebx
mov dword [ebp - 0x118], ebx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x100055a7
mov edx, dword [ebp - 0x118]
xor eax, eax
mov edi, dword [ebp - 0x698]
mov esi, 0x490
test edx, edx
je 0x10005596
lea ecx, [edi + 8]
nop dword [eax]
cmp dword [ecx], ebx
je 0x1000558e
inc eax
add ecx, 0xc
cmp eax, edx
jb 0x10005580
jmp 0x10005596
lea eax, [eax + eax*2]
xor esi, esi
mov ebx, dword [edi + eax*4]
push edi
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test esi, esi
jne 0x100055e0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
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
je 0x100055d4
lea ecx, [ebp - 0x694]
push ecx
push ebx
call eax
test eax, eax
jne 0x100056b9
call esi
mov esi, eax
test esi, esi
je 0x100056b9
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10005600
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov esi, eax
jmp 0x100056b1
push 0x228
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x118], 0
push 0
push eax
mov esi, 0x490
call fcn.100953e0
add esp, 0xc
mov dword [ebp - 0x350], 0x22c
lea eax, [ebp - 0x350]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x1000567f
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
nop word [eax + eax]
lea eax, [ebp - 0x32c]
push str.explorer.exe
push eax
call fcn.10097fa4
add esp, 8
test eax, eax
je 0x10005529
lea eax, [ebp - 0x350]
push eax
push edi
call ebx
test eax, eax
jne 0x10005650
jmp 0x100054f6
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov esi, eax
jmp 0x100054fc
lea eax, [ebp - 0x694]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push 0xf01ff
push edi
call eax
test eax, eax
jne 0x100056aa
call ebx
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x10005c61
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
jmp 0x100058ae
lea eax, [ebp - 0x118]
mov dword [ebp - 0x690], 0
push eax
lea eax, [ebp - 0x698]
xor ebx, ebx
push eax
push 1
push ebx
push ebx
mov dword [ebp - 0x698], ebx
mov dword [ebp - 0x118], ebx
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x10005739
mov edx, dword [ebp - 0x118]
xor eax, eax
mov edi, dword [ebp - 0x698]
mov esi, 0x490
test edx, edx
je 0x10005728
lea ecx, [edi + 8]
cmp dword [ecx], ebx
je 0x10005720
inc eax
add ecx, 0xc
cmp eax, edx
jb 0x10005712
jmp 0x10005728
lea eax, [eax + eax*2]
xor esi, esi
mov ebx, dword [edi + eax*4]
push edi
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test esi, esi
jne 0x10005772
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
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
je 0x10005766
lea ecx, [ebp - 0x690]
push ecx
push ebx
call eax
test eax, eax
jne 0x10005879
call esi
mov esi, eax
test esi, esi
je 0x10005879
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10005792
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, eax
jmp 0x10005871
push 0x228
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x118], 0
push 0
push eax
mov edi, 0x490
call fcn.100953e0
add esp, 0xc
mov dword [ebp - 0x350], 0x22c
lea eax, [ebp - 0x350]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x10005842
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
nop dword [eax]
lea eax, [ebp - 0x32c]
push str.explorer.exe
push eax
call fcn.10097fa4
add esp, 8
test eax, eax
je 0x10005832
lea eax, [ebp - 0x350]
push eax
push esi
call ebx
test eax, eax
jne 0x100057e0
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x118]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x1000584e
call ebx
mov edi, eax
jmp 0x10005871
mov eax, dword [ebp - 0x348]
xor edi, edi
mov dword [ebp - 0x118], eax
jmp 0x10005806
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov edi, eax
jmp 0x1000580c
lea eax, [ebp - 0x690]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
push 0xf01ff
push esi
call eax
test eax, eax
jne 0x1000586a
call ebx
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x10005c61
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x124]
push eax
push 4
lea eax, [ebp - 0x120]
push eax
push 0x13
push dword [ebp - 0x690]
call edi
mov ecx, dword [ebp - 0x120]
test eax, eax
cmove ecx, dword [ebp - 0x690]
mov dword [ebp - 0x694], ecx
push 0x40
lea eax, [ebp - 0x6ec]
mov dword [ebp - 0x6f0], 0x44
push 0
push eax
call fcn.100953e0
add esp, 0xc
mov esi, dword [ebp - 0x694]
lea eax, [ebp - 0x690]
mov dword [ebp - 0x690], 0
xorps xmm0, xmm0
mov dword [ebp - 0x120], 0
xor bl, bl
mov word [ebp - 0x11c], 0x500
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x120]
mov byte [ebp - 0x6f1], bl
push eax
movups xmmword [ebp - 0x6ac], xmm0
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x100059c4
lea eax, [ebp - 0x69c]
push eax
push 0
push 0
push 2
push esi
call edi
test eax, eax
jne 0x10005958
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
cmp eax, 0x7a
jne 0x100059ca
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push dword [ebp - 0x69c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
lea eax, [ebp - 0x69c]
push eax
push dword [ebp - 0x69c]
push ebx
push 2
push esi
call edi
test eax, eax
je 0x100059b3
xor esi, esi
cmp dword [ebx], esi
jbe 0x100059b3
lea edi, [ebx + 4]
nop dword [eax + eax]
push dword [edi]
push dword [ebp - 0x690]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x100059ac
inc esi
add edi, 8
cmp esi, dword [ebx]
jb 0x10005990
jmp 0x100059b3
mov byte [ebp - 0x6f1], 1
test ebx, ebx
je 0x100059be
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov bl, byte [ebp - 0x6f1]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x690]
test eax, eax
je 0x100059db
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test bl, bl
jne 0x10005b46
lea eax, [ebp - 0x124]
mov dword [ebp - 0x690], 0
push eax
lea eax, [ebp - 0x120]
mov dword [ebp - 0x69c], 0
push eax
push 1
push 0
push 0
mov dword [ebp - 0x118], 0
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x124], 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
jne 0x10005a7e
push 0x110
push eax
lea eax, [ebp - 0x688]
push eax
call fcn.100953e0
add esp, 0xc
mov dword [ebp - 0x68c], 0x114
lea eax, [ebp - 0x68c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x10005a72
cmp dword [ebp - 0x688], 6
jne 0x10005a72
call edi
mov esi, eax
jmp 0x10005abc
mov dword [ebp - 0x118], 0
jmp 0x10005ac4
mov edx, dword [ebp - 0x124]
xor eax, eax
mov edi, dword [ebp - 0x120]
mov esi, 0x490
test edx, edx
je 0x10005ab5
lea ecx, [edi + 8]
cmp dword [ecx], 0
je 0x10005aa7
inc eax
add ecx, 0xc
cmp eax, edx
jb 0x10005a98
jmp 0x10005ab5
lea eax, [eax + eax*2]
xor esi, esi
mov eax, dword [edi + eax*4]
mov dword [ebp - 0x118], eax
push edi
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test esi, esi
jne 0x10005b46
lea eax, [ebp - 0x690]
push eax
push 0xa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov eax, dword [ebp - 0x690]
test eax, eax
je 0x10005b46
lea ecx, [ebp - 0x69c]
push ecx
push 1
push 1
push 0
push 0x2000000
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
cmp dword [ebp - 0x69c], 0
push dword [ebp - 0x690]
jne 0x10005b14
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10005b46
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 4
lea eax, [ebp - 0x118]
push eax
push 0xc
push dword [ebp - 0x69c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov ecx, dword [ebp - 0x694]
test eax, eax
cmovne ecx, dword [ebp - 0x69c]
mov dword [ebp - 0x694], ecx
push str.userenv.dll
mov dword [ebp - 0x6e8], str.Winsta0Default
xor edi, edi
mov dword [ebp - 0x120], 0x30
mov dword [ebp - 0x698], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x10005bc0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateEnvironmentBlock
push esi
call edi
push str.DestroyEnvironmentBlock
push esi
mov ebx, eax
call edi
mov edi, eax
test ebx, ebx
je 0x10005bc0
push 0
push dword [ebp - 0x694]
lea eax, [ebp - 0x698]
push eax
call ebx
test eax, eax
je 0x10005bb6
mov dword [ebp - 0x120], 0x430
jmp 0x10005bc0
mov dword [ebp - 0x698], 0
push 0x104
lea eax, [ebp - 0x454]
push 0
push eax
call fcn.100953e0
push dword [ebp - 0x6f8]
lea eax, [ebp - 0x454]
push 0x103
push eax
call fcn.10098119
add esp, 0x18
lea eax, [ebp - 0x6ac]
push eax
lea eax, [ebp - 0x6f0]
push eax
push 0
push dword [ebp - 0x698]
lea eax, [ebp - 0x454]
push dword [ebp - 0x120]
push 0
push 0
push 0
push eax
push 0
push dword [ebp - 0x694]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
mov ebx, eax
mov eax, dword [ebp - 0x6ac]
test eax, eax
je 0x10005c37
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x6a8]
test eax, eax
je 0x10005c48
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x10005c54
push dword [ebp - 0x698]
call edi
test esi, esi
je 0x10005c63
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10005c63
xor ebx, ebx
mov eax, dword [ebp - 0x694]
test eax, eax
je 0x10005c74
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x6fc]
cmp eax, 0x10
jb 0x10005c92
inc eax
lea ecx, [ebp - 0x710]
push eax
push dword [ebp - 0x710]
call fcn.10003a90
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x6fc], 0xf
mov dword [ebp - 0x700], 0
mov byte [ebp - 0x710], 0
cmp ecx, 8
jb 0x10005cc2
inc ecx
push ecx
push dword [ebp + 8]
lea ecx, [ebp + 8]
call fcn.10004440
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1007bf25
mov esp, ebp
pop ebp
ret