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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x560]
sub rsp, 0x660
mov rax, qword [rcx]
mov qword [rsp + 0x30], 0xffffffffffffffff
mov byte [rsp + 0x48], 0
mov r12, rcx
xor ecx, ecx
mov esi, edx
mov qword [rsp + 0x49], rcx
mov qword [rsp + 0x51], rcx
mov qword [rsp + 0x59], rcx
mov qword [rsp + 0x61], rcx
mov qword [rsp + 0x69], rcx
mov dword [rsp + 0x71], ecx
mov word [rsp + 0x75], cx
mov rbx, qword [rax + 0xcb0]
mov qword [rsp + 0x40], rcx
mov rdi, qword [rax + 0xcb0]
movzx r14d, cx
mov qword [rsp + 0x38], rax
mov dword [rbp + 0x5b0], r14d
movzx r15d, cx
mov dword [rbp + 0x5b8], 1
mov r13d, ecx
test rdi, rdi
je 0x14003a032
or rcx, 0xffffffffffffffff
xor eax, eax
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 1
jbe 0x14003a032
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0x41
jae 0x140039e48
lea ecx, [rax + 0x41]
jmp 0x140039e57
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
inc rcx
mov edx, 1
call qword [case.0x14001ea1c.1]
mov r13, rax
test rax, rax
jne 0x140039e76
lea eax, [r13 + 0x1b]
jmp 0x14003a5ec
movzx eax, byte [rbx]
cmp al, 0x5b
jne 0x140039ea5
mov edx, 0x5d
mov rcx, rbx
lea r14, [rbx + 1]
call sub.MSVCR120.dll_strchr
mov rdi, rax
test rax, rax
je 0x140039fbe
mov r8, rax
mov rdx, r14
sub r8, r14
jmp 0x140039f0c
cmp al, 0x3a
jne 0x140039eae
mov rdi, rbx
jmp 0x140039f14
mov edx, Ordinal_60
mov rcx, rbx
call sub.MSVCR120.dll_strchr
mov rdi, rax
test rax, rax
je 0x140039f9e
lea r8, [rbp - 0x80]
mov rdx, rbx
mov ecx, reloc.WS2_32.dll_socket
call fcn.14004e0a0
cmp eax, 1
jne 0x140039f03
xor edx, edx
mov rcx, r13
mov r15d, edx
mov dword [rbp + 0x5b0], edx
sub rcx, rbx
nop
movzx eax, byte [rbx]
inc rbx
mov byte [rcx + rbx - 1], al
test al, al
jne 0x140039ef0
jmp 0x140039fbe
mov r8, rdi
mov rdx, rbx
sub r8, rbx
mov rcx, r13
call sub.MSVCR120.dll_strncpy
test rdi, rdi
je 0x140039fbe
mov edx, Ordinal_60
mov rcx, rdi
call sub.MSVCR120.dll_strchr
mov rdi, rax
test rax, rax
je 0x140039fbe
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call sub.MSVCR120.dll_strtoul
mov ecx, eax
call fcn.14001d050
mov edx, reloc.WLDAP32.dll_Ordinal_45
mov rcx, rdi
movzx r14d, ax
mov dword [rbp + 0x5b0], r14d
call sub.MSVCR120.dll_strchr
test rax, rax
je 0x140039f98
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call sub.MSVCR120.dll_strtoul
mov ecx, eax
call fcn.14001d050
movzx r15d, ax
cmp r14w, ax
jbe 0x140039fbe
xor eax, eax
movzx r15d, ax
mov word [rbp + 0x5b0], ax
jmp 0x140039fbe
movzx r15d, r14w
jmp 0x140039fbe
mov rcx, r13
sub rcx, rbx
nop word [rax + rax]
movzx eax, byte [rbx]
inc rbx
mov byte [rcx + rbx - 1], al
test al, al
jne 0x140039fb0
cmp byte [r13], 0
je 0x14003a032
mov rcx, qword [r12 + 0x2e0]
mov rcx, qword [rcx + 0x20]
call fcn.14004efc0
mov r8d, dword [r12 + 0x328]
lea rcx, [rbp + 0x150]
mov edx, eax
mov rax, qword [r12 + 0x2e0]
mov dword [rsp + 0x28], 0x401
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
mov r9, r13
call fcn.14004f050
test eax, eax
je 0x14003a023
dec eax
je 0x14003a5e7
dec eax
jne 0x14003a032
mov r14d, dword [rbp + 0x5b8]
jmp 0x14003a0b5
mov r14d, dword [rbp + 0x5b8]
mov rdi, r13
jmp 0x14003a0bc
mov rcx, qword [r12 + 0x4c0]
lea r8, [rbp + 0x5a0]
lea rdx, [rbp - 0x80]
mov dword [rbp + 0x5a0], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x14003a07f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
lea rdx, str.getsockname___failed:__s
mov r8, rax
jmp 0x14003a5d4
movzx ecx, word [rbp - 0x80]
mov r9d, 0x401
lea r8, [rbp + 0x150]
cmp ecx, 0x17
je 0x14003a09b
lea rdx, [rbp - 0x7c]
jmp 0x14003a0a4
lea rdx, [rbp - 0x78]
mov ecx, reloc.WS2_32.dll_socket
call fcn.14004f3e0
test rax, rax
je 0x14003a5e7
xor r14d, r14d
lea rdi, [rbp + 0x150]
lea rax, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
mov rdx, rdi
mov rcx, r12
mov qword [rsp + 0x20], rax
call fcn.140047780
cmp eax, 1
jne 0x14003a0e9
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.14000d6a0
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x14003a5ca
mov rcx, qword [rsp + 0x38]
mov rbx, qword [rdx]
call fcn.140047a50
test rbx, rbx
je 0x14003a5ca
mov rcx, r13
call qword [sub.MSVCR120.dll_free]
mov qword [rsp + 0x30], 0xffffffffffffffff
xor edi, edi
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, rbx
mov rcx, r12
call fcn.140022000
mov r13d, eax
test eax, eax
je 0x14003a14e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rbx, qword [rbx + 0x28]
mov edi, eax
test rbx, rbx
jne 0x14003a121
jmp 0x14003a153
test rbx, rbx
jne 0x14003a17d
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, edi
call fcn.1400076f0
mov rcx, qword [rsp + 0x38]
lea rdx, str.socket_failure:__s
mov r8, rax
call fcn.140019080
jmp 0x14003a5e7
movsxd r8, dword [rbx + 0x10]
mov rdx, qword [rbx + 0x20]
lea rcx, [rbp - 0x80]
call sub.MSVCR120.dll_memcpy
mov eax, dword [rbp + 0x5b0]
mov edx, dword [rbx + 0x10]
mov dword [rbp + 0x5a0], edx
movzx edi, ax
cmp ax, r15w
ja 0x14003a265
nop word [rax + rax]
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, dword [rbp + 0x5a0]
mov rcx, qword [rsp + 0x30]
lea rdx, [rbp - 0x80]
mov word [rbp - 0x7e], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14003a2fe
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
test r14d, r14d
je 0x14003a24c
cmp eax, 0x2741
jne 0x14003a24c
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
movzx r8d, di
mov rdi, qword [rsp + 0x38]
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rcx, rdi
mov r9, rax
call fcn.140018f20
mov rcx, qword [r12 + 0x4c0]
lea r8, [rbp + 0x5a0]
lea rdx, [rbp - 0x80]
mov dword [rbp + 0x5a0], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x14003a288
movzx edi, word [rbp + 0x5b0]
xor r14d, r14d
jmp 0x14003a25b
cmp eax, 0x2740
je 0x14003a258
cmp eax, 0xd
jne 0x14003a2c3
inc di
cmp di, r15w
jbe 0x14003a1b0
mov rcx, qword [rsp + 0x38]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.140019080
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call fcn.140021f60
jmp 0x14003a5e7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
mov rcx, rdi
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.140019080
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call fcn.140021f60
jmp 0x14003a5e7
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
mov rcx, qword [rsp + 0x38]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, di
call fcn.140019080
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call fcn.140021f60
jmp 0x14003a5e7
cmp di, r15w
ja 0x14003a265
mov rcx, qword [rsp + 0x30]
lea r8, [rbp + 0x5a0]
lea rdx, [rbp - 0x80]
mov dword [rbp + 0x5a0], 0x80
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x14003a34d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
mov rcx, qword [rsp + 0x38]
jmp 0x14003a2a2
mov rcx, qword [rsp + 0x30]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x14003a389
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rbp + 0x50]
mov r8d, 0x100
mov ecx, eax
call fcn.1400076f0
mov rcx, qword [rsp + 0x38]
lea rdx, str.socket_failure:__s
jmp 0x14003a2a9
lea rdx, [rsp + 0x48]
mov r8d, Ordinal_50
mov rcx, rbx
call fcn.140046a10
cmp dword [r12 + 0x6e0], 0
jne 0x14003a3be
cmp dword [r12 + 0x6c4], 0
je 0x14003a3be
mov dword [r12 + 0x6e0], 1
cmp esi, 2
je 0x14003a41d
movzx eax, word [rbp - 0x80]
nop word [rax + rax]
cmp dword [r12 + 0x6e0], 0
jne 0x14003a3df
test esi, esi
je 0x14003a416
cmp esi, 1
jne 0x14003a3ea
cmp ax, 2
jne 0x14003a416
movzx ecx, ax
cmp ecx, 2
je 0x14003a3f7
cmp ecx, 0x17
jne 0x14003a416
movzx ecx, word [rbp - 0x7e]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r11d, ax
test esi, esi
je 0x14003a53f
cmp esi, 1
je 0x14003a484
movzx eax, word [rbp - 0x80]
inc esi
cmp esi, 2
jne 0x14003a3d0
lea rdi, [r12 + 0xa80]
xor ebx, ebx
mov dword [rdi + 0xd4], esi
mov rdx, qword [r12 + 0x4c8]
cmp rdx, 0xffffffffffffffff
je 0x14003a44f
mov rcx, r12
call fcn.140021f60
mov qword [r12 + 0x4c8], 0xffffffffffffffff
mov rax, qword [rsp + 0x30]
mov dword [r12 + 0x68c], ebx
mov dword [r12 + 0x684], 1
mov qword [r12 + 0x4c8], rax
mov dword [r12 + 0xb60], 0x1c
mov eax, r13d
jmp 0x14003a5ec
lea rdi, [rbp]
lea rdx, [rsp + 0x48]
mov r8d, Ordinal_46
movzx ecx, byte [rdx]
test cl, cl
je 0x14003a4af
cmp cl, 0x2e
movzx eax, cl
cmove eax, r8d
inc rdi
inc rdx
mov byte [rdi - 1], al
jne 0x14003a493
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.14000c260
lea rdi, [r12 + 0xa80]
lea r9, [rbp]
lea r8, str.PORT
lea rdx, [0x14011bcd0]
mov rcx, rdi
call fcn.140053510
mov r13d, eax
test eax, eax
je 0x14003a425
mov ecx, eax
call fcn.140006c90
mov rcx, qword [rsp + 0x38]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.140019080
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call fcn.140021f60
mov dword [r12 + 0xb60], 0
mov eax, r13d
jmp 0x14003a5ec
movzx eax, r11w
xor ebx, ebx
cmp word [rbp - 0x80], 2
mov r9d, ebx
mov dword [rsp + 0x28], eax
setne r9b
lea rax, [rsp + 0x48]
lea rdi, [r12 + 0xa80]
lea r8, str.EPRT
lea rdx, str._s__d_s_hu
inc r9d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.140053510
mov r13d, eax
test eax, eax
je 0x14003a427
mov ecx, eax
call fcn.140006c90
mov rcx, qword [rsp + 0x38]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.140019080
mov rdx, qword [rsp + 0x30]
mov rcx, r12
call fcn.140021f60
mov dword [rdi + 0xd4], 1
mov dword [r12 + 0xb60], ebx
mov eax, r13d
jmp 0x14003a5ec
mov r8, rdi
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, qword [rsp + 0x38]
call fcn.140019080
mov rcx, r13
call qword [sub.MSVCR120.dll_free]
mov eax, reloc.WLDAP32.dll_Ordinal_30
mov rbx, qword [rsp + 0x6a8]
add rsp, 0x660
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 + 0x1b0]
cmp dword [rax + 0x10], 0
je 0x14003d946
mov edx, 1
mov dword [rcx + 0xb60], 0xd
lea r8d, [rdx + 0xc]
add rsp, 0x20
pop rbx
jmp fcn.14003cc70
cmp dword [rdx + 0xff0], 0
je 0x14003d95b
xor edx, edx
add rsp, 0x20
pop rbx
jmp 0x140039d80
cmp dword [rdx + 0xffc], 0
je 0x14003d9d5
mov r8, qword [rbx + 0xb28]
add rcx, 0xa80
test r8, r8
jne 0x14003d9a5
mov r8, qword [rdx + 0xc80]
test r8, r8
jne 0x14003d99c
cmp dword [rdx + 0xfec], 0
lea rax, str.NLST
lea r8, str.LIST
cmovne r8, rax
lea rdx, str.PRET__s
jmp 0x14003d9bc
cmp dword [rdx + 0x102c], 0
lea rdx, str.PRET_STOR__s
jne 0x14003d9bc
lea rdx, str.PRET_RETR__s
call fcn.140053510
test eax, eax
jne 0x14003d9da
mov dword [rbx + 0xb60], 0x1d
add rsp, 0x20
pop rbx
ret
call fcn.14003a610
add rsp, 0x20
pop rbx
ret