Function at 0x402d70
Capabilities:
Connect pipe
Create pipe
Create process on windows
Create thread
Write and execute a file
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [0x4262ac]
xor eax, ebp
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xcc], 1
mov dword [ebp - 0xc8], 0
xor eax, eax
mov word [ebp - 0x70], ax
xor ecx, ecx
mov dword [ebp - 0x6e], ecx
mov dword [ebp - 0x6a], ecx
mov dword [ebp - 0x66], ecx
mov dword [ebp - 0x62], ecx
mov dword [ebp - 0x5e], ecx
mov dword [ebp - 0x5a], ecx
mov dword [ebp - 0x56], ecx
mov dword [ebp - 0x52], ecx
mov dword [ebp - 0x4e], ecx
mov word [ebp - 0x4a], cx
push 0x422c9c
push 0x422ca8
call fcn.00402b80
add esp, 8
mov dword [ebp - 0xd0], 0x4281c4
mov edx, dword [ebp - 0xd0]
add edx, 1
mov dword [ebp - 0xd4], edx
mov eax, dword [ebp - 0xd0]
mov cl, byte [eax]
mov byte [ebp - 0xd5], cl
add dword [ebp - 0xd0], 1
cmp byte [ebp - 0xd5], 0
jne 0x402de9
mov edx, dword [ebp - 0xd0]
sub edx, dword [ebp - 0xd4]
mov dword [ebp - 0xdc], edx
je 0x402e5a
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov ecx, dword [0x427010]
mov dword [ebp - 0x30], ecx
mov edx, dword [0x4281c4]
mov dword [ebp - 0x2c], edx
mov eax, dword [0x4281c8]
mov dword [ebp - 0x28], eax
mov ecx, dword [0x4281cc]
mov dword [ebp - 0x24], ecx
mov edx, dword [0x4281d0]
mov dword [ebp - 0x20], edx
jmp 0x402e73
push 0x422cb4
push str.__s__Error__Get_adapter_info_by_index_error
call fcn.00402b80
add esp, 8
xor eax, eax
jmp 0x403198
push 0x44
push 0
lea eax, [ebp - 0xc0]
push eax
call fcn.00415360
add esp, 0xc
mov dword [ebp - 0xc0], 0x44
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
push str.htcnat.exe
push 0x422d04
push 0x14
lea edx, [ebp - 0x70]
push edx
call fcn.0040c597
add esp, 0x10
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0xc0]
push ecx
push 0
push 0
push 0x8000000
push 0
push 0
push 0
lea edx, [ebp - 0x70]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x402f14
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x422d0c
push str.__s__Error__Create_NAT_process_error:__d
call fcn.00402b80
add esp, 0xc
mov dword [ebp - 0xcc], 0
jmp 0x403129
mov eax, dword [ebp - 0x18]
mov dword [0x428228], eax
lea ecx, [ebp - 0xc4]
push ecx
push 0
lea edx, [ebp - 0x18]
push edx
push 0x4033b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x428234], eax
cmp dword [0x428234], 0
jne 0x402f58
push 0x422d44
push str.__s__Error__Create_monitoring_NAT_process_error_
call fcn.00402b80
add esp, 8
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4281d4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0
push 0x20
push 0x20
push 2
push 6
push 0x40000003
push str..pipehtcnatpipe
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [0x428238], eax
cmp dword [0x428238], 0xffffffff
jne 0x402fc4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x422dac
push str.__s__Error__CreateNamedPipe_error_with__d
call fcn.00402b80
add esp, 0xc
mov dword [ebp - 0xcc], 0
jmp 0x403129
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
jne 0x403007
push 0x422de4
push str.__s__Error__Create_pipe_event_failure_
call fcn.00402b80
add esp, 8
mov dword [ebp - 0xcc], 0
jmp 0x403129
xor ecx, ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0xc8]
mov dword [ebp - 0x38], edx
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [0x428238]
push ecx
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x403068
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x422e18
push str.__s__Error__ConnectNamedPipe_failed_with__d
call fcn.00402b80
add esp, 0xc
mov dword [ebp - 0xcc], 0
jmp 0x403129
push 0x1f40
mov edx, dword [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4030a9
push 0x422e50
push str.__s__Error__Wait_NAT_pipe_timeout_8s_
call fcn.00402b80
add esp, 8
mov dword [ebp - 0xcc], 0
jmp 0x403129
lea eax, [ebp - 0x48]
push eax
push 0
push 0x14
lea ecx, [ebp - 0x30]
push ecx
mov edx, dword [0x428238]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x74], eax
cmp dword [ebp - 0x74], 0
jne 0x4030f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x422e84
push 0x422e90
call fcn.00402b80
add esp, 0xc
mov dword [ebp - 0xcc], 0
jmp 0x403129
push 0x1f40
mov eax, dword [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x403129
push 0x422eb4
push 0x422ec0
call fcn.00402b80
add esp, 8
mov dword [ebp - 0xcc], 0
cmp dword [ebp - 0xcc], 0
jne 0x40315f
cmp dword [0x428238], 0
je 0x40315f
mov ecx, dword [0x428238]
push ecx
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov edx, dword [0x428238]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x428238], 0
push 0x4281d4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0xc8], 0
je 0x403180
mov eax, dword [ebp - 0xc8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.EnableNAT
push 0x422ef8
call fcn.00402b80
add esp, 8
mov eax, dword [ebp - 0xcc]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.0040c2df
mov esp, ebp
pop ebp
ret