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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x900]
sub rsp, 0xa00
mov rax, qword [0x180093030]
xor rax, rsp
mov qword [rbp + 0x8f0], rax
mov rdi, qword [rcx]
mov r12, rcx
mov ebx, edx
lea rcx, [rbp - 0x1f]
xor edx, edx
mov r8d, 0xff
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], 0xffffffffffffffff
mov byte [rbp - 0x20], 0
call fcn.180030f50
mov rsi, qword [rdi + 0x558]
xor eax, eax
mov qword [rsp + 0x50], rax
mov rdi, qword [rdi + 0x558]
mov word [rsp + 0x48], ax
movzx r14d, ax
lea r15d, [rax + 1]
mov r13d, eax
test rdi, rdi
je 0x180059f51
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, r15
jbe 0x180059f51
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0x16
jae 0x180059e08
lea ecx, [rax + 0x16]
jmp 0x180059e17
or rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
dec rcx
inc rcx
mov rdx, r15
call qword [case.0x180047f3c.1]
mov r13, rax
test rax, rax
jne 0x180059e34
lea eax, [r13 + 0x1b]
jmp 0x18005a47c
cmp byte [rsi], 0x3a
jne 0x180059e3e
mov rdi, rsi
jmp 0x180059e68
mov edx, Ordinal_60
mov rcx, rsi
call fcn.18003c09c
mov rcx, r13
mov rdi, rax
test rax, rax
je 0x180059ee5
mov r8, rax
mov rdx, rsi
sub r8, rsi
call fcn.18002dd80
test rdi, rdi
je 0x180059efe
mov edx, Ordinal_60
mov rcx, rdi
call fcn.18003c09c
mov rdi, rax
test rax, rax
je 0x180059efe
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.18003ac00
mov ecx, eax
call fcn.180062ac0
mov edx, Ordinal_46
mov rcx, rdi
movzx esi, ax
mov dword [rsp + 0x48], esi
call fcn.18003c09c
test rax, rax
je 0x180059edf
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call fcn.18003ac00
mov ecx, eax
call fcn.180062ac0
movzx r14d, ax
cmp si, ax
jbe 0x180059efe
xor eax, eax
mov r14d, eax
mov dword [rsp + 0x48], eax
jmp 0x180059efe
movzx r14d, si
jmp 0x180059efe
sub rcx, rsi
nop dword [rax + rax]
movzx eax, byte [rsi]
inc rsi
mov byte [rcx + rsi - 1], al
test al, al
jne 0x180059ef0
cmp byte [r13], 0
je 0x180059f51
mov rcx, qword [r12 + 0x58]
mov rcx, qword [rcx + 0x20]
call sym.wuapi.dll_SpInitInstance
mov r8d, dword [r12 + 0xa0]
lea rcx, [rbp + 0xe0]
mov edx, eax
mov rax, qword [r12 + 0x58]
mov dword [rsp + 0x28], 0x401
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
mov r9, r13
call sym.wuapi.dll_SpInitInstance
test eax, eax
je 0x180059f94
dec eax
je 0x18005a477
dec eax
je 0x180059fb8
mov rcx, qword [r12 + 0x1a8]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x30], pe_nt_image_headers64
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x180059f99
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.18004cdc0
lea rdx, str.getsockname___failed:__s
mov r8, rax
jmp 0x18005a464
mov rdi, r13
jmp 0x180059fbf
movzx ecx, word [rsp + 0x60]
lea r8, [rbp + 0xe0]
lea rdx, [rsp + 0x64]
mov r9d, 0x401
call fcn.18004d720
xor r15d, r15d
lea rdi, [rbp + 0xe0]
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
call fcn.18003d830
cmp eax, 1
jne 0x180059fe4
lea rdx, [rsp + 0x50]
mov rcx, r12
call fcn.18003d100
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x18005a45a
mov rcx, qword [rsp + 0x40]
mov rsi, qword [rdx]
call fcn.18003dda0
test rsi, rsi
je 0x18005a45a
mov rcx, r13
call qword [fcn.18002d284]
mov qword [rsp + 0x38], 0xffffffffffffffff
xor edi, edi
nop dword [rax]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, rsi
mov rcx, r12
call fcn.18004a250
mov r13d, eax
test eax, eax
je 0x18005a04d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rsi, qword [rsi + 0x28]
mov edi, eax
test rsi, rsi
jne 0x18005a020
jmp 0x18005a052
test rsi, rsi
jne 0x18005a075
mov edx, edi
mov rcx, r12
call fcn.18004cdc0
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
mov r8, rax
call fcn.180046e10
jmp 0x18005a477
movsxd r8, dword [rsi + 0x10]
mov rdx, qword [rsi + 0x20]
lea rcx, [rsp + 0x60]
call fcn.18002d8c0
mov eax, dword [rsp + 0x48]
mov edx, dword [rsi + 0x10]
mov dword [rsp + 0x30], edx
movzx edi, ax
cmp ax, r14w
ja 0x18005a151
nop
cmp word [rsp + 0x60], 2
jne 0x18005a0b6
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x62], ax
mov r8d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x60]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x18005a1dc
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test r15d, r15d
je 0x18005a138
cmp eax, 0x2741
jne 0x18005a138
mov edx, eax
mov rcx, r12
call fcn.18004cdc0
movzx r8d, di
mov rdi, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rcx, rdi
mov r9, rax
call fcn.180046d60
mov rcx, qword [r12 + 0x1a8]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x30], pe_nt_image_headers64
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x18005a174
movzx edi, word [rsp + 0x48]
xor r15d, r15d
jmp 0x18005a147
cmp eax, 0x2740
je 0x18005a144
cmp eax, 0xd
jne 0x18005a1a8
inc di
cmp di, r14w
jbe 0x18005a0a0
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.180046e10
mov rdx, qword [rsp + 0x38]
mov rcx, r12
call fcn.18004a1e0
jmp 0x18005a477
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.18004cdc0
mov rcx, rdi
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.180046e10
mov rdx, qword [rsp + 0x38]
mov rcx, r12
call fcn.18004a1e0
jmp 0x18005a477
mov edx, eax
mov rcx, r12
call fcn.18004cdc0
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, di
call fcn.180046e10
mov rdx, qword [rsp + 0x38]
mov rcx, r12
call fcn.18004a1e0
jmp 0x18005a477
cmp di, r14w
ja 0x18005a151
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x30], pe_nt_image_headers64
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x18005a221
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.18004cdc0
mov rcx, qword [rsp + 0x40]
jmp 0x18005a187
mov rcx, qword [rsp + 0x38]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x18005a256
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.18004cdc0
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
jmp 0x18005a18e
lea rdx, [rbp - 0x20]
mov r8d, 0x100
mov rcx, rsi
call fcn.18003d470
cmp ebx, 2
je 0x18005a2ba
movzx eax, word [rsp + 0x60]
cmp dword [r12 + 0x2c4], 0
jne 0x18005a281
test ebx, ebx
je 0x18005a2b3
cmp ebx, 1
jne 0x18005a28c
cmp ax, 2
jne 0x18005a2b3
cmp ax, 2
jne 0x18005a2b3
movzx ecx, word [rsp + 0x62]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r11d, ax
test ebx, ebx
je 0x18005a3cd
cmp ebx, 1
je 0x18005a30c
movzx eax, word [rsp + 0x60]
inc ebx
cmp ebx, 2
jne 0x18005a272
lea rdi, [r12 + 0x528]
mov dword [rdi + 0xac], ebx
mov rdx, qword [r12 + 0x1b0]
cmp rdx, 0xffffffffffffffff
je 0x18005a2de
mov rcx, r12
call fcn.18004a1e0
mov rax, qword [rsp + 0x38]
mov edx, Ordinal_32
mov rcx, r12
mov qword [r12 + 0x1b0], rax
mov dword [r12 + 0x2a8], 1
call fcn.180059c00
mov eax, r13d
jmp 0x18005a47c
lea rdi, [rbp + 0x4f0]
lea rdx, [rbp - 0x20]
mov r8d, Ordinal_46
nop dword [rax]
movzx ecx, byte [rdx]
test cl, cl
je 0x18005a33c
cmp cl, 0x2e
movzx eax, cl
cmove eax, r8d
inc rdi
inc rdx
mov byte [rdi - 1], al
jne 0x18005a320
movzx r9d, r11w
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
movzx eax, r9b
mov rcx, rdi
shr r9d, 8
mov dword [rsp + 0x20], eax
mov byte [rdi], 0
call fcn.18004b9f0
lea rdi, [r12 + 0x528]
lea r9, [rbp + 0x4f0]
lea r8, str.PORT
lea rdx, [0x18007f840]
mov rcx, rdi
call fcn.180069d60
mov r13d, eax
test eax, eax
je 0x18005a2c2
mov ecx, eax
call fcn.18004c5b0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.180046e10
mov rdx, qword [rsp + 0x38]
mov rcx, r12
call fcn.18004a1e0
xor edx, edx
mov rcx, r12
call fcn.180059c00
mov eax, r13d
jmp 0x18005a47c
cmp word [rsp + 0x60], 2
movzx eax, r11w
mov ecx, 0
setne cl
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x20]
lea r9d, [rcx + 1]
lea rdi, [r12 + 0x528]
lea r8, str.EPRT
lea rdx, str._s__d_s_hu
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.180069d60
mov r13d, eax
test eax, eax
je 0x18005a2c2
mov ecx, eax
call fcn.18004c5b0
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.180046e10
mov rdx, qword [rsp + 0x38]
mov rcx, r12
call fcn.18004a1e0
xor edx, edx
mov rcx, r12
mov dword [rdi + 0xac], 1
call fcn.180059c00
mov eax, r13d
jmp 0x18005a47c
mov r8, rdi
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, qword [rsp + 0x40]
call fcn.180046e10
mov rcx, r13
call qword [fcn.18002d284]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x8f0]
xor rcx, rsp
call fcn.18002cf50
mov rbx, qword [rsp + 0xa50]
add rsp, 0xa00
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
push rbx
sub rsp, 0x20
mov rdx, qword [rcx]
mov rbx, rcx
mov rax, qword [rdx + 0x1a8]
cmp dword [rax + 0x18], 0
je 0x18005d5b6
mov edx, reloc.WS2_32.dll_listen
call fcn.180059c00
mov edx, 1
lea r8d, [rdx + 0xc]
add rsp, 0x20
pop rbx
jmp fcn.18005cb80
cmp dword [rdx + 0x470], 0
je 0x18005d5cb
xor edx, edx
add rsp, 0x20
pop rbx
jmp 0x180059d50
cmp dword [rdx + 0x4bc], 0
je 0x18005d66e
mov r8, qword [rcx + 0x5a8]
test r8, r8
jne 0x18005d626
mov r8, qword [rdx + 0x528]
test r8, r8
jne 0x18005d609
cmp dword [rdx + 0x46c], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rdx, str.PRET__s
add rcx, 0x528
call fcn.180069d60
test eax, eax
je 0x18005d65c
add rsp, 0x20
pop rbx
ret
add rcx, 0x528
cmp dword [rdx + 0x49c], 0
je 0x18005d64c
lea rdx, str.PRET_STOR__s
call fcn.180069d60
test eax, eax
je 0x18005d65c
add rsp, 0x20
pop rbx
ret
lea rdx, str.PRET_RETR__s
call fcn.180069d60
test eax, eax
jne 0x18005d673
mov edx, Ordinal_33
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.180059c00
call fcn.18005a4b0
add rsp, 0x20
pop rbx
ret