Function at 0x140311060
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x4a0
mov rax, qword [0x14045e9a8]
xor rax, rsp
mov qword [rsp + 0x490], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x4c], 0
lea rax, [rsp + 0x90]
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x58], 0
mov rax, qword [rsp + 0x4b0]
movzx eax, word [rax + 0x228]
mov word [rsp + 0x30], ax
mov rax, qword [rsp + 0x4b0]
movzx eax, word [rax + 0x22a]
mov dword [rsp + 0x54], eax
mov eax, 8
imul rax, rax, 8
mov rcx, qword [rsp + 0x4b0]
mov rax, qword [rcx + rax + 0x6d8]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x140311126
movzx eax, word [rsp + 0x30]
test eax, eax
jne 0x140311126
xor eax, eax
jmp 0x1403117df
mov r8d, 0x80
xor edx, edx
lea rcx, [rsp + 0x90]
call sub.VCRUNTIME140.dll_memset
cmp qword [rsp + 0x40], 0
je 0x1403115a9
mov rcx, qword [rsp + 0x40]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
cmp rax, 0xff
jae 0x1403115a9
movzx eax, byte [0x14045ee0c]
mov byte [rsp + 0x190], al
lea rax, [rsp + 0x191]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
mov dword [rsp + 0x48], 0
mov byte [rsp + 0x34], 0
mov byte [rsp + 0x35], 0
mov rcx, qword [0x140454868]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r8, rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [0x140454868]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x1403111d9
mov rcx, qword [0x140454868]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x34], 1
jmp 0x14031121f
mov rcx, qword [str.host_]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov r8, rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [str.host_]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x14031121f
mov rcx, qword [str.host_]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x35], 1
movzx eax, byte [rsp + 0x35]
test eax, eax
jne 0x1403112f4
mov dword [rsp + 0x28], pe_nt_image_headers64
lea rax, [rsp + 0x190]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x40]
mov rax, qword [rsp + 0x4b8]
mov r8d, dword [rax + 0x548]
mov edx, dword [rsp + 0x4d0]
mov ecx, dword [rsp + 0x4c8]
call fcn.140326460
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x140311283
cmp dword [rsp + 0x50], 1
je 0x1403112b1
cmp dword [rsp + 0x50], 2
je 0x1403112bb
jmp 0x1403112f4
movzx eax, byte [rsp + 0x34]
test eax, eax
je 0x1403112af
mov r8, qword [rsp + 0x40]
lea rdx, str.Couldnt_bind_to_interface__s
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e83a0
mov eax, 0x2d
jmp 0x1403117df
jmp 0x1403112f4
mov eax, 1
jmp 0x1403117df
mov byte [rsp + 0x34], 1
mov eax, dword [rsp + 0x4c8]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x190]
mov r8, qword [rsp + 0x40]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e8500
mov dword [rsp + 0x48], 1
movzx eax, byte [rsp + 0x34]
test eax, eax
jne 0x140311443
mov rax, qword [rsp + 0x4b8]
movzx eax, byte [rax + 0x554]
mov byte [rsp + 0x36], al
cmp dword [rsp + 0x4c8], 2
jne 0x14031132f
mov rax, qword [rsp + 0x4b8]
mov byte [rax + 0x554], 1
jmp 0x140311348
cmp dword [rsp + 0x4c8], 0x17
jne 0x140311348
mov rax, qword [rsp + 0x4b8]
mov byte [rax + 0x554], 2
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, 0x50
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x4b0]
call fcn.1402d3220
mov dword [rsp + 0x7c], eax
cmp dword [rsp + 0x7c], 1
jne 0x14031138a
lea rdx, [rsp + 0x58]
mov rcx, qword [rsp + 0x4b0]
call fcn.1402d2750
mov rax, qword [rsp + 0x4b8]
movzx ecx, byte [rsp + 0x36]
mov byte [rax + 0x554], cl
cmp qword [rsp + 0x58], 0
je 0x14031143b
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x190]
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax]
call fcn.1402d3b30
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x190]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x4c8]
mov r8, qword [rsp + 0x40]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e8500
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x4b0]
call fcn.1402d38f0
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
mov eax, dword [rax + 4]
cmp dword [rsp + 0x4c8], eax
je 0x140311431
mov eax, 1
jmp 0x1403117df
mov dword [rsp + 0x48], 1
jmp 0x140311443
mov dword [rsp + 0x48], 0xffffffff
cmp dword [rsp + 0x48], 0
jle 0x14031156e
cmp dword [rsp + 0x4c8], 0x17
jne 0x140311519
mov edx, 0x25
lea rcx, [rsp + 0x190]
call sub.VCRUNTIME140.dll_strchr
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140311490
mov rax, qword [rsp + 0x68]
mov byte [rax], 0
mov rax, qword [rsp + 0x68]
inc rax
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x60]
add rax, 8
mov r8, rax
lea rdx, [rsp + 0x190]
mov ecx, 0x17
call fcn.1403073f0
test eax, eax
jle 0x14031150f
mov eax, 0x17
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_htons]
mov rcx, qword [rsp + 0x60]
mov word [rcx + 2], ax
cmp qword [rsp + 0x68], 0
je 0x14031150f
mov r8d, 0xa
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov dword [rsp + 0x78], eax
cmp dword [rsp + 0x78], 0xffffffff
jbe 0x140311503
mov eax, 1
jmp 0x1403117df
mov rax, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x78]
mov dword [rax + 0x18], ecx
mov dword [rsp + 0x4c], 0x1c
jmp 0x14031156e
cmp dword [rsp + 0x4c8], 2
jne 0x14031156e
mov rax, qword [rsp + 0x70]
add rax, 4
mov r8, rax
lea rdx, [rsp + 0x190]
mov ecx, 2
call fcn.1403073f0
test eax, eax
jle 0x14031156e
mov eax, 2
mov rcx, qword [rsp + 0x70]
mov word [rcx], ax
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_htons]
mov rcx, qword [rsp + 0x70]
mov word [rcx + 2], ax
mov dword [rsp + 0x4c], 0x10
cmp dword [rsp + 0x48], 1
jge 0x1403115a7
mov rax, qword [rsp + 0x4b0]
mov byte [rax + 0x12af], 0
mov r8, qword [rsp + 0x40]
lea rdx, str.Couldnt_bind_to__s
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e83a0
mov eax, 0x2d
jmp 0x1403117df
jmp 0x140311611
cmp dword [rsp + 0x4c8], 0x17
jne 0x1403115de
mov eax, 0x17
mov rcx, qword [rsp + 0x60]
mov word [rcx], ax
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_htons]
mov rcx, qword [rsp + 0x60]
mov word [rcx + 2], ax
mov dword [rsp + 0x4c], 0x1c
jmp 0x140311611
cmp dword [rsp + 0x4c8], 2
jne 0x140311611
mov eax, 2
mov rcx, qword [rsp + 0x70]
mov word [rcx], ax
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_htons]
mov rcx, qword [rsp + 0x70]
mov word [rcx + 2], ax
mov dword [rsp + 0x4c], 0x10
mov r8d, dword [rsp + 0x4c]
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x4c0]
call qword [sym.imp.ws2_32.dll_bind]
test eax, eax
jl 0x140311701
mov dword [rsp + 0x80], 0x80
mov r8d, 0x80
xor edx, edx
lea rcx, [rsp + 0x110]
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0x110]
mov rcx, qword [rsp + 0x4c0]
call qword [sym.imp.ws2_32.dll_getsockname]
test eax, eax
jge 0x1403116cf
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x4b0]
mov ecx, dword [rsp + 0x38]
mov dword [rax + 0xcfc], ecx
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x290]
mov ecx, dword [rsp + 0x38]
call fcn.1402adc10
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, [0x140454918]
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e83a0
mov eax, 0x2d
jmp 0x1403117df
movzx eax, word [rsp + 0x30]
mov r8d, eax
lea rdx, str.Local_port:__hu
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e8500
mov rax, qword [rsp + 0x4b8]
mov byte [rax + 0x30a], 1
xor eax, eax
jmp 0x1403117df
mov eax, dword [rsp + 0x54]
dec eax
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0
jle 0x140311784
movzx eax, word [rsp + 0x30]
inc ax
mov word [rsp + 0x30], ax
movzx eax, word [rsp + 0x30]
test eax, eax
jne 0x14031172a
jmp 0x14031178b
movzx eax, word [rsp + 0x30]
dec eax
mov r8d, eax
lea rdx, str.Bind_to_local_port__d_failed__trying_next
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e8500
mov rax, qword [rsp + 0x88]
movzx eax, word [rax]
cmp eax, 2
jne 0x14031176e
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_ntohs]
mov rcx, qword [rsp + 0x70]
mov word [rcx + 2], ax
jmp 0x140311782
movzx ecx, word [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_ntohs]
mov rcx, qword [rsp + 0x60]
mov word [rcx + 2], ax
jmp 0x140311786
jmp 0x14031178b
jmp 0x140311611
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x4b0]
mov ecx, dword [rsp + 0x38]
mov dword [rax + 0xcfc], ecx
mov r8d, pe_nt_image_headers64
lea rdx, [rsp + 0x390]
mov ecx, dword [rsp + 0x38]
call fcn.1402adc10
mov r9, rax
mov r8d, dword [rsp + 0x38]
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, qword [rsp + 0x4b0]
call fcn.1402e83a0
mov eax, 0x2d
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.140354350
add rsp, 0x4a0
pop rdi
ret