Function at 0x40c640
Capabilities:
Acquire debug privileges
Create process on windows
Create process suspended
Terminate process

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff70
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x1c], eax
mov edi, dword [ebp + 8]
xor eax, eax
push ebp
push 0x40c8c8
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
xor eax, eax
mov dword [ebp - 8], eax
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 0x18], eax
call fcn.0040bca8
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x20], eax
mov eax, dword [0x40e2fc]
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x28]
mov eax, 0x40c550
call fcn.0040b3c8
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40c870
push eax
push 0
push 0x2000000
call sub.kernel32.dll_OpenProcess
mov ebx, eax
test ebx, ebx
je 0x40c870
lea eax, [ebp - 8]
push eax
push 0x201eb
push ebx
call sub.advapi32.dll_OpenProcessToken
test eax, eax
je 0x40c870
lea eax, [ebp - 0x14]
push eax
push 1
push 1
push 0
push 0x2000000
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_DuplicateTokenEx
test eax, eax
je 0x40c870
push 4
lea eax, [ebp - 0x24]
push eax
push 0xc
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_SetTokenInformation
test eax, eax
je 0x40c870
lea eax, [ebp - 0x10]
push eax
mov eax, dword [0x40e334]
mov eax, dword [eax]
push eax
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
test eax, eax
je 0x40c870
mov dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], 2
push 0
push 0
push 0x10
lea eax, [ebp - 0x38]
push eax
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges_1
test eax, eax
je 0x40c870
mov esi, 0x30
push 0xffffffffffffffff
mov eax, dword [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
call sub.userenv.dll_CreateEnvironmentBlock
test eax, eax
je 0x40c784
or esi, 0x400
jmp 0x40c789
xor eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x7c]
mov edx, 0x44
call fcn.004058cc
mov dword [ebp - 0x7c], 0x44
mov eax, dword [0x40e2f8]
mov dword [ebp - 0x74], eax
push 0x40c8e4
push dword [0x40f86c]
push 0x40c8f0
push dword [0x40f870]
lea eax, [ebp - 0x90]
mov edx, 4
call fcn.004043b8
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x1c]
call fcn.004066d0
lea eax, [ebp - 0x8c]
mov edx, 0x10
call fcn.004058cc
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x7c]
push eax
push 0
mov eax, dword [ebp - 0x18]
push eax
push esi
push 0
push 0
push 0
mov eax, dword [ebp - 0x1c]
call fcn.004044f8
push eax
push 0
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_CreateProcessAsUserA
test eax, eax
je 0x40c870
cmp dword [edi + 0xc], 0
je 0x40c840
push 0
mov eax, dword [ebp - 0x8c]
push eax
call sub.kernel32.dll_TerminateProcess
test eax, eax
jne 0x40c858
xor edx, edx
mov eax, dword [ebp - 0x84]
call fcn.0040b228
jmp 0x40c858
push 0x3e8
mov eax, dword [ebp - 0x8c]
push eax
call sub.kernel32.dll_WaitForSingleObject
cmp eax, 0x102
je 0x40c819
mov eax, dword [ebp - 0x88]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x8c]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0x18], 0
je 0x40c87f
mov eax, dword [ebp - 0x18]
push eax
call sub.userenv.dll_DestroyEnvironmentBlock
cmp dword [ebp - 0x14], 0
je 0x40c88e
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_CloseHandle_1
test ebx, ebx
je 0x40c898
push ebx
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 8], 0
je 0x40c8a7
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40c8cf
lea eax, [ebp - 0x90]
call fcn.00404084
lea eax, [ebp - 0x1c]
call fcn.00404084
ret