Function at 0x40d38f
Capabilities:
Execute command

Disassembly:
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x120], rcx
mov qword [rbp + 0x128], rdx
mov qword [rbp + 0x130], r8
mov qword [rbp + 0x138], r9
mov dword [rbp - 0x18], 1
mov r8d, 0x70
mov edx, 0
mov rcx, qword [rbp + 0x120]
call sym.memset
mov rax, qword [rbp + 0x120]
mov qword [rax], 0xffffffffffffffff
mov rax, qword [rbp + 0x128]
movzx eax, byte [rax]
test al, al
je 0x40d40d
mov rax, qword [rbp + 0x128]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__strdup]
call rax
jmp 0x40d412
mov eax, 0
mov rdx, qword [rbp + 0x120]
mov qword [rdx + 8], rax
mov rax, qword [rbp + 0x120]
mov qword [rax + 0x10], 0
mov rax, qword [rbp + 0x138]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov rdx, qword [rbp + 0x120]
mov dword [rdx + 0x60], eax
mov rdx, qword [rbp + 0x120]
lea rcx, [sym.choose_adapter_callback]
call sym.iterate_win_network_adapters
mov rax, qword [rbp + 0x120]
mov rax, qword [rax]
cmp rax, 0xffffffffffffffff
jne 0x40d4a8
mov rax, qword [rbp + 0x128]
movzx eax, byte [rax]
test al, al
jne 0x40d488
lea rcx, str.No_Windows_tap_devices_found__did_you_run_tapinstall.exe_
call sym.puts
jmp 0x40d49e
mov rax, qword [rbp + 0x128]
mov rdx, rax
lea rcx, str.Cannot_find_tap_device___s__n
call sym.printf
mov ecx, 1
call sym.exit
mov rax, qword [rbp + 0x148]
movzx eax, byte [rax]
test al, al
je 0x40d4cc
mov rax, qword [rbp + 0x148]
mov rdx, rax
mov rcx, qword [rbp + 0x120]
call sym.set_interface_mac
mov rax, qword [rbp + 0x120]
lea rcx, [rax + 0x58]
mov rax, qword [rbp + 0x120]
lea r8, [rax + 0x58]
mov rax, qword [rbp + 0x120]
mov rax, qword [rax]
mov qword [rsp + 0x38], 0
lea rdx, [rbp - 0x14]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 6
mov qword [rsp + 0x20], rcx
mov r9d, 6
mov edx, 0x220004
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.DLL_DeviceIoControl]
call rax
test eax, eax
jne 0x40d558
mov rax, qword [rbp + 0x120]
mov rdx, qword [rax + 0x10]
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 8]
mov r8, rdx
mov rdx, rax
lea rcx, str.Could_not_get_MAC_address_from_Windows_tap__s___s__n
call sym.printf
mov eax, 0xffffffff
jmp 0x40d851
mov edx, dword [rbp + 0x150]
mov rax, qword [rbp + 0x120]
mov dword [rax + 0x68], edx
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x5d]
movzx ebx, al
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x5c]
movzx r11d, al
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x5b]
movzx r10d, al
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x5a]
movzx r9d, al
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x59]
movzx r8d, al
mov rax, qword [rbp + 0x120]
movzx eax, byte [rax + 0x58]
movzx ecx, al
mov rax, qword [rbp + 0x120]
mov edx, dword [rax + 0x68]
mov rax, qword [rbp + 0x120]
mov rdi, qword [rax + 0x10]
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 8]
mov rsi, qword [rbp + 0x138]
mov dword [rsp + 0x50], ebx
mov dword [rsp + 0x48], r11d
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], r9d
mov dword [rsp + 0x30], r8d
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], edx
mov r9, rdi
mov r8, rsi
mov rdx, rax
lea rcx, str.Open_device__name_s__ip_s__ifName_s__MTU_d__mac_02X:_02X:_02X:_02X:_02X:_02X__n
call sym.printf
mov rax, qword [rbp + 0x130]
mov rdx, rax
lea rcx, str.dhcp
call sym.strcmp
test eax, eax
jne 0x40d662
mov rax, qword [rbp + 0x120]
mov rdx, qword [rax + 0x10]
lea rax, [rbp - 0x10]
mov r9, rdx
lea r8, str.netsh_interface_ip_set_address___s__dhcp
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__snprintf]
call rax
jmp 0x40d6a4
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax + 0x10]
lea rax, [rbp - 0x10]
mov rdx, qword [rbp + 0x140]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp + 0x138]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.netsh_interface_ip_set_address___s__static__s__s
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__snprintf]
call rax
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.system
test eax, eax
jne 0x40d6f0
mov rax, qword [rbp + 0x138]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov rdx, qword [rbp + 0x120]
mov dword [rdx + 0x60], eax
mov rax, qword [rbp + 0x140]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_inet_addr]
call rax
mov rdx, qword [rbp + 0x120]
mov dword [rdx + 0x64], eax
jmp 0x40d711
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 0x10]
lea rdx, [rbp - 0x10]
mov r8, rdx
mov rdx, rax
lea rcx, str.WARNING:_Unable_to_set_device__s_IP_address___s__n
call sym.printf
mov rax, qword [rbp + 0x120]
mov rcx, qword [rax + 0x10]
lea rax, [rbp - 0x10]
mov edx, dword [rbp + 0x150]
mov dword [rsp + 0x20], edx
mov r9, rcx
lea r8, str.netsh_interface_ipv4_set_subinterface___s__mtu_d_storepersistent
mov edx, 0x100
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__snprintf]
call rax
lea rax, [rbp - 0x10]
mov rcx, rax
call sym.system
test eax, eax
je 0x40d776
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 0x10]
lea rdx, [rbp - 0x10]
mov r8, rdx
mov rdx, rax
lea rcx, str.WARNING:_Unable_to_set_device__s_MTU___s__n
call sym.printf
mov rax, qword [rbp + 0x120]
mov rax, qword [rax]
lea rcx, [rbp - 0x18]
mov qword [rsp + 0x38], 0
lea rdx, [rbp - 0x14]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], 4
lea rdx, [rbp - 0x18]
mov qword [rsp + 0x20], rdx
mov r9d, 4
mov r8, rcx
mov edx, 0x220018
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.DLL_DeviceIoControl]
call rax
test eax, eax
jne 0x40d7d1
lea rcx, str.WARNING:_Unable_to_enable_TAP_adapter
call sym.puts
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateEventA]
call rax
mov rdx, qword [rbp + 0x120]
mov qword [rdx + 0x30], rax
mov r9d, 0
mov r8d, 0
mov edx, 1
mov ecx, 0
mov rax, qword [sym.imp.KERNEL32.DLL_CreateEventA]
call rax
mov rdx, qword [rbp + 0x120]
mov qword [rdx + 0x50], rax
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 0x30]
test rax, rax
je 0x40d845
mov rax, qword [rbp + 0x120]
mov rax, qword [rax + 0x50]
test rax, rax
jne 0x40d84c
mov eax, 0xffffffff
jmp 0x40d851
mov eax, 0
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
ret