Function at 0x40d024
Capabilities:
Acquire debug privileges
Connect pipe
Resume thread

Disassembly:
mov dword [ebp - 0xe4], eax
push eax
call dword [0x4a617c]
push str.__LastPID
lea edi, [ebp - 0x160]
push dword [edi + 8]
push dword [ebp + 0x44]
call fcn.0044c63d
push str.__LastTID
push dword [edi + 0xc]
push dword [ebp + 0x44]
call fcn.0044c64d
add esp, 0x18
cmp dword [ebp - 0xd8], ebx
je 0x40d033
push dword [edi]
push 4
push str.SeDebugPrivilege
call fcn.00411a7e
add esp, 0xc
test byte [ebp + 0x54], 4
je 0x40d047
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40d047
push eax
call dword [0x4a6178]
lea ecx, [ebp - 0x1c]
call fcn.00444265
lea ecx, [ebp + 0xc]
call fcn.0044426d
lea ecx, [ebp + 0x20]
call fcn.00444275
mov eax, 0x4c1b94
cmp eax, ebx
je 0x40d06f
push eax
call dword [0x4a64f4]
lea ecx, [ebp + 0x2c]
call fcn.0044428d
lea ecx, [ebp - 0x84]
call 0x41eff7
lea esi, [ebp - 0x64]
mov eax, dword [esi]
cmp eax, ebx
je 0x40d092
push eax
call dword [0x4a64ec]
mov dword [esi], ebx
lea esi, [ebp - 0xc0]
mov eax, dword [esi]
cmp eax, ebx
je 0x40d0a7
push eax
call dword [0x4a64ec]
mov dword [esi], ebx
lea esi, [ebp - 0x74]
mov eax, dword [esi]
cmp eax, ebx
je 0x40d0b9
push eax
call dword [0x4a64ec]
mov dword [esi], ebx
lea esi, [ebp + 4]
mov eax, dword [esi]
cmp eax, ebx
je 0x40d0cb
push eax
call dword [0x4a64ec]
mov dword [esi], ebx
lea esi, [ebp - 0x38]
mov eax, dword [esi]
cmp eax, ebx
je 0x40d0dd
push eax
call dword [0x4a64ec]
cmp byte [ebp + 0x4b], bl
mov dword [esi], ebx
jne 0x40d0e9
cmp byte [ebp + 0x37], bl
je 0x40d136
mov eax, dword [edi]
cmp eax, ebx
je 0x40d0fb
push 0x1388
push eax
call dword [0x4a67c4]
cmp byte [ebp + 0x4b], bl
je 0x40d136
test byte [ebp + 0x4b], 1
je 0x40d11d
mov eax, dword [edi]
push dword [edi + 8]
neg eax
sbb eax, eax
and eax, 2
or eax, 1
push eax
call fcn.00424406
pop ecx
pop ecx
cmp dword [ebp - 0x10c], ebx
je 0x40d136
mov ecx, dword [ebp + 0x44]
push ebx
push ebx
push ebx
push dword [ebp - 0x10c]
call fcn.0043959e
cmp dword [ebp + 8], ebx
je 0x40da2e
or byte [eax], al
invalid
mov eax, dword [edi]
cmp eax, ebx
jne 0x40d148
mov dword [ebp + 0x24], ebx
mov ecx, dword [ebp - 0x94]
inc dword [ebp - 0x94]
mov dword [ebp + ecx*4 - 0x170], eax
mov eax, dword [edi + 4]
cmp eax, ebx
je 0x40d169
push eax
call dword [0x4a64ec]
cmp dword [ebp - 0x30], ebx
mov dword [edi + 4], ebx
je 0x40d188
mov ecx, dword [ebp + 0x44]
push ebx
push ebx
push 0x3e8
call fcn.00413b53
push dword [edi]
call fcn.0041cb4b
pop ecx
cmp dword [ebp + 0x24], ebx
je 0x40da44
mov al, byte [0x4bf2c0]
mov edi, 0x100000
push 0x100004
lea ecx, [ebp + 0x58]
mov byte [ebp + 0x6b], al
mov dword [ebp - 0x30], edi
xor esi, esi
call fcn.0044a220
mov eax, dword [ebp - 0x58]
cmp word [eax], 0x40
lea ecx, [eax + 2]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc8], ecx
mov byte [ebp + 0x7b], bl
jne 0x40d27b
mov byte [ebp + 0x7b], 1
mov dword [ebp - 8], ecx
cmp byte [ebp - 0x6e], bl
je 0x40d22e
mov ecx, dword [ebp + 0x44]
push ebx
lea eax, [ebp + 0x38]
push eax
push dword [ebp - 8]
mov dword [ebp + 0x38], ebx
call fcn.00451296
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 0x38]
lea ecx, [ebp + 0x58]
call fcn.0044a2fc
push dword [ebp + 0x58]
call dword [0x4a64cc]
mov esi, eax
lea edi, [esi + 0x3ff]
and edi, 0xfffffc00
add edi, 0x100000
lea eax, [edi + 8]
push eax
lea ecx, [ebp + 0x58]
mov dword [ebp - 0x30], edi
call 0x44a2bb
lea ecx, [ebp + 0x38]
call fcn.00444444
push 0xffffffffffffffff
push 0xffffffffffffffff
call dword [0x4a647c]
push eax
call dword [0x4a6480]
call dword [0x4a64fc]
test byte [ebp + 0x73], 8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x78], ebx
je 0x40d6ab
mov eax, dword [ebp - 0x58]
mov ax, word [eax]
cmp ax, 0x40
je 0x40d290
cmp byte [ebp - 0x17], bl
je 0x40d290
cmp ax, 0x26
je 0x40d275
mov eax, dword [ebp + 0x44]
test byte [eax + 9], 0xf
je 0x40d290
mov byte [ebp + 0x37], 1
jmp 0x40d293
cmp dword [ebp - 0xb0], ebx
je 0x40d1d3
mov byte [ebp + 0x7b], 2
jmp 0x40d1d3
mov byte [ebp + 0x37], bl
push ebx
mov dword [ebp - 0x9c], ebx
call dword [0x4a649c]
lea eax, [ebp - 0x4c]
mov edi, dword [eax]
lea eax, [ebp - 0x1b8]
push eax
push edi
cmp dword [ebp + 0x24], 0xffffff9c
je 0x40d5f8
mov eax, dword [ebp - 0x58]
cmp word [eax], bx
je 0x40da44
mov ecx, dword [ebp + 0x44]
push 0x4a69d4
push eax
call fcn.0044a498