Function at 0x401050
Capabilities:
Acquire debug privileges
Connect pipe
Create pipe
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41ca80
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x426004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x34]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [ebp - 0x34]
lea eax, [ebp - 0x2c]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x4010d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LookupPrivilegeValue_error:__u_n
call fcn.00401010
add esp, 8
jmp 0x401131
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x28]
push 0
push 0
push 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
push 0
push esi
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x401117
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.AdjustTokenPrivileges_error:__u_n
call fcn.00401010
add esp, 8
jmp 0x401131
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x401131
push str.The_token_does_not_have_the_specified_privilege.__n
call fcn.00401010
add esp, 4
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 1
push 0
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test ebx, ebx
je 0x4013ca
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401160
sub ecx, edx
sar ecx, 1
je 0x4013ca
push 0x244
call fcn.0040510c
add esp, 4
mov edi, eax
push edi
mov dword [edi + 0x18], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [edi + 0x224], 0
lea ebx, [edi + 0x23c]
mov dword [edi + 0x228], 0
push 0x18
mov dword [ebx], 0
mov dword [ebx + 4], 0
call fcn.0040510c
add esp, 4
lea esi, [edi + 0x1c]
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebx], eax
push str..pipe_
push esi
mov dword [edi + 0x220], 0
mov dword [edi + 0x230], 0
mov dword [edi + 0x22c], 0
mov dword [edi + 0x224], 0
mov dword [edi + 0x234], 0
mov dword [edi + 0x238], 0
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push dword [ebp - 0x24]
push esi
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push 0
push 0xffffffffffffffff
push 0x10
push 0x40000
push 0xff
push 0
push 3
push esi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
push 0x423da0
push dword [ebp - 0x24]
mov dword [edi + 0x18], eax
call dword [sym.imp.SHLWAPI.dll_StrCmpW]
test eax, eax
jne 0x4012cb
mov ecx, edi
mov dword [edi + 0x21c], 0x52ec
call fcn.00401a00
mov ecx, edi
call fcn.00403c30
mov ecx, dword [edi + 0x22c]
test ecx, ecx
je 0x4012d6
mov eax, dword [ecx]
lea edx, [ebp - 0x38]
push edx
push ecx
call dword [eax + 0x1c]
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x24]
push edx
lea edx, [ebp - 0x28]
mov dword [ebp - 0x24], 0
push edx
mov ecx, dword [eax]
push 1
push eax
call dword [ecx + 0x1c]
cmp dword [ebp - 0x24], 0
je 0x4012d6
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
cmp dword [ebp - 0x30], 0
je 0x4012d6
push str.WEEE
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4012d6
push 0
push dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov ecx, edi
call fcn.00403f80
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0
mov ecx, dword [edi + 0x220]
test ecx, ecx
je 0x4012f8
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi + 0x230]
test ecx, ecx
je 0x401308
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [edi + 0x22c]
test ecx, ecx
je 0x401318
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov ecx, dword [edi + 0x224]
test ecx, ecx
je 0x401328
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [edi + 0x234]
test eax, eax
je 0x401343
push 0x10
push eax
mov dword [eax], vtable.CMyICLRDebuggingLibraryProvider.0
call fcn.0040513c
add esp, 8
mov eax, dword [edi + 0x238]
test eax, eax
je 0x40135e
push 0x10
push eax
mov dword [eax], vtable.CMyIcorDebugDataTarget.0
call fcn.0040513c
add esp, 8
mov eax, dword [ebx]
mov esi, dword [eax + 4]
cmp byte [esi + 0xd], 0
jne 0x401392
nop dword [eax]
push dword [esi + 8]
mov ecx, ebx
push ebx
call fcn.004050a0
mov eax, esi
mov esi, dword [esi]
push 0x18
push eax
call fcn.0040513c
add esp, 8
cmp byte [esi + 0xd], 0
je 0x401370
mov eax, dword [ebx]
push 0x18
push eax
call fcn.0040513c
mov eax, dword [edi + 0x18]
add esp, 8
test eax, eax
je 0x4013b7
cmp eax, 0xffffffff
je 0x4013b7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x18], 0
push 0x244
push edi
call fcn.0040513c
mov eax, dword [ebp - 0x28]
add esp, 8
jmp 0x4013e3
push 0x10
push str.dotNET_Data_Collector
push str.No_pipename_provided
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004050db
mov esp, ebp
pop ebp
ret 0x10