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

Disassembly:
mov dword [rsp + 0x20], r9d
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x2f0
mov rax, qword [0x1400f2078]
xor rax, rsp
mov qword [rsp + 0x2e0], rax
mov rax, qword [rsp + 0x300]
mov rax, qword [rax]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0xe0]
mov qword [rsp + 0xa8], rax
mov dword [rsp + 0x58], 0
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], 0
mov rax, qword [rsp + 0x48]
movzx eax, word [rax + 0x278]
mov word [rsp + 0x34], ax
mov rax, qword [rsp + 0x48]
mov eax, dword [rax + 0x27c]
mov dword [rsp + 0x5c], eax
mov eax, 8
imul rax, rax, 8
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx + rax + 0x778]
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
jne 0x140036c63
movzx eax, word [rsp + 0x34]
test eax, eax
jne 0x140036c63
xor eax, eax
jmp 0x140037279
lea rax, [rsp + 0xe0]
mov rdi, rax
xor eax, eax
mov ecx, 0x80
rep stosb byte [rdi], al
cmp qword [rsp + 0x40], 0
je 0x1400370ba
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0x70], 0xffffffffffffffff
inc qword [rsp + 0x70]
mov rax, qword [rsp + 0xb0]
mov rcx, qword [rsp + 0x70]
cmp byte [rax + rcx], 0
jne 0x140036c99
mov rax, qword [rsp + 0x70]
cmp rax, 0xff
jae 0x1400370ba
mov al, byte [0x1400f3484]
mov byte [rsp + 0x1e0], al
lea rax, [rsp + 0x1e1]
mov rdi, rax
xor eax, eax
mov ecx, 0xff
rep stosb byte [rdi], al
mov dword [rsp + 0x50], 0
mov byte [rsp + 0x30], 0
mov byte [rsp + 0x38], 0
mov rax, qword [0x1400e7690]
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0x78], 0xffffffffffffffff
inc qword [rsp + 0x78]
mov rax, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0x78]
cmp byte [rax + rcx], 0
jne 0x140036d0d
mov rax, qword [rsp + 0x78]
mov r8, rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [0x1400e7690]
call fcn.14009ff00
test eax, eax
jne 0x140036d9d
mov rax, qword [0x1400e7690]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x80], 0xffffffffffffffff
inc qword [rsp + 0x80]
mov rax, qword [rsp + 0xc0]
mov rcx, qword [rsp + 0x80]
cmp byte [rax + rcx], 0
jne 0x140036d5d
mov rax, qword [rsp + 0x80]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x30], 1
jmp 0x140036e4c
mov rax, qword [str.host_]
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0x88], 0xffffffffffffffff
inc qword [rsp + 0x88]
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0x88]
cmp byte [rax + rcx], 0
jne 0x140036db8
mov rax, qword [rsp + 0x88]
mov r8, rax
mov rdx, qword [rsp + 0x40]
mov rcx, qword [str.host_]
call fcn.14009ff00
test eax, eax
jne 0x140036e4c
mov rax, qword [str.host_]
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0x90], 0xffffffffffffffff
inc qword [rsp + 0x90]
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x90]
cmp byte [rax + rcx], 0
jne 0x140036e11
mov rax, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x40]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x40], rax
mov byte [rsp + 0x38], 1
movzx eax, byte [rsp + 0x38]
test eax, eax
jne 0x140036f1b
mov dword [rsp + 0x28], 0x100
lea rax, [rsp + 0x1e0]
mov qword [rsp + 0x20], rax
mov r9, qword [rsp + 0x40]
mov rax, qword [rsp + 0x300]
mov r8d, dword [rax + 0xb8]
mov edx, dword [rsp + 0x318]
mov ecx, dword [rsp + 0x310]
call fcn.14007ae94
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x54], 0
je 0x140036eb0
cmp dword [rsp + 0x54], 1
je 0x140036edb
cmp dword [rsp + 0x54], 2
je 0x140036ee5
jmp 0x140036f1b
movzx eax, byte [rsp + 0x30]
test eax, eax
je 0x140036ed9
mov r8, qword [rsp + 0x40]
lea rdx, str.Couldnt_bind_to_interface__s
mov rcx, qword [rsp + 0x48]
call fcn.1400339c8
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140037279
jmp 0x140036f1b
mov eax, 1
jmp 0x140037279
mov byte [rsp + 0x30], 1
mov eax, dword [rsp + 0x310]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x1e0]
mov r8, qword [rsp + 0x40]
lea rdx, str.Local_Interface__s_is_ip__s_using_address_family__i_n
mov rcx, qword [rsp + 0x48]
call fcn.1400338d0
mov dword [rsp + 0x50], 1
movzx eax, byte [rsp + 0x30]
test eax, eax
jne 0x140037029
mov rax, qword [rsp + 0x300]
mov eax, dword [rax + 0x3f8]
mov dword [rsp + 0x9c], eax
cmp dword [rsp + 0x310], 2
jne 0x140036f59
mov rax, qword [rsp + 0x300]
mov dword [rax + 0x3f8], 1
lea r9, [rsp + 0x60]
xor r8d, r8d
mov rdx, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x300]
call fcn.140023fc0
mov dword [rsp + 0x98], eax
cmp dword [rsp + 0x98], 1
jne 0x140036f96
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x300]
call fcn.140023604
mov rax, qword [rsp + 0x300]
mov ecx, dword [rsp + 0x9c]
mov dword [rax + 0x3f8], ecx
cmp qword [rsp + 0x60], 0
je 0x140037021
mov r8d, 0x100
lea rdx, [rsp + 0x1e0]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax]
call fcn.1400243bc
mov rax, qword [rsp + 0x60]
mov rax, qword [rax]
mov eax, dword [rax + 4]
mov dword [rsp + 0x28], eax
lea rax, [rsp + 0x1e0]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x310]
mov r8, qword [rsp + 0x40]
lea rdx, str.Name__s_family__i_resolved_to__s_family__i_n
mov rcx, qword [rsp + 0x48]
call fcn.1400338d0
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x48]
call fcn.140024224
mov dword [rsp + 0x50], 1
jmp 0x140037029
mov dword [rsp + 0x50], 0xffffffff
cmp dword [rsp + 0x50], 0
jle 0x140037085
cmp dword [rsp + 0x310], 2
jne 0x140037085
mov rax, qword [rsp + 0x68]
add rax, 4
mov r8, rax
lea rdx, [rsp + 0x1e0]
mov ecx, 2
call fcn.14004ec3c
test eax, eax
jle 0x140037085
mov eax, 2
mov rcx, qword [rsp + 0x68]
mov word [rcx], ax
movzx ecx, word [rsp + 0x34]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x68]
mov word [rcx + 2], ax
mov dword [rsp + 0x58], reloc.WS2_32.dll_recv
cmp dword [rsp + 0x50], 1
jge 0x1400370b8
mov rax, qword [rsp + 0x48]
mov byte [rax + 0x4c78], 0
mov r8, qword [rsp + 0x40]
lea rdx, str.Couldnt_bind_to__s
mov rcx, qword [rsp + 0x48]
call fcn.1400339c8
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140037279
jmp 0x1400370ed
cmp dword [rsp + 0x310], 2
jne 0x1400370ed
mov eax, 2
mov rcx, qword [rsp + 0x68]
mov word [rcx], ax
movzx ecx, word [rsp + 0x34]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x68]
mov word [rcx + 2], ax
mov dword [rsp + 0x58], reloc.WS2_32.dll_recv
mov r8d, dword [rsp + 0x58]
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0x308]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jl 0x1400371cd
mov dword [rsp + 0xa0], 0x80
lea rax, [rsp + 0x160]
mov rdi, rax
xor eax, eax
mov ecx, 0x80
rep stosb byte [rdi], al
lea r8, [rsp + 0xa0]
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x308]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jge 0x14003719e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x3c]
mov dword [rax + 0x4c7c], ecx
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x300]
call fcn.140052500
mov r9, rax
mov r8d, dword [rsp + 0x3c]
lea rdx, [0x1400e7750]
mov rcx, qword [rsp + 0x48]
call fcn.1400339c8
mov eax, reloc.WLDAP32.dll_Ordinal_45
jmp 0x140037279
movzx eax, word [rsp + 0x34]
mov r8d, eax
lea rdx, str.Local_port:__hu_n
mov rcx, qword [rsp + 0x48]
call fcn.1400338d0
mov rax, qword [rsp + 0x300]
mov byte [rax + 0x3bb], 1
xor eax, eax
jmp 0x140037279
mov eax, dword [rsp + 0x5c]
dec eax
mov dword [rsp + 0x5c], eax
cmp dword [rsp + 0x5c], 0
jle 0x14003722a
movzx eax, word [rsp + 0x34]
mov r8d, eax
lea rdx, str.Bind_to_local_port__hu_failed__trying_next_n
mov rcx, qword [rsp + 0x48]
call fcn.1400338d0
movzx eax, word [rsp + 0x34]
inc ax
mov word [rsp + 0x34], ax
mov rax, qword [rsp + 0xa8]
movzx eax, word [rax]
cmp eax, 2
jne 0x140037228
movzx ecx, word [rsp + 0x34]
call qword [sym.imp.WS2_32.dll_ntohs]
mov rcx, qword [rsp + 0x68]
mov word [rcx + 2], ax
jmp 0x14003722c
jmp 0x140037231
jmp 0x1400370ed
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x48]
mov ecx, dword [rsp + 0x3c]
mov dword [rax + 0x4c7c], ecx
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x300]
call fcn.140052500
mov r9, rax
mov r8d, dword [rsp + 0x3c]
lea rdx, str.bind_failed_with_errno__d:__s
mov rcx, qword [rsp + 0x48]
call fcn.1400339c8
mov eax, reloc.WLDAP32.dll_Ordinal_45
mov rcx, qword [rsp + 0x2e0]
xor rcx, rsp
call fcn.14008e520
add rsp, 0x2f0
pop rdi
ret