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

Disassembly:
push rsi
sub rsp, 0x20
mov rsi, rcx
mov rax, qword [rcx + 0x1a0]
cmp dword [rax + 0x10], 0
je 0x140474d61
mov rcx, rsi
mov dl, reloc.WS2_32.dll_listen
call fcn.1404729a0
mov rcx, rsi
mov dl, 1
mov r8b, reloc.WS2_32.dll_listen
add rsp, 0x20
pop rsi
jmp fcn.1404734f0
cmp byte [rsi + 0xa9f], 0
je 0x140474d79
mov rcx, rsi
xor edx, edx
add rsp, 0x20
pop rsi
jmp 0x140474e10
mov rdx, qword [rsi + 0x20]
cmp byte [rsi + 0xaa2], 0
je 0x140474dab
mov r9, qword [rdx + 0x670]
add rdx, 0x5d0
test r9, r9
je 0x140474db8
cmp byte [rsi + 0x1378], 0
je 0x140474de6
lea r8, str.PRET_STOR__s
jmp 0x140474ded
mov rcx, rsi
add rsp, 0x20
pop rsi
jmp fcn.140473d40
mov r9, qword [rsi + 0x748]
test r9, r9
jne 0x140474ddd
cmp byte [rsi + 0x1373], 0
lea rax, str.LIST
lea r9, str.NLST
cmove r9, rax
lea r8, str.PRET__s
jmp 0x140474ded
lea r8, str.PRET_RETR__s
mov rcx, rsi
call fcn.1404928c0
test eax, eax
jne 0x140474e05
mov rcx, rsi
mov dl, 0x1d
call fcn.1404729a0
xor eax, eax
add rsp, 0x20
pop rsi
ret
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x688
mov ebp, edx
mov rsi, rcx
mov rax, qword [0x140516758]
xor rax, rsp
mov qword [rsp + 0x680], rax
mov rdi, qword [rcx + 0x20]
mov qword [rsp + 0x68], 0xffffffffffffffff
xorps xmm0, xmm0
movups xmmword [rsp + 0x66f], xmm0
movaps xmmword [rsp + 0x660], xmm0
movaps xmmword [rsp + 0x650], xmm0
mov r14, qword [rcx + 0x778]
mov qword [rsp + 0x58], 0
test r14, r14
je 0x140474ee3
mov rcx, r14
call fcn.1404bc040
cmp rax, 2
jb 0x140474ee3
cmp rax, 0x42
mov ecx, 0x41
cmovae rcx, rax
inc rcx
mov edx, 1
call qword [fcn.1404b8fa4]
test rax, rax
je 0x140475094
mov r12, rax
movzx eax, byte [r14]
cmp eax, 0x3a
je 0x140475143
mov rcx, r14
cmp eax, 0x5b
jne 0x1404750f6
mov edx, 0x5d
call fcn.1404a4048
test rax, rax
je 0x1404751ad
mov rbx, rax
inc r14
jmp 0x14047512f
xor r14d, r14d
xor r15d, r15d
xor r12d, r12d
mov dword [rsp + 0x64], Ordinal_133
mov rcx, qword [rdi + 0x1a8]
lea rdx, [rsp + 0x5d0]
lea r8, [rsp + 0x64]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140474f4c
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xc0]
mov r8d, 0x100
mov ecx, eax
call fcn.1404702f0
lea rdx, str.getsockname___failed:__s
mov rcx, rsi
mov r8, rax
call fcn.14043cca0
mov ebp, 0x1e
xor r13d, r13d
jmp 0x1404750a6
movzx ecx, word [rsp + 0x5d0]
cmp ecx, 0x17
jne 0x140474f76
lea rdx, [rsp + 0x5d8]
lea r8, [rsp + 0x1c0]
mov r9d, 0x401
mov ecx, reloc.WS2_32.dll_socket
jmp 0x140474f8c
lea rdx, [rsp + 0x5d4]
lea r8, [rsp + 0x1c0]
mov r9d, 0x401
call fcn.140489040
xor r13d, r13d
test rax, rax
je 0x1404750a1
lea rbx, [rsp + 0x1c0]
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov rcx, rsi
mov rdx, rbx
xor r8d, r8d
xor r9d, r9d
call fcn.140461b20
cmp eax, 1
jne 0x140474fd7
lea rdx, [rsp + 0x58]
mov rcx, rsi
call fcn.14043f8a0
mov rdx, qword [rsp + 0x58]
test rdx, rdx
je 0x140475073
mov r12, qword [rdx]
mov rcx, rsi
call fcn.140461ff0
test r12, r12
je 0x140475073
mov dword [rsp + 0x4c], ebp
lea rax, [rdi + 0x5d0]
mov qword [rsp + 0x50], rax
lea rbx, [rsp + 0x68]
mov rbp, qword [sym.imp.WS2_32.dll_WSAGetLastError]
nop word cs:[rax + rax]
movzx r9d, byte [rdi + 0x70b]
mov qword [rsp + 0x20], rbx
mov rcx, rsi
mov rdx, r12
xor r8d, r8d
call fcn.140455fb0
test eax, eax
je 0x1404751b8
call rbp
mov r12, qword [r12 + 0x28]
test r12, r12
jne 0x140475020
lea rdx, [rsp + 0xc0]
mov r8d, 0x100
mov ecx, eax
call fcn.1404702f0
lea rdx, str.socket_failure:__s
mov rcx, rsi
mov r8, rax
jmp 0x140475080
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov rcx, rsi
mov r8, rbx
call fcn.14043cca0
mov ebp, 0x1e
xor r13d, r13d
mov r12, qword [rsp + 0x40]
jmp 0x1404750a6
mov ebp, reloc.WLDAP32.dll_Ordinal_27
xor r13d, r13d
xor r12d, r12d
jmp 0x1404750a6
mov ebp, 0x1e
mov rcx, rsi
mov edx, r13d
call fcn.1404729a0
mov r8, qword [rsp + 0x68]
cmp r8, 0xffffffffffffffff
je 0x1404750c7
mov rcx, rsi
mov rdx, rdi
call fcn.1404560b0
mov rcx, r12
call qword [fcn.1404ba1dc]
mov rcx, qword [rsp + 0x680]
xor rcx, rsp
call fcn.14049f400
mov eax, ebp
add rsp, 0x688
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 0x3a
call fcn.1404a4048
test rax, rax
je 0x140475122
mov rbx, rax
lea r8, [rsp + 0x5d8]
mov ecx, reloc.WS2_32.dll_socket
mov rdx, r14
call fcn.1404879c0
cmp eax, 1
jne 0x14047512f
mov rcx, r12
mov rdx, r14
call fcn.1404bba00
jmp 0x1404751ad
mov r8, rbx
sub r8, r14
mov rcx, r12
mov rdx, r14
call fcn.1404bc190
mov r14, rbx
mov rcx, r14
mov edx, 0x3a
call fcn.1404a4048
test rax, rax
je 0x1404751ad
mov rbx, rax
mov rcx, rax
inc rcx
xor edx, edx
mov r8d, 0xa
call fcn.1404bce1c
mov ecx, eax
call fcn.14044f420
mov r14d, eax
mov rcx, rbx
mov edx, Ordinal_46
call fcn.1404a4048
test rax, rax
je 0x1404752c7
inc rax
mov rcx, rax
xor edx, edx
mov r8d, 0xa
call fcn.1404bce1c
mov ecx, eax
call fcn.14044f420
mov r15d, eax
jmp 0x1404752ca
xor r14d, r14d
xor r15d, r15d
jmp 0x1404752ca
mov rdx, qword [r12 + 0x20]
movsxd r8, dword [r12 + 0x10]
lea rcx, [rsp + 0x5d0]
call fcn.1404a3620
mov eax, dword [r12 + 0x10]
mov dword [rsp + 0x64], eax
cmp r14w, r15w
jbe 0x1404751f2
lea rdx, str.bind___failed__we_ran_out_of_ports
mov rcx, rsi
call fcn.14043cca0
jmp 0x140475085
mov ebx, r14d
jmp 0x140475208
inc ebx
cmp bx, r15w
ja 0x1404751de
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x5d2], ax
mov r8d, dword [rsp + 0x64]
mov rcx, qword [rsp + 0x68]
lea rdx, [rsp + 0x5d0]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14047534b
call rbp
test r13b, r13b
je 0x140475246
cmp eax, 0x2741
je 0x140475257
cmp eax, 0xd
je 0x140475200
cmp eax, 0x2740
je 0x140475200
jmp 0x140475396
test rsi, rsi
je 0x140475295
cmp byte [rsi + 0xaaf], 0
je 0x140475295
movzx ebx, bx
mov r8d, 0x100
mov ecx, 0x2741
lea rdx, [rsp + 0xc0]
call fcn.1404702f0
mov rcx, rsi
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s
mov r8d, ebx
mov r9, rax
call fcn.14043cd70
mov dword [rsp + 0x64], Ordinal_133
mov rcx, qword [rdi + 0x1a8]
lea rdx, [rsp + 0x5d0]
lea r8, [rsp + 0x64]
call qword [sym.imp.WS2_32.dll_getsockname]
xor r13d, r13d
test eax, eax
je 0x1404751f2
jmp 0x14047536f
mov r15d, r14d
xor eax, eax
cmp r14w, r15w
cmova r14d, eax
cmova r15d, eax
cmp byte [r12], 0
je 0x140474eec
mov r13, r12
mov r12d, dword [rdi + 0x700]
mov rcx, qword [rdi + 0x58]
add rcx, 0x10
call fcn.140489f90
mov rcx, qword [rdi + 0x58]
mov ecx, dword [rcx]
lea rbx, [rsp + 0x1c0]
mov qword [rsp + 0x20], rbx
mov dword [rsp + 0x28], 0x401
mov edx, eax
mov r8d, r12d
mov r12, r13
mov r9, r13
call fcn.140026fd0
mov r13b, 1
test eax, eax
je 0x140475343
cmp eax, 1
je 0x140474f3f
cmp eax, 2
jne 0x140474eec
jmp 0x140474fa5
mov rbx, r12
jmp 0x140474fa5
mov dword [rsp + 0x64], Ordinal_133
mov rcx, qword [rsp + 0x68]
lea rdx, [rsp + 0x5d0]
lea r8, [rsp + 0x64]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1404753c8
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, [rsp + 0xc0]
mov r8d, 0x100
mov ecx, eax
call fcn.1404702f0
lea rdx, str.getsockname___failed:__s
jmp 0x14047506b
movzx ebx, bx
lea rdx, [rsp + 0xc0]
mov r8d, 0x100
mov ecx, eax
call fcn.1404702f0
lea rdx, str.bind_port_hu__failed:__s
mov rcx, rsi
mov r8d, ebx
mov r9, rax
call fcn.14043cca0
jmp 0x140475085
mov rcx, qword [rsp + 0x68]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1404753e7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x14047504f
lea rbx, [rsp + 0x650]
mov r8d, 0x2f
mov rcx, r12
mov rdx, rbx
call fcn.140461340
cmp byte [rdi + 0x2da], 0
jne 0x140475419
cmp byte [rdi + 0x2d4], 0
je 0x140475419
mov byte [rdi + 0x2da], 1
mov ebp, 2
cmp dword [rsp + 0x4c], 2
mov r12, qword [rsp + 0x40]
jne 0x14047545a
mov dword [rdi + 0x6b8], ebp
lea r9, [rsp + 0x68]
mov rcx, rsi
mov rdx, rdi
mov r8d, 1
call fcn.1404571b0
xor ebp, ebp
test eax, eax
je 0x14047555d
xor r13d, r13d
mov ebp, eax
jmp 0x1404750a6
mov r14, qword [sym.imp.WS2_32.dll_ntohs]
mov eax, dword [rsp + 0x4c]
jmp 0x140475471
mov eax, r15d
inc eax
cmp eax, 2
je 0x14047542a
mov r15d, eax
test eax, eax
jne 0x140475481
cmp byte [rdi + 0x2da], 0
je 0x140475467
movzx eax, word [rsp + 0x5d0]
cmp r15d, 1
jne 0x140475495
cmp ax, 2
jne 0x14047542a
movzx eax, ax
cmp eax, 0x17
je 0x1404754a2
cmp eax, 2
jne 0x140475467
movzx ecx, word [rsp + 0x5d2]
call r14
test r15d, r15d
je 0x14047556e
mov ecx, r15d
cmp r15d, 1
jne 0x140475467
xor edx, edx
jmp 0x1404754ce
mov r8d, ecx
mov byte [rsp + rdx + 0x70], r8b
inc rdx
movzx ecx, byte [rsp + rdx + 0x650]
mov r8b, Ordinal_46
cmp ecx, 0x2e
je 0x1404754c6
test ecx, ecx
jne 0x1404754c3
lea rcx, [rsp + rdx]
add rcx, 0x70
mov byte [rsp + rdx + 0x70], 0
movzx r9d, ax
movzx eax, r9b
shr r9d, 8
mov dword [rsp + 0x20], eax
lea r8, str.__d__d
mov edx, reloc.WS2_32.dll_sendto
call fcn.140454850
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
lea r8, [0x1404f0469]
lea r9, str.PORT
mov rcx, rsi
mov rdx, qword [rsp + 0x50]
call fcn.1404928c0
test eax, eax
je 0x1404755d0
mov ebp, eax
mov ecx, eax
call fcn.1404702b0
lea rdx, str.Failure_sending_PORT_command:__s
mov rcx, rsi
mov r8, rax
call fcn.14043cca0
jmp 0x14047508a
mov qword [rsp + 0x68], 0xffffffffffffffff
mov r13b, 0x1c
jmp 0x1404750a6
movzx eax, ax
xor ecx, ecx
cmp word [rsp + 0x5d0], 2
setne cl
inc ecx
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], ecx
lea r8, str._s__d_s_hu
lea r9, str.EPRT
mov rcx, rsi
mov rdx, qword [rsp + 0x50]
call fcn.1404928c0
test eax, eax
je 0x1404755df
mov ebp, eax
mov ecx, eax
call fcn.1404702b0
lea rdx, str.Failure_sending_EPRT_command:__s
mov rcx, rsi
mov r8, rax
call fcn.14043cca0
xor r13d, r13d
jmp 0x1404750a6
mov ebp, 1
mov r12, qword [rsp + 0x40]
jmp 0x14047542a
xor ebp, ebp
jmp 0x14047542a