Function at 0x4035e0
Capabilities:
Check os version
Connect pipe
Create pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424cd8
mov eax, dword fs:[0]
push eax
sub esp, 0x1e4
mov eax, dword [0x42e2ac]
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 esi, ecx
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [esi], 0xffffffff
call fcn.00401af0
lea ebx, [eax + 0x10]
mov dword [ebp - 0x1c4], ebx
mov byte [ebp - 4], 1
cmp dword [ebp + 0xc], edi
jne 0x40382f
xor eax, eax
mov dword [ebp - 0x1e0], eax
mov dword [ebp - 0x1d8], eax
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0x1e0], 0xc
mov dword [ebp - 0x1d8], 1
mov dword [ebp - 0x1d0], edi
mov dword [ebp - 0x1cc], edi
mov byte [ebp - 4], 2
mov eax, dword [0x430f1c]
cmp dword [eax - 0xc], edi
setne al
test al, al
je 0x4037da
mov dword [ebp - 0x1c8], edi
lea ecx, [ebp - 0x1c8]
push ecx
push 0x20008
mov byte [ebp - 4], 3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ecx, dword [ebp - 0x1c8]
lea edx, [ebp - 0x1d4]
push edx
call fcn.00402cb0
mov edi, dword [eax]
add esp, 4
mov dword [ebp - 0x1ec], edi
mov dword [eax], 0
mov dword [ebp - 0x1c0], edi
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x1d4]
push eax
call fcn.0041159e
add esp, 4
lea ecx, [ebp - 0x1e8]
push edi
push ecx
call fcn.00402f60
mov edi, dword [eax]
mov dword [eax], 0
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x1e8]
push edx
call fcn.0041159e
mov dword [ebp - 0x1dc], edi
mov eax, edi
add esp, 0xc
lea edi, [ebp - 0x1d0]
mov dword [ebp - 0x1d4], 0
call fcn.00408660
push 4
push str._EPM
lea ebx, [ebp - 0x1c4]
call fcn.00405750
push 0
call fcn.0041159e
mov eax, dword [ebp - 0x1ec]
add esp, 4
push eax
call fcn.0041159e
mov eax, dword [ebp - 0x1c8]
add esp, 4
test eax, eax
je 0x403767
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x1c4]
mov edi, dword [ebp - 0x1cc]
lea eax, [ebp - 0x1e0]
push eax
push 0
push 0x400
push 0x400
push 0xff
push 6
push 3
push ebx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [esi], eax
mov byte [ebp - 4], 1
test edi, edi
je 0x4038fc
lea ecx, [edi + 4]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4038fc
mov eax, dword [edi]
mov edx, dword [eax]
mov ecx, edi
call edx
lea eax, [edi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4038fc
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov ecx, edi
call eax
jmp 0x4038fc
push 0x11c
lea ecx, [ebp - 0x1b8]
push 0
push ecx
call fcn.00412860
add esp, 0xc
lea edx, [ebp - 0x1b8]
push edx
mov dword [ebp - 0x1b8], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x1b4], 6
jb 0x403773
mov eax, dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x1dc]
lea edi, [ebp - 0x1d0]
call fcn.004086c0
jmp 0x40376d
call fcn.004032e0
test al, al
je 0x403850
push 4
push str._EPM
lea ebx, [ebp - 0x1c4]
call fcn.00405750
mov ebx, dword [ebp - 0x1c4]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push ebx
call edi
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x403970
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x4038fc
push 0xbb8
push ebx
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x4038e8
xor ecx, ecx
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x2c], cx
push 0x3d
mov eax, str.Timeout_while_trying_to_connect_to_a_named_pipe__pipe_is_busy
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
call fcn.0040bfd0
push 0x190
push str.....CommonSourceADXBootstrapperClickTwice.DownloaderPipe.cpp
sub esp, 0x48
mov byte [ebp - 4], 6
mov dword [ebp - 0x1c0], esp
lea ebx, [ebp - 0x2c]
mov esi, esp
call fcn.004043f0
lea esi, [ebp - 0x78]
call fcn.00407f90
add esp, 0x50
push 0x42b588
mov edx, esi
push edx
call fcn.004128da
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
push ebx
call edi
mov dword [esi], eax
cmp dword [esi], 0xffffffff
jne 0x403970
xor eax, eax
mov word [ebp - 0x2c], ax
mov ebx, 7
push 0x21
mov eax, str.Unable_to_connect_to_a_named_pipe
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], 0
call fcn.0040bfd0
push 0x197
push str.....CommonSourceADXBootstrapperClickTwice.DownloaderPipe.cpp
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x94]
push edx
mov byte [ebp - 4], bl
call fcn.00402ae0
sub esp, 0x40
mov byte [ebp - 4], 8
mov ebx, eax
mov esi, esp
mov dword [ebp - 0x1c0], esp
call fcn.004043f0
lea esi, [ebp - 0x78]
call fcn.00407f90
add esp, 0x50
push 0x42b588
mov eax, esi
push eax
call fcn.004128da
mov edx, dword [esi]
push 0
push 0
lea ecx, [ebp - 0x1e4]
push ecx
push edx
mov dword [ebp - 0x1e4], 2
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x4039e0
mov dword [ebp - 0x1c], eax
mov word [ebp - 0x2c], ax
push 0x1e
mov eax, str.SetNamedPipeHandleState_failed
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
call fcn.0040bfd0
push 0x19b
push str.....CommonSourceADXBootstrapperClickTwice.DownloaderPipe.cpp
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 9
call fcn.00403370
sub esp, 0x48
mov byte [ebp - 4], 0xa
mov dword [ebp - 0x1c0], esp
mov ebx, eax
jmp 0x4038c9
cmp dword [ebp + 0xc], 0
jne 0x403af4
mov edi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x430f20
call edi
mov eax, dword [esi]
push 0x430f20
mov dword [0x430f10], eax
mov byte [0x430f14], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esi]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x403a92
call fcn.00403b60
xor edx, edx
push 0x18
mov eax, str.Client_failed_to_connect
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], dx
call fcn.0040bfd0
push 0x1a9
push str.....CommonSourceADXBootstrapperClickTwice.DownloaderPipe.cpp
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x94]
mov byte [ebp - 4], 0xb
call fcn.00403370
sub esp, 0x48
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x1c0], esp
mov ebx, eax
mov esi, esp
call fcn.004043f0
lea esi, [ebp - 0x78]
call fcn.00407f90
add esp, 0x50
push 0x42b588
mov ecx, esi
push ecx
jmp 0x4038e3
push 0x430f20
call edi
mov dl, byte [0x430f14]
push 0x430f20
mov byte [ebp - 0x1b9], dl
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [ebp - 0x1b9], 0
je 0x403aef
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00403b60
mov eax, str.The_pipe_terminated.
lea esi, [ebp - 0x2c]
call fcn.0040c0e0
push 0x1b9
push str.....CommonSourceADXBootstrapperClickTwice.DownloaderPipe.cpp
sub esp, 0x48
mov byte [ebp - 4], 0xd
mov dword [ebp - 0x1c0], esp
mov ebx, esi
jmp 0x403a73
call fcn.00403b60
add ebx, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [ebx + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x403b14
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403b3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
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.004115a9
mov esp, ebp
pop ebp
ret 8