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

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x740
mov rax, qword [0x1401e7890]
xor rax, rsp
mov qword [rsp + 0x730], rax
mov dword [rsp + 0x50], 0x1e
mov rax, qword [rsp + 0x750]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
add rax, 0x5d0
mov qword [rsp + 0xf0], rax
mov qword [rsp + 0x70], 0xffffffffffffffff
movzx eax, byte [0x1401ebd22]
mov byte [rsp + 0x1a0], al
lea rax, [rsp + 0x1a1]
mov rdi, rax
xor eax, eax
mov ecx, reloc.WLDAP32.dll_Ordinal_46
rep stosb byte [rdi], al
lea rax, [rsp + 0x120]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0x88], 0
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x750]
mov rax, qword [rcx + rax + 0x718]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0xc0], 0
xor eax, eax
mov word [rsp + 0x4c], ax
xor eax, eax
mov word [rsp + 0x48], ax
mov byte [rsp + 0x44], 1
mov qword [rsp + 0x78], 0
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x750]
cmp qword [rcx + rax + 0x718], 0
je 0x14012200e
mov eax, 8
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x750]
mov rcx, qword [rcx + rax + 0x718]
call fcn.140158210
cmp rax, 1
jbe 0x14012200e
mov rcx, qword [rsp + 0x80]
call fcn.140158210
cmp rax, 0x16
jae 0x140121d98
mov qword [rsp + 0xf8], socket
jmp 0x140121dad
mov rcx, qword [rsp + 0x80]
call fcn.140158210
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x110], rax
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd8], 0
mov rax, qword [rsp + 0x108]
inc rax
mov edx, 1
mov rcx, rax
call qword [0x1401d9028]
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
jne 0x140121e24
mov dword [rsp + 0x50], reloc.WLDAP32.dll_Ordinal_27
jmp 0x14012282c
mov rax, qword [rsp + 0x80]
movsx eax, byte [rax]
cmp eax, 0x3a
jne 0x140121e46
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xa0], rax
jmp 0x140121eab
mov edx, 0x3a
mov rcx, qword [rsp + 0x80]
call sub.VCRUNTIME140.dll_strchr
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0xa0], 0
je 0x140121e99
mov rax, qword [rsp + 0x110]
mov rcx, qword [rsp + 0xa0]
sub rcx, rax
mov rax, rcx
mov r8, rax
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
jmp 0x140121eab
mov rdx, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x78]
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
cmp qword [rsp + 0xa0], 0
je 0x140121f64
mov edx, 0x3a
mov rcx, qword [rsp + 0xa0]
call sub.VCRUNTIME140.dll_strchr
mov qword [rsp + 0xc8], rax
cmp qword [rsp + 0xc8], 0
je 0x140121f64
mov rax, qword [rsp + 0xc8]
inc rax
mov r8d, 0xa
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.1400e5840
mov word [rsp + 0x4c], ax
mov edx, Ordinal_46
mov rcx, qword [rsp + 0xc8]
call sub.VCRUNTIME140.dll_strchr
mov qword [rsp + 0xd8], rax
cmp qword [rsp + 0xd8], 0
je 0x140121f5a
mov rax, qword [rsp + 0xd8]
inc rax
mov r8d, 0xa
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.1400e5840
mov word [rsp + 0x48], ax
jmp 0x140121f64
movzx eax, word [rsp + 0x4c]
mov word [rsp + 0x48], ax
movzx eax, word [rsp + 0x4c]
movzx ecx, word [rsp + 0x48]
cmp eax, ecx
jle 0x140121f83
xor eax, eax
mov word [rsp + 0x48], ax
movzx eax, word [rsp + 0x48]
mov word [rsp + 0x4c], ax
mov rax, qword [rsp + 0x78]
movsx eax, byte [rax]
test eax, eax
je 0x140122002
mov rax, qword [rsp + 0x90]
mov rax, qword [rax + 0x58]
mov r9d, 0x401
lea r8, [rsp + 0x320]
mov rdx, qword [rsp + 0x78]
mov ecx, dword [rax]
call fcn.14014f7b0
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 0
je 0x140121fdc
cmp dword [rsp + 0x98], 1
je 0x140121feb
cmp dword [rsp + 0x98], 2
je 0x140121ff0
jmp 0x140122000
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x88], rax
jmp 0x140122000
jmp 0x14012282c
lea rax, [rsp + 0x320]
mov qword [rsp + 0x88], rax
jmp 0x14012200e
mov qword [rsp + 0x88], 0
cmp qword [rsp + 0x88], 0
jne 0x1401220ef
mov dword [rsp + 0x58], pe_nt_image_headers64
mov eax, 8
imul rax, rax, 0
lea r8, [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + rax + 0x1a8]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140122089
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, eax
call fcn.1400c0c10
mov r8, rax
lea rdx, [0x1401e2100]
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
mov dword [rsp + 0x100], eax
mov rax, qword [rsp + 0xe8]
add rax, 4
mov rcx, qword [rsp + 0x60]
movzx ecx, word [rcx]
mov r9d, 0x401
lea r8, [rsp + 0x320]
mov rdx, rax
call fcn.140155f72
mov qword [rsp + 0x118], rax
cmp qword [rsp + 0x118], 0
jne 0x1401220da
jmp 0x14012282c
lea rax, [rsp + 0x320]
mov qword [rsp + 0x88], rax
mov byte [rsp + 0x44], 0
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x750]
call fcn.1400f19f0
mov dword [rsp + 0xd0], eax
cmp dword [rsp + 0xd0], 1
jne 0x14012213d
lea rdx, [rsp + 0xc0]
mov rcx, qword [rsp + 0x750]
call fcn.1400cd050
cmp qword [rsp + 0xc0], 0
je 0x140122172
mov rax, qword [rsp + 0xc0]
mov rax, qword [rax]
mov qword [rsp + 0xe0], rax
mov rdx, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x750]
call fcn.1400f1ee0
jmp 0x14012217e
mov qword [rsp + 0xe0], 0
cmp qword [rsp + 0xe0], 0
jne 0x1401221aa
mov r8, qword [rsp + 0x88]
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x70], 0xffffffffffffffff
mov dword [rsp + 0x54], 0
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x68], rax
jmp 0x1401221e4
mov rax, qword [rsp + 0x68]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140122231
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 0x70a]
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x20], rcx
mov r9d, eax
xor r8d, r8d
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x750]
call fcn.140134fe0
test eax, eax
je 0x14012222d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x54], eax
jmp 0x1401221d6
jmp 0x140122231
cmp qword [rsp + 0x68], 0
jne 0x14012226c
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, dword [rsp + 0x54]
call fcn.1400c0c10
mov r8, rax
lea rdx, [0x1401e2160]
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
xor eax, eax
test eax, eax
jne 0x14012226c
mov rax, qword [rsp + 0x68]
movsxd rax, dword [rax + 0x10]
mov r8, rax
mov rax, qword [rsp + 0x68]
mov rdx, qword [rax + 0x20]
mov rcx, qword [rsp + 0x60]
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsp + 0x68]
mov eax, dword [rax + 0x10]
mov dword [rsp + 0x58], eax
movzx eax, word [rsp + 0x4c]
mov word [rsp + 0x40], ax
movzx eax, word [rsp + 0x40]
movzx ecx, word [rsp + 0x48]
cmp eax, ecx
jg 0x140122437
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
cmp eax, 2
jne 0x1401222dd
movzx ecx, word [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0xe8]
mov word [rcx + 2], ax
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140122423
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x54], eax
movzx eax, byte [rsp + 0x44]
test eax, eax
je 0x1401223d5
cmp dword [rsp + 0x54], 0x2741
jne 0x1401223d5
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, dword [rsp + 0x54]
call fcn.1400c0c10
movzx ecx, word [rsp + 0x40]
mov r9, rax
mov r8d, ecx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e21d0
mov dword [rsp + 0x58], pe_nt_image_headers64
mov eax, 8
imul rax, rax, 0
lea r8, [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x90]
mov rcx, qword [rcx + rax + 0x1a8]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1401223c1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, eax
call fcn.1400c0c10
mov r8, rax
lea rdx, [0x1401e21a8]
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
movzx eax, word [rsp + 0x4c]
mov word [rsp + 0x40], ax
mov byte [rsp + 0x44], 0
jmp 0x1401222a7
cmp dword [rsp + 0x54], 0x2740
je 0x140122421
cmp dword [rsp + 0x54], 0xd
je 0x140122421
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, dword [rsp + 0x54]
call fcn.1400c0c10
movzx ecx, word [rsp + 0x40]
mov r9, rax
mov r8d, ecx
lea rdx, str.bind_port_hu__failed:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
jmp 0x140122425
jmp 0x140122437
movzx eax, word [rsp + 0x40]
inc ax
mov word [rsp + 0x40], ax
jmp 0x1401222a7
movzx eax, word [rsp + 0x40]
movzx ecx, word [rsp + 0x48]
cmp eax, ecx
jle 0x14012245e
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
mov dword [rsp + 0x58], pe_nt_image_headers64
lea r8, [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1401224b6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, eax
call fcn.1400c0c10
mov r8, rax
lea rdx, str.getsockname___failed:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
xor eax, eax
test eax, eax
jne 0x1401224b6
mov edx, 1
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140122507
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x220]
mov ecx, eax
call fcn.1400c0c10
mov r8, rax
lea rdx, str.socket_failure:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
xor eax, eax
test eax, eax
jne 0x140122507
mov r8d, 0x2f
lea rdx, [rsp + 0x1a0]
mov rcx, qword [rsp + 0x68]
call fcn.1400f2130
jmp 0x140122537
mov eax, dword [rsp + 0x758]
inc eax
mov dword [rsp + 0x758], eax
cmp dword [rsp + 0x758], 2
je 0x1401227d2
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 0x2da]
test eax, eax
jne 0x140122564
cmp dword [rsp + 0x758], 0
jne 0x140122564
jmp 0x140122527
cmp dword [rsp + 0x758], 1
jne 0x14012257d
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
cmp eax, 2
je 0x14012257d
jmp 0x140122527
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
mov dword [rsp + 0xd4], eax
cmp dword [rsp + 0xd4], 2
je 0x140122598
jmp 0x1401225b1
mov rax, qword [rsp + 0xe8]
movzx ecx, word [rax + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
mov word [rsp + 0x40], ax
jmp 0x1401225b6
jmp 0x140122527
cmp dword [rsp + 0x758], 0
jne 0x140122677
mov rax, qword [rsp + 0x60]
movzx eax, word [rax]
cmp eax, 2
jne 0x1401225de
mov dword [rsp + 0xb8], 1
jmp 0x1401225e9
mov dword [rsp + 0xb8], 2
movzx eax, word [rsp + 0x40]
movsxd rcx, dword [rsp + 0x758]
imul rcx, rcx, 5
lea rdx, str.EPRT
add rdx, rcx
mov rcx, rdx
mov rdx, qword [rsp + 0xf0]
mov dword [rsp + 0x30], eax
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0x28], rax
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x20], eax
mov r9, rcx
lea r8, str._s__d_s_hu
mov rcx, qword [rsp + 0x750]
call fcn.14014cf00
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x140122672
mov ecx, dword [rsp + 0x50]
call fcn.1400c02a0
mov r8, rax
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
jmp 0x1401227d2
cmp dword [rsp + 0x758], 1
jne 0x1401227cd
lea rax, [rsp + 0x1a0]
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x1d0]
mov qword [rsp + 0xb0], rax
cmp qword [rsp + 0xa8], 0
je 0x140122719
mov rax, qword [rsp + 0xa8]
movsx eax, byte [rax]
test eax, eax
je 0x140122719
mov rax, qword [rsp + 0xa8]
movsx eax, byte [rax]
cmp eax, 0x2e
jne 0x1401226dc
mov rax, qword [rsp + 0xb0]
mov byte [rax], Ordinal_46
jmp 0x1401226f1
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0xa8]
movzx ecx, byte [rcx]
mov byte [rax], cl
mov rax, qword [rsp + 0xb0]
inc rax
mov qword [rsp + 0xb0], rax
mov rax, qword [rsp + 0xa8]
inc rax
mov qword [rsp + 0xa8], rax
jmp 0x1401226a5
mov rax, qword [rsp + 0xb0]
mov byte [rax], 0
movzx eax, word [rsp + 0x40]
and eax, 0xff
movzx ecx, word [rsp + 0x40]
sar ecx, 8
mov dword [rsp + 0x20], eax
mov r9d, ecx
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
mov rcx, qword [rsp + 0xb0]
call fcn.1400ea590
movsxd rax, dword [rsp + 0x758]
imul rax, rax, 5
lea rcx, str.EPRT
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0xf0]
lea rdx, [rsp + 0x1d0]
mov qword [rsp + 0x20], rdx
mov r9, rax
lea r8, [0x1401e21c4]
mov rdx, rcx
mov rcx, qword [rsp + 0x750]
call fcn.14014cf00
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x1401227cb
mov ecx, dword [rsp + 0x50]
call fcn.1400c02a0
mov r8, rax
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, qword [rsp + 0x750]
call fcn.1400e22e0
jmp 0x14012282c
jmp 0x1401227d2
jmp 0x140122527
mov rax, qword [rsp + 0xf0]
mov ecx, dword [rsp + 0x758]
mov dword [rax + 0xe8], ecx
lea r9, [rsp + 0x70]
mov r8d, 1
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x750]
call fcn.1401356b0
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x140122814
jmp 0x14012282c
mov qword [rsp + 0x70], 0xffffffffffffffff
mov dl, 0x1c
mov rcx, qword [rsp + 0x750]
call fcn.14011dc80
cmp dword [rsp + 0x50], 0
je 0x140122842
xor edx, edx
mov rcx, qword [rsp + 0x750]
call fcn.14011dc80
cmp qword [rsp + 0x70], 0xffffffffffffffff
je 0x140122864
mov r8, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x750]
call fcn.140135080
mov rcx, qword [rsp + 0x78]
call qword [fcn.1401581f2]
mov eax, dword [rsp + 0x50]
mov rcx, qword [rsp + 0x730]
xor rcx, rsp
call fcn.140156eb0
add rsp, 0x740
pop rdi
ret