Function at 0x40208a
Capabilities:
Acquire debug privileges
Enumerate processes
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x648
push ebx
push esi
lea eax, [ebp - 8]
push eax
xor ebx, ebx
push 0x200e8
mov esi, ecx
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x40230e
push 1
push str.SeIncreaseQuotaPrivilege
push dword [ebp - 8]
call fcn.00405365
push 1
push str.SeDebugPrivilege
push dword [ebp - 8]
call fcn.00405365
test eax, eax
jne 0x4020f4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AdjustTokenPrivileges_err_u
call fcn.0040335e
pop ecx
pop ecx
jmp 0x40230e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [ebp - 0x440]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x648]
push str._sSystem32_services.exe
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x648]
push eax
call fcn.00405549
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x402153
push str.services.exe
call fcn.00405549
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x40230e
push ebx
push 2
mov dword [esi + 0x1c], ebx
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x40230e
push edi
push 0x228
lea eax, [ebp - 0x234]
push ebx
push eax
mov dword [ebp - 0x238], 0x22c
call fcn.0040348e
add esp, 0xc
lea eax, [ebp - 0x238]
push eax
push dword [ebp - 0xc]
call sub.KERNEL32.dll_Process32FirstW
jmp 0x402245
mov eax, dword [ebp - 0x220]
cmp eax, dword [ebp - 4]
je 0x4021b2
cmp eax, 4
jne 0x402236
push dword [ebp - 0x230]
mov edi, dword [sym.imp.KERNEL32.dll_OpenProcess]
push ebx
push 0x1f0fff
call edi
mov dword [esi + 0x1c], eax
cmp eax, ebx
jne 0x4021de
push dword [ebp - 0x230]
push ebx
push 0x450
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x1c]
cmp eax, ebx
je 0x402236
mov ecx, dword [ebp - 0x230]
lea edi, [esi + 0x20]
push edi
push 2
push eax
mov dword [esi + 0x18], ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40224d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x40222d
push 1
push 0xb
push dword [esi + 0x1c]
call fcn.00401f45
mov dword [esi + 0x2c], eax
cmp eax, ebx
je 0x40222d
push edi
push 2
push dword [esi + 0x1c]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40224d
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x238]
push eax
push dword [ebp - 0xc]
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x40219e
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x1c], ebx
je 0x40230d
lea edi, [esi + 0x28]
push edi
push 1
push 2
push ebx
push 0x18b
push dword [esi + 0x20]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4022bf
call fcn.00405b60
push eax
push str.error__S_dup_token_n
call fcn.0040335e
mov eax, dword [esi + 0x20]
pop ecx
pop ecx
cmp eax, ebx
je 0x40229a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi]
mov dword [esi + 0x20], ebx
cmp eax, ebx
je 0x4022aa
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x1c]
mov dword [edi], ebx
cmp eax, ebx
je 0x4022ba
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x1c], ebx
jmp 0x40230d
cmp dword [esi + 0x2c], ebx
je 0x4022f7
lea eax, [ebp - 4]
push eax
push 0x60000
push dword [esi + 0x1c]
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4022eb
push dword [esi + 0x2c]
push 4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
push dword [esi + 0x2c]
call fcn.0040334b
pop ecx
mov dword [esi + 0x2c], ebx
push dword [esi + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [esi + 0x20]
mov dword [esi + 0x1c], ebx
call edi
mov dword [esi + 0x20], ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret