Function at 0x100783a
Capabilities:
Enumerate process modules
Get process image filename
Get token membership
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x100b278]
push ebx
xor ebx, ebx
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x240], 4
mov dword [ebp - 0x224], ebx
call dword [sym.imp.USER32.dll_GetProcessWindowStation]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x23c], ebx
jne 0x100787a
xor eax, eax
jmp 0x1007ac1
push esi
mov esi, dword [sym.imp.USER32.dll_GetUserObjectSecurity]
lea eax, [ebp - 0x224]
push eax
push dword [ebp - 0x224]
lea eax, [ebp - 0x240]
push ebx
push eax
push edi
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x10079a3
push dword [ebp - 0x224]
call sub.MFC42u.DLL_operatornew
cmp eax, ebx
pop ecx
mov dword [ebp - 0x220], eax
je 0x1007abe
lea ecx, [ebp - 0x224]
push ecx
push dword [ebp - 0x224]
push eax
lea eax, [ebp - 0x240]
push eax
push edi
call esi
test eax, eax
je 0x100798b
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x250]
push eax
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x100798b
cmp dword [ebp - 0x250], ebx
je 0x100798b
cmp dword [ebp - 0x21c], ebx
je 0x100798b
push 2
push 0xc
lea eax, [ebp - 0x260]
push eax
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_GetAclInformation]
test eax, eax
je 0x100798b
xor esi, esi
cmp dword [ebp - 0x260], ebx
jbe 0x100798b
lea eax, [ebp - 0x230]
push eax
push esi
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x1007976
mov eax, dword [ebp - 0x230]
cmp eax, ebx
je 0x1007976
cmp byte [eax], bl
jne 0x1007976
push 0x15
add eax, 8
push eax
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
jne 0x1007981
inc esi
cmp esi, dword [ebp - 0x260]
jb 0x1007940
jmp 0x100798b
mov dword [ebp - 0x23c], 1
push dword [ebp - 0x220]
call sub.MFC42u.DLL_operatordelete
cmp dword [ebp - 0x23c], ebx
pop ecx
jne 0x1007abe
lea eax, [ebp - 0x244]
push eax
push 0x20019
push ebx
push 0x10029cc
push 0x80000002
mov dword [ebp - 0x238], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1007a01
lea eax, [ebp - 0x230]
push eax
lea eax, [ebp - 0x238]
push eax
push ebx
push ebx
push 0x10029a0
push dword [ebp - 0x244]
mov dword [ebp - 0x230], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x244]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x238], ebx
jne 0x1007bc3
lea eax, [ebp - 0x24c]
push eax
push 0xc8
lea eax, [ebp - 0x328]
push eax
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x1007abe
mov edi, dword [ebp - 0x24c]
shr edi, 2
cmp edi, ebx
mov dword [ebp - 0x220], ebx
jle 0x1007abe
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x220]
push dword [ebp + eax*4 - 0x328]
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebx
mov dword [ebp - 0x21c], eax
je 0x1007ab0
push 0x104
lea ecx, [ebp - 0x210]
push ecx
push eax
mov word [ebp - 8], bx
call sub.PSAPI.DLL_GetProcessImageFileNameW
cmp eax, 0xa
jle 0x1007aa8
push 0x1002988
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + eax*2 - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x1007acd
push dword [ebp - 0x21c]
call esi
inc dword [ebp - 0x220]
cmp dword [ebp - 0x220], edi
jl 0x1007a46
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
pop edi
pop ebx
call fcn.010081b8
leave
ret
lea eax, [ebp - 0x22c]
push eax
push 0x2000a
push dword [ebp - 0x21c]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
push dword [ebp - 0x21c]
je 0x1007b74
call esi
lea eax, [ebp - 0x228]
push eax
push 2
push 2
push ebx
push 0x2000c
push dword [ebp - 0x22c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
push dword [ebp - 0x22c]
je 0x1007b74
call esi
lea eax, [ebp - 0x234]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea eax, [ebp - 0x218]
push eax
mov byte [ebp - 0x218], bl
mov byte [ebp - 0x217], bl
mov byte [ebp - 0x216], bl
mov byte [ebp - 0x215], bl
mov byte [ebp - 0x214], bl
mov byte [ebp - 0x213], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1007b6e
cmp dword [ebp - 0x234], ebx
jne 0x1007b7b
push dword [ebp - 0x228]
call esi
jmp 0x1007abe
lea eax, [ebp - 0x248]
push eax
push dword [ebp - 0x234]
mov dword [ebp - 0x248], ebx
push dword [ebp - 0x228]
call sub.ADVAPI32.dll_CheckTokenMembership
push dword [ebp - 0x228]
mov edi, eax
call esi
push dword [ebp - 0x234]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x248], ebx
je 0x1007abe
cmp edi, ebx
je 0x1007abe
xor eax, eax
inc eax
jmp 0x1007ac0