Function at 0x100350b9
Capabilities:
Check os version
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8dc
mov eax, dword [0x102a8430]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0x8b4], ebx
and dword [ebx], 0
cmp byte [ebp + 8], 0
je 0x100355a0
and dword [ebp - 0x8bc], 0
lea eax, [ebp - 0x228]
and dword [ebp - 0x8b8], 0
push esi
push edi
mov edi, 0x110
push edi
push 0
push eax
call fcn.1003c940
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x22c]
add esp, 0xc
mov dword [ebp - 0x22c], 0x114
push eax
call esi
test eax, eax
je 0x1003530c
cmp dword [ebp - 0x228], 6
jne 0x1003530c
and dword [ebp - 0x8c4], 0
lea eax, [ebp - 0x8c8]
push eax
lea eax, [ebp - 0x8d0]
xor esi, esi
and dword [ebp - 0x8d0], esi
and dword [ebp - 0x8c8], esi
push eax
push 1
push esi
push esi
mov dword [ebp - 0x8c0], esi
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, 0x490
test eax, eax
je 0x100351be
mov ecx, dword [ebp - 0x8d0]
xor eax, eax
mov esi, edi
cmp dword [ebp - 0x8c8], eax
jbe 0x100351ae
lea edx, [ecx + 8]
cmp dword [edx], 0
je 0x100351a0
inc eax
add edx, 0xc
cmp eax, dword [ebp - 0x8c8]
jb 0x1003518d
jmp 0x100351ae
imul eax, eax, 0xc
xor esi, esi
mov eax, dword [eax + ecx]
mov dword [ebp - 0x8c0], eax
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
test esi, esi
jne 0x100351f7
mov esi, dword [ebp - 0x8c0]
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 0x100351df
call ebx
mov esi, eax
jmp 0x100351ef
lea ecx, [ebp - 0x8c4]
push ecx
push esi
call eax
test eax, eax
je 0x100351d9
xor esi, esi
test esi, esi
je 0x100352d4
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x10035210
call ebx
mov edi, eax
jmp 0x100352cc
and dword [ebp - 0x8c0], 0
lea eax, [ebp - 0x454]
push 0x228
push 0
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x458], 0x22c
lea eax, [ebp - 0x458]
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x10035282
lea eax, [ebp - 0x434]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x10035272
lea eax, [ebp - 0x458]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x10035248
jmp 0x10035286
mov eax, dword [ebp - 0x450]
xor edi, edi
mov dword [ebp - 0x8c0], eax
jmp 0x10035286
call ebx
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x8c0]
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x10035207
lea eax, [ebp - 0x8c4]
push eax
push 0xf01ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x100352c5
call ebx
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x10035546
lea eax, [ebp - 0x8dc]
push eax
push 4
lea eax, [ebp - 0x8d8]
push eax
push 0x13
push dword [ebp - 0x8c4]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [ebp - 0x8d8]
test eax, eax
cmove ecx, dword [ebp - 0x8c4]
mov dword [ebp - 0x8b8], ecx
jmp 0x10035546
push edi
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x118], 0x114
lea eax, [ebp - 0x118]
push eax
call esi
test eax, eax
je 0x10035400
cmp dword [ebp - 0x114], 5
jne 0x10035400
cmp dword [ebp - 0x110], 0
jne 0x10035400
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x1003536e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x1003554c
push 0x228
xor ebx, ebx
lea eax, [ebp - 0x680]
push ebx
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x684], 0x22c
lea eax, [ebp - 0x684]
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x100353d8
lea eax, [ebp - 0x660]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x100353d0
lea eax, [ebp - 0x684]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x100353a6
jmp 0x100353da
mov ebx, dword [ebp - 0x67c]
jmp 0x100353da
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x10035526
call edi
jmp 0x10035546
lea eax, [ebp - 0x8cc]
xor ebx, ebx
and dword [ebp - 0x8d4], ebx
and dword [ebp - 0x8cc], ebx
push eax
lea eax, [ebp - 0x8d4]
push eax
push 1
push ebx
push ebx
call sub.WTSAPI32.dll_WTSEnumerateSessionsW
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1003546b
mov ecx, dword [ebp - 0x8d4]
xor eax, eax
mov esi, 0x490
cmp dword [ebp - 0x8cc], eax
jbe 0x10035461
lea edx, [ecx + 8]
cmp dword [edx], ebx
je 0x10035459
inc eax
add edx, 0xc
cmp eax, dword [ebp - 0x8cc]
jb 0x10035447
jmp 0x10035461
imul eax, eax, 0xc
xor esi, esi
mov ebx, dword [eax + ecx]
push ecx
call sub.WTSAPI32.dll_WTSFreeMemory
test esi, esi
jne 0x100354a4
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 0x1003548c
call edi
mov esi, eax
jmp 0x1003549c
lea ecx, [ebp - 0x8b8]
push ecx
push ebx
call eax
test eax, eax
je 0x10035486
xor esi, esi
test esi, esi
je 0x10035546
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x100353f9
push 0x228
xor ebx, ebx
lea eax, [ebp - 0x8ac]
push ebx
push eax
call fcn.1003c940
add esp, 0xc
mov dword [ebp - 0x8b0], 0x22c
lea eax, [ebp - 0x8b0]
push eax
push esi
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x100353d8
lea eax, [ebp - 0x88c]
push str.explorer.exe
push eax
call fcn.10040463
pop ecx
pop ecx
test eax, eax
je 0x1003551b
lea eax, [ebp - 0x8b0]
push eax
push esi
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x100354ee
jmp 0x100353da
mov ebx, dword [ebp - 0x8a8]
jmp 0x100353da
lea eax, [ebp - 0x8b8]
push eax
push 0xf01ff
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1003553f
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x8b4]
mov esi, dword [ebp - 0x8b8]
test esi, esi
je 0x10035596
lea eax, [ebp - 0x8bc]
push eax
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x1003558f
push dword [ebp - 0x8bc]
push 0
call dword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
jne 0x1003558f
push dword [ebp - 0x8bc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 0x8bc], 0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x8bc]
pop edi
mov dword [ebx], ecx
pop esi
mov ecx, dword [ebp - 4]
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.1003ae2a
mov esp, ebp
pop ebp
ret 4