Function at 0x4023f0
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor ebx, ebx
lea ebp, [esi + 0x2c]
push 0x1000
mov dword [esi + 4], 1
mov dword [esi + 8], ebx
mov dword [esi], 0x40817c
mov dword [esi + 0x30], ebx
mov dword [ebp], ebx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x44], ebx
call fcn.00403d7b
push 0x1000
mov dword [esi + 0x34], eax
call fcn.00403d7b
mov ecx, dword [esi + 0x34]
add esp, 8
cmp ecx, ebx
mov dword [esi + 0x3c], eax
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
je 0x40265f
cmp eax, ebx
je 0x40265f
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.PSAPI.DLL
mov dword [esi + 4], 2
call edi
push str.ADVAPI32.DLL
mov dword [esi + 0xc], eax
call edi
cmp eax, ebx
mov dword [esi + 0x10], eax
je 0x40265f
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x40265f
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push eax
mov dword [esi + 4], 3
call edi
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0xc]
push str.EnumProcessModules
push eax
call edi
mov ecx, dword [esi + 0xc]
push str.GetModuleFileNameExA
push ecx
mov dword [esi + 0x18], eax
call edi
mov edx, dword [esi + 0x10]
push str.OpenProcessToken
push edx
mov dword [esi + 0x1c], eax
call edi
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
push str.LookupPrivilegeValueA
push eax
call edi
mov ecx, dword [esi + 0x10]
push str.AdjustTokenPrivileges
push ecx
mov dword [esi + 0x24], eax
call edi
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x28], eax
cmp ecx, ebx
je 0x40265f
cmp dword [esi + 0x18], ebx
je 0x40265f
cmp dword [esi + 0x1c], ebx
je 0x40265f
cmp dword [esi + 0x20], ebx
je 0x40265f
cmp dword [esi + 0x24], ebx
je 0x40265f
cmp eax, ebx
je 0x40265f
lea edx, [esp + 0x14]
mov dword [esp + 0x10], 0x10
push edx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [esi + 0x20]
test eax, eax
je 0x4025c8
lea eax, [esp + 0x18]
push eax
push str.SeDebugPrivilege
push ebx
call dword [esi + 0x24]
test eax, eax
je 0x4025c8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
mov dword [esp + 0x38], edx
push eax
mov eax, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x38]
push 0x10
push edx
push ebx
push eax
mov dword [esp + 0x48], 1
mov dword [esp + 0x54], ebx
call dword [esi + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jne 0x4025c8
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x2c]
push ebx
or ecx, 2
push ebx
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x1c]
push eax
push ecx
push ebx
push edx
mov dword [esp + 0x38], 1
call dword [esi + 0x28]
call edi
mov eax, dword [esi + 0x34]
push ebp
push 0x1000
push eax
mov dword [esi + 8], 1
mov dword [esi + 4], 0xffffffff
call dword [esi + 0x14]
test eax, eax
je 0x40265f
mov ecx, dword [ebp]
mov eax, dword [esi + 8]
shr ecx, 2
cmp eax, ebx
mov dword [ebp], ecx
mov dword [esi + 0x30], ebx
je 0x40265f
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x402608
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x30]
mov ecx, dword [ebp]
cmp eax, ecx
jae 0x402628
mov ecx, dword [esi + 0x34]
mov edx, dword [ecx + eax*4]
push edx
push ebx
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esi + 0x38], eax
mov eax, dword [esi + 0x38]
mov dword [esi + 0x44], ebx
cmp eax, ebx
je 0x402658
mov ecx, dword [esi + 0x3c]
lea edi, [esi + 0x40]
push edi
push 0x1000
push ecx
push eax
call dword [esi + 0x18]
test eax, eax
je 0x402658
mov eax, dword [edi]
shr eax, 2
mov dword [edi], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov dword [esi + 4], 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret