Function at 0x4047fd
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x64
mov dword [esp + 8], 0x16
mov dword [esp + 4], 0
lea eax, [ebp - 0x42]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0xc], 1
lea eax, [ebp - 0x42]
add eax, 2
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call dbg.start_child
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x404934
mov eax, dword [ebp + 8]
lea edx, [eax + 0x48]
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.__aio_init_forward
test eax, eax
jne 0x404934
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x12]
movzx ebx, al
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x6c]
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x44]
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.event_add_process
test eax, eax
jne 0x40491c
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], edx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], edx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], edx
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x12]
movzx edx, al
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], str.started_process__s_with_pid__u_for_tunnel_0x_02x
mov dword [esp], 0
call dbg.info
mov byte [ebp - 0x40], 0
mov byte [ebp - 0x3f], 0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htonl]
call eax
sub esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0xc], 8
jmp 0x404934
mov eax, dword [ebp + 8]
lea edx, [eax + 0x48]
mov eax, dword [ebp + 8]
add eax, 0x20
mov dword [esp + 4], edx
mov dword [esp], eax
call dbg.aio_kill_forward
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x12]
movzx eax, al
mov edx, dword [ebp - 0xc]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x42]
add edx, 2
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 0
call dbg.channel_write
test eax, eax
js 0x40497c
movzx eax, byte [ebp - 0x40]
test al, al
jne 0x40497c
mov eax, dword [ebp + 8]
mov byte [eax + 0x10], 1
mov eax, 0
jmp 0x4049fd
cmp dword [ebp - 0x10], 0
jne 0x4049dc
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x12]
movzx eax, al
mov dword [esp], eax
call dbg.event_del_tunnel
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TerminateProcess]
call eax
sub esp, 8
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x12]
movzx eax, al
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.failed_to_start_process__s_for_tunnel_0x_02x
call dbg.error
mov ebx, dword [ebp - 4]
leave
ret