Function at 0x140065370
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 + 0x1a8]
cmp dword [rax + 0x10], 0
je 0x1400653a5
mov edx, reloc.WS2_32.dll_listen
mov rcx, rbx
call fcn.140063b10
mov r8d, edx
mov dl, 1
add rsp, 0x20
pop rbx
jmp fcn.140065490
cmp byte [rcx + 0xf5e], 0
je 0x1400653bd
xor edx, edx
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp 0x140065fc0
cmp byte [rcx + 0xf61], 0
je 0x140065437
mov r8, qword [rbx + 0x838]
test r8, r8
jne 0x140065400
mov r8, qword [rcx + 0xc20]
test r8, r8
jne 0x1400653f7
cmp byte [rcx + 0xf5d], 0
lea rdx, str.NLST
lea r8, str.LIST
cmovne r8, rdx
lea rdx, str.PRET__s
jmp 0x140065417
cmp byte [rcx + 0xf6d], 0
lea rdx, str.PRET_STOR__s
jne 0x140065417
lea rdx, str.PRET_RETR__s
lea rcx, [rbx + 0x790]
call fcn.14006cfd0
test eax, eax
jne 0x140065444
lea edx, [rax + 0x1d]
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140063b10
mov rcx, rbx
add rsp, 0x20
pop rbx
jmp fcn.140065f20
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 - 0x580]
sub rsp, 0x680
mov rax, qword [0x1400cf070]
xor rax, rsp
mov qword [rbp + 0x570], rax
mov r14, qword [rcx]
xor eax, eax
mov qword [rbp - 0x20], rax
mov rsi, rcx
mov qword [rbp - 0x18], rax
mov rcx, 0xffffffffffffffff
mov qword [rsp + 0x38], rcx
mov edi, edx
mov qword [rbp - 0x10], rax
mov r13d, eax
mov qword [rbp - 8], rax
movzx r12d, ax
mov qword [rbp], rax
mov r15d, eax
mov dword [rbp + 8], eax
mov word [rbp + 0xc], ax
mov byte [rbp + 0xe], al
mov rbx, qword [r14 + 0xc50]
mov qword [rsp + 0x50], rax
mov rdx, qword [r14 + 0xc50]
mov qword [rsp + 0x40], r14
mov word [rsp + 0x48], ax
mov byte [rsp + 0x30], 1
test rdx, rdx
je 0x140066265
mov rax, rcx
nop dword [rax]
inc rax
cmp byte [rdx + rax], r13b
jne 0x140066060
cmp rax, 1
jbe 0x140066265
mov rax, rcx
inc rax
cmp byte [rbx + rax], r13b
jne 0x140066076
cmp rax, 0x41
jae 0x140066090
mov ecx, 0x41
jmp 0x140066099
inc rcx
cmp byte [rbx + rcx], r13b
jne 0x140066090
inc rcx
mov edx, 1
call qword [str.:I_a_]
mov r15, rax
test rax, rax
jne 0x1400660b8
lea eax, [r15 + 0x1b]
jmp 0x1400667d9
movzx eax, byte [rbx]
cmp al, 0x5b
jne 0x1400660f3
mov edx, 0x5d
lea r12, [rbx + 1]
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x14006616e
mov r8, rax
mov rdx, r12
sub r8, r12
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
jmp 0x14006616e
cmp al, 0x3a
jne 0x1400660fc
mov r14, rbx
jmp 0x14006616e
mov edx, 0x3a
mov rcx, rbx
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
test rax, rax
je 0x140066158
lea r8, [rsp + 0x60]
mov rdx, rbx
mov ecx, reloc.WS2_32.dll_socket
call fcn.140050b40
mov rcx, r15
cmp eax, 1
jne 0x140066147
sub rcx, rbx
nop
movzx eax, byte [rbx]
mov byte [rbx + rcx], al
inc rbx
test al, al
jne 0x140066130
xor eax, eax
movzx ebx, ax
jmp 0x1400661d4
mov r8, r14
mov rdx, rbx
sub r8, rbx
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
jmp 0x14006616e
mov rcx, r15
sub rcx, rbx
nop
movzx eax, byte [rbx]
mov byte [rbx + rcx], al
lea rbx, [rbx + 1]
test al, al
jne 0x140066160
xor eax, eax
mov ebx, eax
test r14, r14
je 0x1400661d4
lea edx, [rax + 0x3a]
mov rcx, r14
call sub.VCRUNTIME140.dll_strchr
mov r14, rax
xor eax, eax
test r14, r14
je 0x1400661d4
lea rcx, [r14 + 1]
xor edx, edx
lea r8d, [rax + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.140047630
mov edx, Ordinal_46
mov rcx, r14
movzx ebx, ax
call sub.VCRUNTIME140.dll_strchr
test rax, rax
je 0x1400661d1
xor edx, edx
lea rcx, [rax + 1]
lea r8d, [rdx + 0xa]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_strtoul]
mov ecx, eax
call fcn.140047630
jmp 0x1400661d4
movzx eax, bx
xor ecx, ecx
cmp bx, ax
mov r14d, ecx
mov r12d, ecx
cmovbe r14w, bx
cmovbe r12w, ax
mov dword [rsp + 0x48], r14d
cmp byte [r15], cl
je 0x14006625b
mov rcx, qword [rsi + 0x2e0]
mov rcx, qword [rcx + 0x20]
call fcn.14006ab80
mov r8d, dword [rsi + 0x328]
lea rcx, [rbp + 0x160]
mov edx, eax
mov dword [rsp + 0x28], 0x401
mov rax, qword [rsi + 0x2e0]
mov r9, r15
mov qword [rsp + 0x20], rcx
mov ecx, dword [rax + 4]
call fcn.14001a680
test eax, eax
je 0x14006624d
sub eax, 1
je 0x1400667d4
cmp eax, 1
jne 0x140066250
lea r13, [rbp + 0x160]
jmp 0x140066250
mov r13, r15
test r13, r13
jne 0x1400662f0
jmp 0x140066260
mov dword [rsp + 0x48], r14d
mov r14, qword [rsp + 0x40]
mov rcx, qword [rsi + 0x4c0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], Ordinal_133
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x1400662b1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
mov r8, rax
lea rdx, str.getsockname___failed:__s
mov rcx, r14
jmp 0x1400667c6
movzx eax, word [rsp + 0x60]
lea rcx, [rsp + 0x68]
cmp eax, 0x17
lea rdx, [rsp + 0x64]
mov r9d, 0x401
lea r8, [rbp + 0x160]
cmove rdx, rcx
mov ecx, eax
call fcn.140050630
test rax, rax
je 0x1400667d4
lea r13, [rbp + 0x160]
mov byte [rsp + 0x30], 0
lea rax, [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rdx, r13
mov rcx, rsi
call fcn.1400375a0
cmp eax, 1
jne 0x14006631d
lea rdx, [rsp + 0x50]
mov rcx, rsi
call fcn.1400367b0
mov rdx, qword [rsp + 0x50]
test rdx, rdx
je 0x1400667b7
mov rcx, qword [rsp + 0x40]
mov r14, qword [rdx]
call fcn.140037890
test r14, r14
je 0x1400667b7
mov rcx, r15
call qword [str._I_a_]
xor ebx, ebx
nop dword [rax]
lea r9, [rsp + 0x38]
xor r8d, r8d
mov rdx, r14
mov rcx, rsi
call fcn.140044470
mov r15d, eax
test eax, eax
je 0x14006637d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r14, qword [r14 + 0x28]
mov ebx, eax
test r14, r14
jne 0x140066350
jmp 0x140066382
test r14, r14
jne 0x1400663ac
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, ebx
call fcn.14006ac10
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
mov r8, rax
call fcn.1400465e0
jmp 0x1400667d4
movsxd r8, dword [r14 + 0x10]
lea rcx, [rsp + 0x60]
mov rdx, qword [r14 + 0x20]
call sub.VCRUNTIME140.dll_memcpy
mov r13d, dword [rsp + 0x48]
movzx ebx, r13w
mov eax, dword [r14 + 0x10]
mov dword [rsp + 0x34], eax
cmp r13w, r12w
ja 0x140066491
nop dword [rax]
movzx ecx, bx
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, dword [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov rcx, qword [rsp + 0x38]
mov word [rsp + 0x62], ax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14006652a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [rsp + 0x30], 0
je 0x140066478
cmp eax, 0x2741
jne 0x140066478
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
movzx r8d, bx
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov rbx, qword [rsp + 0x40]
mov r9, rax
mov rcx, rbx
call fcn.1400466f0
mov rcx, qword [rsi + 0x4c0]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], Ordinal_133
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x1400664b4
movzx ebx, r13w
mov byte [rsp + 0x30], al
jmp 0x140066487
cmp eax, 0x2740
je 0x140066484
cmp eax, 0xd
jne 0x1400664ef
inc bx
cmp bx, r12w
jbe 0x1400663e0
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind___failed__we_ran_out_of_ports_
call fcn.1400465e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140043af0
jmp 0x1400667d4
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
mov rcx, rbx
lea rdx, str.getsockname___failed:__s
mov r8, rax
call fcn.1400465e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140043af0
jmp 0x1400667d4
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
mov rcx, qword [rsp + 0x40]
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
movzx r8d, bx
call fcn.1400465e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140043af0
jmp 0x1400667d4
cmp bx, r12w
ja 0x140066491
mov rcx, qword [rsp + 0x38]
lea r8, [rsp + 0x34]
lea rdx, [rsp + 0x60]
mov dword [rsp + 0x34], Ordinal_133
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x140066576
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
mov rcx, qword [rsp + 0x40]
jmp 0x1400664ce
mov rcx, qword [rsp + 0x38]
mov edx, 1
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x1400665b2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rbp + 0x60]
mov ecx, eax
call fcn.14006ac10
mov rcx, qword [rsp + 0x40]
lea rdx, str.socket_failure:__s
jmp 0x1400664d5
mov r8d, gethostbyname
lea rdx, [rbp - 0x20]
mov rcx, r14
call fcn.140037560
cmp byte [rsi + 0x650], 0
jne 0x1400665dd
cmp byte [rsi + 0x649], 0
je 0x1400665dd
mov byte [rsi + 0x650], 1
cmp edi, 2
je 0x140066634
movzx eax, word [rsp + 0x60]
cmp byte [rsi + 0x650], 0
jne 0x1400665f4
test edi, edi
je 0x14006662d
cmp edi, 1
jne 0x1400665ff
cmp ax, 2
jne 0x14006662d
movzx ecx, ax
cmp ecx, 2
je 0x14006660c
cmp ecx, 0x17
jne 0x14006662d
movzx ecx, word [rsp + 0x62]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r8d, ax
test edi, edi
je 0x14006672b
cmp edi, 1
je 0x140066671
movzx eax, word [rsp + 0x60]
inc edi
cmp edi, 2
jne 0x1400665e7
lea rbx, [rsi + 0x790]
mov rcx, rsi
mov dword [rbx + 0xcc], edi
call fcn.140063b20
mov rax, qword [rsp + 0x38]
mov edx, 0x1c
mov rcx, rsi
mov qword [rsi + 0x4c8], rax
mov byte [rsi + 0x639], 1
call fcn.140063b10
mov eax, r15d
jmp 0x1400667d9
lea r10, [rbp + 0x10]
mov r9d, Ordinal_46
lea rdx, [rbp - 0x20]
nop
movzx ecx, byte [rdx]
test cl, cl
je 0x14006669d
cmp cl, 0x2e
movzx eax, cl
cmove eax, r9d
mov byte [r10], al
inc r10
add rdx, 1
jne 0x140066680
movzx r9d, r8w
mov edx, reloc.WS2_32.dll_sendto
movzx eax, r9b
lea r8, str.__d__d
shr r9d, 8
mov rcx, r10
mov dword [rsp + 0x20], eax
mov byte [r10], 0
call fcn.1400497a0
lea rbx, [rsi + 0x790]
mov rcx, rbx
lea r9, [rbp + 0x10]
lea r8, str.PORT
lea rdx, str._s__s
call fcn.14006cfd0
mov r15d, eax
test eax, eax
je 0x14006663b
mov ecx, eax
call fcn.14006ad50
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
call fcn.1400465e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140043af0
xor edx, edx
mov rcx, rsi
call fcn.140063b10
mov eax, r15d
jmp 0x1400667d9
cmp word [rsp + 0x60], 2
lea rbx, [rsi + 0x790]
movzx eax, r8w
lea rdx, str._s__d_s_hu
mov ecx, 0
mov dword [rsp + 0x28], eax
setne cl
lea rax, [rbp - 0x20]
lea r8, str.EPRT
mov qword [rsp + 0x20], rax
lea r9d, [rcx + 1]
mov rcx, rbx
call fcn.14006cfd0
mov r15d, eax
test eax, eax
je 0x14006663b
mov ecx, eax
call fcn.14006ad50
mov rcx, qword [rsp + 0x40]
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
call fcn.1400465e0
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.140043af0
xor edx, edx
mov dword [rbx + 0xcc], 1
mov rcx, rsi
call fcn.140063b10
mov eax, r15d
jmp 0x1400667d9
mov rcx, qword [rsp + 0x40]
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov r8, r13
call fcn.1400465e0
mov rcx, r15
call qword [str._I_a_]
mov eax, 0x1e
mov rcx, qword [rbp + 0x570]
xor rcx, rsp
call fcn.140073640
mov rbx, qword [rsp + 0x6d0]
add rsp, 0x680
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret