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

Disassembly:
push rbx
sub rsp, 0x20
mov rbx, rcx
mov rcx, qword [rcx]
mov rax, qword [rcx + 0x198]
cmp dword [rax + 0x18], 0
je 0x140043485
mov edx, reloc.WS2_32.dll_listen
mov rcx, rbx
call fcn.140041aa0
mov r8d, edx
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.1400435a0
cmp byte [rcx + 0x446], 0
je 0x14004349d
xor edx, edx
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x140044020
cmp byte [rcx + 0x45e], 0
je 0x140043540
mov r8, qword [rbx + 0x798]
test r8, r8
jne 0x1400434f8
mov r8, qword [rcx + 0x4a8]
test r8, r8
jne 0x1400434db
cmp byte [rcx + 0x445], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rcx, [rbx + 0x718]
lea rdx, str.PRET__s
call fcn.140052240
test eax, eax
je 0x14004352e
add rsp, 0x20
pop rbx
ret
cmp byte [rcx + 0x450], 0
lea rcx, [rbx + 0x718]
je 0x14004351e
lea rdx, str.PRET_STOR__s
call fcn.140052240
test eax, eax
je 0x14004352e
add rsp, 0x20
pop rbx
ret
lea rdx, str.PRET_RETR__s
call fcn.140052240
test eax, eax
jne 0x14004354d
mov edx, Ordinal_30
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140041aa0
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140043f80
add rsp, 0x20
pop rbx
ret
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x8f0]
sub rsp, 0x9f0
mov rax, qword [0x140072100]
xor rax, rsp
mov qword [rbp + 0x8e0], rax
mov r13, qword [rcx]
mov rsi, rcx
mov edi, edx
lea rcx, [rbp - 0x2f]
xor edx, edx
mov r8d, 0xff
mov qword [rsp + 0x38], 0xffffffffffffffff
mov byte [rbp - 0x30], 0
call sub.MSVCR120.dll_memset
mov rbx, qword [r13 + 0x4d8]
xor eax, eax
mov byte [rsp + 0x30], 1
mov qword [rsp + 0x48], rax
mov rcx, qword [r13 + 0x4d8]
movzx r14d, ax
mov dword [rsp + 0x40], r14d
movzx r12d, ax
mov r15d, eax
test rcx, rcx
je 0x14004422e
or rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], r15b
jne 0x1400440b0
cmp rax, 1
jbe 0x14004422e
or rax, 0xffffffffffffffff
inc rax
cmp byte [rbx + rax], r15b
jne 0x1400440c7
cmp rax, 0x16
jae 0x1400440dd
mov ecx, reloc.WLDAP32.dll_Ordinal_22
jmp 0x1400440ea
or rcx, 0xffffffffffffffff
inc rcx
cmp byte [rbx + rcx], r15b
jne 0x1400440e1
inc rcx
mov edx, 1
call qword [case.0x140021eb7.1]
mov r15, rax
test rax, rax
jne 0x140044109
lea eax, [r15 + 0x1b]
jmp 0x140044726
cmp byte [rbx], 0x3a
jne 0x140044113
mov r14, rbx
jmp 0x14004413f
mov edx, Ordinal_60
mov rcx, rbx
call qword [sym.imp.MSVCR120.dll_strchr]
mov rcx, r15
mov r14, rax
test rax, rax
je 0x1400441c7
mov r8, rax
mov rdx, rbx
sub r8, rbx
call qword [sym.imp.MSVCR120.dll_strncpy]
test r14, r14
je 0x1400441df
mov edx, Ordinal_60
mov rcx, r14
call qword [sym.imp.MSVCR120.dll_strchr]
mov rbx, rax
test rax, rax
je 0x1400441df
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call qword [sym.imp.MSVCR120.dll_strtoul]
mov ecx, eax
call fcn.140036740
mov edx, Ordinal_46
mov rcx, rbx
movzx r14d, ax
mov dword [rsp + 0x40], r14d
call qword [sym.imp.MSVCR120.dll_strchr]
test rax, rax
je 0x1400441c1
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call qword [sym.imp.MSVCR120.dll_strtoul]
mov ecx, eax
call fcn.140036740
movzx r12d, ax
cmp r14w, ax
jbe 0x1400441df
xor eax, eax
mov r12d, eax
mov dword [rsp + 0x40], eax
jmp 0x1400441df
movzx r12d, r14w
jmp 0x1400441df
sub rcx, rbx
nop word [rax + rax]
movzx eax, byte [rbx]
lea rbx, [rbx + 1]
mov byte [rcx + rbx - 1], al
test al, al
jne 0x1400441d0
cmp byte [r15], 0
je 0x14004422e
mov rcx, qword [rsi + 0x58]
mov rcx, qword [rcx + 0x20]
call fcn.14002ee70
mov r8d, dword [rsi + 0xa0]
lea rcx, [rbp + 0xd0]
mov edx, eax
mov rax, qword [rsi + 0x58]
mov dword [rsp + 0x28], 0x401
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
mov r9, r15
call fcn.14002ee70
test eax, eax
je 0x140044270
dec eax
je 0x140044721
dec eax
je 0x140044296
mov rcx, qword [rsi + 0x1d0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140044275
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.140038a90
lea rdx, str.getsockname___failed:__s
mov r8, rax
jmp 0x140044710
mov rbx, r15
jmp 0x14004429d
movzx ecx, word [rsp + 0x50]
lea r8, [rbp + 0xd0]
lea rdx, [rsp + 0x54]
mov r9d, 0x401
call fcn.140039470
mov byte [rsp + 0x30], 0
lea rbx, [rbp + 0xd0]
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, rbx
mov rcx, rsi
call fcn.140022fd0
cmp eax, 1
jne 0x1400442c2
lea rdx, [rsp + 0x48]
mov rcx, rsi
call fcn.140022540
mov rdx, qword [rsp + 0x48]
test rdx, rdx
je 0x140044706
mov r14, qword [rdx]
mov rcx, r13
call fcn.140023170
test r14, r14
je 0x140044706
mov rcx, r15
call qword [0x140072048]
mov qword [rsp + 0x38], 0xffffffffffffffff
xor ebx, ebx
nop dword [rax + rax]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call fcn.14002c700
mov r15d, eax
test eax, eax
je 0x14004432d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
mov ebx, eax
test r14, r14
jne 0x140044300
jmp 0x140044332
test r14, r14
jne 0x140044353
mov edx, ebx
mov rcx, rsi
call fcn.140038a90
lea rdx, str.socket_failure:__s
mov rcx, r13
mov r8, rax
call fcn.14002b5e0
jmp 0x140044721
movsxd r8, dword [r14 + 0x10]
mov rdx, qword [r14 + 0x20]
lea rcx, [rsp + 0x50]
call sub.MSVCR120.dll_memcpy
mov eax, dword [r14 + 0x10]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x40]
movzx ebx, ax
cmp ax, r12w
ja 0x14004442e
nop
cmp word [rsp + 0x50], 2
jne 0x140044396
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x52], ax
mov r8d, dword [rsp + 0x34]
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x1400444b5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x140044415
cmp eax, 0x2741
jne 0x140044415
mov edx, eax
mov rcx, rsi
call fcn.140038a90
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
movzx r8d, bx
mov r9, rax
mov rcx, r13
call fcn.14002b6a0
mov rcx, qword [rsi + 0x1d0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x14004444f
movzx ebx, word [rsp + 0x40]
mov byte [rsp + 0x30], al
jmp 0x140044424
cmp eax, 0x2740
je 0x140044421
cmp eax, 0xd
jne 0x140044483
inc bx
cmp bx, r12w
jbe 0x140044380
lea rdx, str.bind___failed__we_ran_out_of_ports_
mov rcx, r13
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
jmp 0x140044721
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.140038a90
lea rdx, str.getsockname___failed:__s
mov rcx, r13
mov r8, rax
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
jmp 0x140044721
mov edx, eax
mov rcx, rsi
call fcn.140038a90
lea rdx, str.bind_port_hu__failed:__s
movzx r8d, bx
mov r9, rax
mov rcx, r13
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
jmp 0x140044721
cmp bx, r12w
ja 0x14004442e
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x34], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x14004444f
mov rcx, qword [rsp + 0x38]
lea edx, [rax + 1]
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x14004452a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.140038a90
lea rdx, str.socket_failure:__s
mov rcx, r13
mov r8, rax
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
jmp 0x140044721
lea rdx, [rbp - 0x30]
mov r8d, 0x100
mov rcx, r14
call fcn.140022fa0
cmp edi, 2
je 0x140044581
movzx eax, word [rsp + 0x50]
cmp byte [rsi + 0x3cc], 0
jne 0x140044553
test edi, edi
je 0x14004457a
cmp ax, 2
jne 0x14004457a
movzx ecx, word [rsp + 0x52]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test edi, edi
je 0x14004467c
cmp edi, 1
je 0x1400445be
movzx eax, word [rsp + 0x50]
inc edi
cmp edi, 2
jne 0x140044546
lea rbx, [rsi + 0x718]
mov rcx, rsi
mov dword [rbx + 0x9c], edi
call fcn.140041ab0
mov rax, qword [rsp + 0x38]
mov edx, Ordinal_30
mov rcx, rsi
mov byte [rsi + 0x3c5], 1
mov qword [rsi + 0x1d8], rax
call fcn.140041aa0
mov eax, r15d
jmp 0x140044726
lea r10, [rbp + 0x4e0]
lea rdx, [rbp - 0x30]
mov r9d, Ordinal_46
nop
movzx ecx, byte [rdx]
test cl, cl
je 0x1400445ed
cmp cl, 0x2e
movzx eax, cl
cmove eax, r9d
inc r10
mov byte [r10 - 1], al
inc rdx
jne 0x1400445d0
movzx r9d, r8w
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
movzx eax, r9b
mov rcx, r10
shr r9d, 8
mov dword [rsp + 0x20], eax
mov byte [r10], 0
call fcn.14002d720
lea rbx, [rsi + 0x718]
lea r9, [rbp + 0x4e0]
lea r8, str.PORT
lea rdx, [0x140060140]
mov rcx, rbx
call fcn.140052240
mov r15d, eax
test eax, eax
je 0x140044588
mov ecx, eax
call fcn.140038bb0
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, r13
mov r8, rax
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
xor edx, edx
mov rcx, rsi
call fcn.140041aa0
mov eax, r15d
jmp 0x140044726
cmp word [rsp + 0x50], 2
movzx eax, r8w
mov ecx, 0
setne cl
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x30]
lea r9d, [rcx + 1]
lea rbx, [rsi + 0x718]
lea r8, str.EPRT
lea rdx, str._s__d_s_hu
mov rcx, rbx
mov qword [rsp + 0x20], rax
call fcn.140052240
mov r15d, eax
test eax, eax
je 0x140044588
mov ecx, eax
call fcn.140038bb0
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, r13
mov r8, rax
call fcn.14002b5e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.14002bf20
xor edx, edx
mov rcx, rsi
mov dword [rbx + 0x9c], 1
call fcn.140041aa0
mov eax, r15d
jmp 0x140044726
mov r8, rbx
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, r13
call fcn.14002b5e0
mov rcx, r15
call qword [0x140072048]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rcx, qword [rbp + 0x8e0]
xor rcx, rsp
call fcn.140058040
mov rbx, qword [rsp + 0xa40]
add rsp, 0x9f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret