Function at 0x140001880
Capabilities:
Get routing table

Disassembly:
push rdi
push r12
sub rsp, 0x88
mov rax, qword [0x14007e018]
xor rax, rsp
mov qword [rsp + 0x68], rax
xor r12d, r12d
mov dword [rsp + 0x5c], r12d
lea ecx, [r12 + 0x1c]
call fcn.14003f38c
mov rdi, rax
test rax, rax
je 0x1400018e7
xor r8d, r8d
lea rdx, [rsp + 0x5c]
mov rcx, rax
call qword [sym.imp.IPHLPAPI.DLL_GetIpAddrTable]
cmp eax, 0x7a
jne 0x1400018e7
mov rcx, rdi
call fcn.14003f378
mov ecx, dword [rsp + 0x5c]
call fcn.14003f38c
mov rdi, rax
test rax, rax
je 0x140001cc0
xor r8d, r8d
mov qword [rsp + 0xa0], rbx
lea rdx, [rsp + 0x5c]
mov rcx, rdi
call qword [sym.imp.IPHLPAPI.DLL_GetIpAddrTable]
xor ecx, ecx
mov edx, 1
mov ebx, eax
test eax, eax
jne 0x140001cde
lea r8, str.Interface:_n
mov qword [rsp + 0xb0], rsi
call fcn.140001d50
mov esi, r12d
cmp dword [rdi], r12d
jle 0x140001a54
lea rbx, [rdi + 0x1a]
nop word [rax + rax]
mov eax, dword [rbx - 0x12]
lea r8, str._n_tInterface_Index__d_:_t_ld_n
mov r9d, esi
mov dword [rsp + 0x20], eax
mov edx, 1
xor ecx, ecx
call fcn.140001d50
mov ecx, dword [rbx - 0x16]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r9d, esi
lea r8, str._tIP_Address__d_:______t_s_n
mov edx, 1
mov qword [rsp + 0x20], rax
xor ecx, ecx
call fcn.140001d50
mov ecx, dword [rbx - 0xe]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r9d, esi
lea r8, str._tSubnet_Mask__d_:_____t_s_n
mov edx, 1
mov qword [rsp + 0x20], rax
xor ecx, ecx
call fcn.140001d50
mov r9d, esi
lea r8, str._tType_and_State__d_:
mov edx, 1
xor ecx, ecx
call fcn.140001d50
test byte [rbx], 1
je 0x1400019d3
lea r8, str._tPrimary_IP_Address
mov edx, 1
xor ecx, ecx
call fcn.140001d50
test byte [rbx], 4
je 0x1400019eb
lea r8, str._tDynamic_IP_Address
mov edx, 1
xor ecx, ecx
call fcn.140001d50
test byte [rbx], 8
je 0x140001a03
lea r8, str._tAddress_is_on_disconnected_interface
mov edx, 1
xor ecx, ecx
call fcn.140001d50
test byte [rbx], 0x40
je 0x140001a1b
lea r8, str._tAddress_is_being_deleted
mov edx, 1
xor ecx, ecx
call fcn.140001d50
test byte [rbx], 0x80
je 0x140001a33
lea r8, str._tTransient_address
mov edx, 1
xor ecx, ecx
call fcn.140001d50
lea r8, [0x140074060]
mov edx, 1
xor ecx, ecx
call fcn.140001d50
inc esi
add rbx, 0x18
cmp esi, dword [rdi]
jl 0x140001940
mov rcx, rdi
mov qword [rsp + 0xa8], rbp
call fcn.14003f378
mov r8d, 1
mov dword [rsp + 0x58], r12d
lea rdx, [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.IPHLPAPI.DLL_GetIpNetTable]
cmp eax, 0x7a
jne 0x140001b91
mov ecx, dword [rsp + 0x58]
mov qword [rsp + 0x80], r13
call fcn.14003f38c
mov r8d, 1
mov qword [rsp + 0x50], rax
lea rdx, [rsp + 0x58]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.IPHLPAPI.DLL_GetIpNetTable]
xor ecx, ecx
mov edx, 1
test eax, eax
jne 0x140001b73
lea r8, str.ARP_Table:_n
call fcn.140001d50
mov r13d, r12d
cmp dword [rbx], r12d
jbe 0x140001b7f
mov qword [rsp + 0x78], r14
mov r12, rbx
mov qword [rsp + 0x70], r15
nop word [rax + rax]
mov eax, r13d
lea rcx, [rax + rax*2]
movzx ebx, byte [r12 + rcx*8 + 0x11]
movzx edi, byte [r12 + rcx*8 + 0x10]
movzx esi, byte [r12 + rcx*8 + 0xf]
movzx ebp, byte [r12 + rcx*8 + 0xe]
movzx r14d, byte [r12 + rcx*8 + 0xd]
movzx r15d, byte [r12 + rcx*8 + 0xc]
mov ecx, dword [r12 + rcx*8 + 0x14]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov dword [rsp + 0x48], ebx
lea r8, str._tIP_Address:__s__MAC_Address:__02X__02X__02X__02X__02X__02X_n
mov dword [rsp + 0x40], edi
mov r9, rax
mov dword [rsp + 0x38], esi
mov edx, 1
mov dword [rsp + 0x30], ebp
xor ecx, ecx
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
call fcn.140001d50
inc r13d
cmp r13d, dword [r12]
jb 0x140001af0
mov rbx, qword [rsp + 0x50]
xor r12d, r12d
mov r15, qword [rsp + 0x70]
mov r14, qword [rsp + 0x78]
jmp 0x140001b7f
lea r8, str.Error_getting_ARP_table_n
call fcn.140001d50
mov rcx, rbx
call fcn.14003f378
mov r13, qword [rsp + 0x80]
jmp 0x140001ba4
lea r8, str.Error_getting_ARP_table_size_n
mov edx, 1
xor ecx, ecx
call fcn.140001d50
mov r8d, 1
mov dword [rsp + 0x58], r12d
lea rdx, [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
cmp eax, 0x7a
jne 0x140001c7d
mov ecx, dword [rsp + 0x58]
call fcn.14003f38c
mov r8d, 1
lea rdx, [rsp + 0x58]
mov rcx, rax
mov rbp, rax
call qword [sym.imp.IPHLPAPI.DLL_GetIpForwardTable]
xor ecx, ecx
mov edx, 1
test eax, eax
jne 0x140001c67
lea r8, str.Routing_Table:_n
call fcn.140001d50
cmp dword [rbp], 0
jbe 0x140001c73
mov eax, r12d
imul rsi, rax, 0x38
add rsi, rbp
mov ecx, dword [rsi + 0x10]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [rsi + 8]
mov rdi, rax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [rsi + 4]
mov rbx, rax
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [rsi + 0x14]
lea r8, str._tDestination:__s__Mask:__s__Gateway:__s__Interface:__d_n
mov dword [rsp + 0x30], ecx
mov r9, rax
mov qword [rsp + 0x28], rdi
xor ecx, ecx
mov edx, 1
mov qword [rsp + 0x20], rbx
call fcn.140001d50
inc r12d
cmp r12d, dword [rbp]
jb 0x140001c02
mov rcx, rbp
call fcn.14003f378
jmp 0x140001c90
lea r8, str.Error_getting_routing_table_n
call fcn.140001d50
mov rcx, rbp
call fcn.14003f378
jmp 0x140001c90
lea r8, str.Error_getting_routing_table_size_n
mov edx, 1
xor ecx, ecx
call fcn.140001d50
mov rbp, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0x68]
xor rcx, rsp
call fcn.140034cb0
add rsp, 0x88
pop r12
pop rdi
ret
lea r8, str.Memory_allocation_failed_for_GetIpAddrTable_n
mov edx, 1
xor ecx, ecx
call fcn.140001d50
mov ecx, 1
call fcn.14003f670
int3
mov r9d, ebx
lea r8, str.GetIpAddrTable_failed_with_error__d_n
call fcn.140001d50
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov r9d, 0x400
mov r8d, ebx
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0x1300
call qword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x140001d3e
mov r9, qword [rsp + 0x60]
lea r8, str._tError:__s
mov edx, 1
xor ecx, ecx
call fcn.140001d50
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, 1
call fcn.14003f670
int3