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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x9f8
mov r13, qword [rcx]
xor eax, eax
lea rdi, [rsp + 0xe8]
mov rsi, rcx
mov ecx, 0x1f
mov dword [rsp + 0x3c], edx
mov qword [rsp + 0x50], 0xffffffffffffffff
rep stosq qword [rdi], rax
mov rdi, qword [r13 + 0x4c0]
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0x58], 0
test rdi, rdi
je 0x4650a4
mov rcx, rdi
call sub.msvcrt.dll_strlen
cmp rax, 1
jbe 0x4650a4
lea rdx, [rax + 1]
cmp rax, 0x41
mov ecx, 0x42
cmovae rcx, rdx
mov edx, 1
call qword [sub.msvcrt.dll_calloc]
mov rbx, rax
mov eax, 0x1b
test rbx, rbx
je 0x465090
movzx eax, byte [rdi]
cmp al, 0x5b
je 0x465232
cmp al, 0x3a
je 0x464eb3
mov edx, 0x3a
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
mov rbp, rax
je 0x465110
lea r8, [rsp + 0x60]
mov rdx, rdi
mov ecx, 0x17
call fcn.0045efe0
cmp eax, 1
je 0x465110
mov r8, rbp
mov rdx, rdi
mov rcx, rbx
sub r8, rdi
mov rdi, rbp
call sub.msvcrt.dll_strncpy
mov rcx, rdi
mov edx, 0x3a
call sub.msvcrt.dll_strchr
test rax, rax
mov rdi, rax
je 0x46511b
lea rcx, [rdi + 1]
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov ecx, eax
call fcn.0045edc0
mov edx, 0x2d
mov rcx, rdi
mov r15d, eax
call sub.msvcrt.dll_strchr
test rax, rax
je 0x46511e
lea rcx, [rax + 1]
xor edx, edx
mov r8d, 0xa
call sub.msvcrt.dll_strtoul
mov ecx, eax
call fcn.0045edc0
cmp r15w, ax
mov r14d, eax
jbe 0x465121
xor r14d, r14d
xor r15d, r15d
cmp byte [rbx], 0
je 0x4650ac
mov rax, qword [rsi + 0x58]
mov edx, dword [rsi + 0x90]
lea rdi, [rsp + 0x5e0]
mov r8, rbx
mov r9, rdi
mov ecx, dword [rax + 4]
mov dword [rsp + 0x20], 0x401
call fcn.0045eed0
mov edx, eax
mov eax, 0x1e
cmp edx, 1
je 0x465090
jb 0x465350
cmp edx, 2
jne 0x4650ac
mov byte [rsp + 0x3b], 1
lea r9, [rsp + 0x58]
xor r8d, r8d
mov rdx, rdi
mov rcx, rsi
call fcn.0044f370
mov rdx, qword [rsp + 0x58]
test rdx, rdx
je 0x465210
mov r12, qword [rdx]
mov rcx, r13
call fcn.0044f590
test r12, r12
je 0x465210
test rbx, rbx
je 0x464fc0
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
lea rbx, [rsp + 0x50]
mov qword [rsp + 0x50], 0xffffffffffffffff
xor r8d, r8d
mov r9, rbx
mov rdx, r12
mov rcx, rsi
call fcn.0044d670
test eax, eax
jne 0x4651d0
movsxd r8, dword [r12 + 0x10]
lea rbp, [rsp + 0x60]
mov rdx, qword [r12 + 0x20]
mov rcx, rbp
call sub.msvcrt.dll_memcpy
mov eax, dword [r12 + 0x10]
cmp r14w, r15w
mov dword [rsp + 0x4c], eax
jb 0x465068
lea rax, [rsp + 0x4c]
mov ebx, r15d
mov qword [rsp + 0x30], rax
movzx edi, bx
mov ecx, edi
call qword [sym.imp.WS2_32.dll_htons]
mov r8d, dword [rsp + 0x4c]
mov word [rsp + 0x62], ax
mov rdx, rbp
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x4652c5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2741
je 0x465130
cmp eax, 0xd
jne 0x465284
add ebx, 1
cmp bx, r14w
jbe 0x46501a
lea rdx, str.bind___failed__we_ran_out_of_ports_
mov rcx, r13
call fcn.0044ea90
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.0044d600
mov eax, 0x1e
nop dword [rax]
add rsp, 0x9f8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor ebx, ebx
xor r14d, r14d
xor r15d, r15d
lea rbp, [rsp + 0x60]
mov dword [rsp + 0x4c], pe_nt_image_headers64
mov rcx, qword [rsi + 0x190]
lea r8, [rsp + 0x4c]
mov rdx, rbp
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x465320
movzx eax, word [rsp + 0x60]
lea rdi, [rsp + 0x5e0]
cmp ax, 0x17
jne 0x465265
lea rdx, [rbp + 8]
mov r9d, 0x401
mov r8, rdi
mov ecx, 0x17
call fcn.0045d000
mov byte [rsp + 0x3b], 0
jmp 0x464f7d
mov rdx, rdi
mov rcx, rbx
call sub.msvcrt.dll_strcpy
xor r15d, r15d
mov r14d, r15d
cmp byte [rbx], 0
je 0x4650ac
jmp 0x464f31
cmp byte [rsp + 0x3b], 0
je 0x465056
mov edx, 0x2741
mov rcx, rsi
call fcn.0045d930
lea rdx, str.bind_port_hu__on_non_local_address_failed:__s_n
mov r9, rax
mov r8d, edi
mov rcx, r13
call fcn.0044e9e0
mov dword [rsp + 0x4c], pe_nt_image_headers64
mov rcx, qword [rsi + 0x190]
mov rdx, rbp
mov r8, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x465190
mov ebx, r15d
mov byte [rsp + 0x3b], 0
jmp 0x46501a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.0045d930
lea rdx, str.getsockname___failed:__s
mov r8, rax
mov rcx, r13
call fcn.0044ea90
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.0044d600
mov eax, 0x1e
jmp 0x465090
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r12, qword [r12 + 0x28]
test r12, r12
jne 0x464fce
mov edx, eax
mov rcx, rsi
call fcn.0045d930
lea rdx, str.socket_failure:__s
mov r8, rax
mov rcx, r13
call fcn.0044ea90
mov eax, 0x1e
jmp 0x465090
lea rdx, str.failed_to_resolve_the_address_provided_to_PORT:__s
mov r8, rdi
mov rcx, r13
call fcn.0044ea90
test rbx, rbx
je 0x4651bf
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
jmp 0x4651bf
mov edx, 0x5d
mov rcx, rdi
call sub.msvcrt.dll_strchr
test rax, rax
mov rbp, rax
je 0x46511b
lea rdx, [rdi + 1]
mov r8, rax
mov rcx, rbx
mov rdi, rbp
sub r8, rdx
call sub.msvcrt.dll_strncpy
jmp 0x464eb3
lea rdx, [rbp + 4]
movzx ecx, ax
mov r9d, 0x401
mov r8, rdi
call fcn.0045d000
mov byte [rsp + 0x3b], 0
jmp 0x464f7d
cmp eax, 0x2740
je 0x46505f
mov edx, eax
mov rcx, rsi
call fcn.0045d930
lea rdx, str.bind_port_hu__failed:__s
mov r9, rax
mov r8d, edi
mov rcx, r13
call fcn.0044ea90
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.0044d600
mov eax, 0x1e
jmp 0x465090
mov dword [rsp + 0x4c], pe_nt_image_headers64
lea r8, [rsp + 0x4c]
mov rdx, rbp
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x465190
mov edx, 1
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
mov ebp, eax
je 0x465358
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.0045d930
lea rdx, str.socket_failure:__s
mov r8, rax
jmp 0x4651aa
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rsi
mov edx, eax
call fcn.0045d930
lea rdx, str.getsockname___failed:__s
mov r8, rax
mov rcx, r13
call fcn.0044ea90
test rbx, rbx
jne 0x465227
jmp 0x4651bf
mov rdi, rbx
jmp 0x464f78
lea r14, [rsp + 0xe0]
mov r8d, 0x100
mov rcx, r12
mov rdx, r14
call fcn.0044f1d0
cmp byte [rsi + 0x2a9], 0
jne 0x46538a
cmp byte [rsi + 0x29f], 0
je 0x46538a
mov byte [rsi + 0x2a9], 1
cmp dword [rsp + 0x3c], 2
je 0x4654d5
mov ebx, dword [rsp + 0x3c]
mov r12, qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, byte [rsi + 0x2a9]
mov edi, ebx
mov r15, r12
add edi, 1
jmp 0x4653dd
cmp ax, 0x17
jne 0x4653c7
movzx ecx, word [rsp + 0x62]
call r15
test ebx, ebx
je 0x4654dc
cmp edi, 2
je 0x4654d5
movzx eax, byte [rsi + 0x2a9]
add edi, 1
add ebx, 1
test al, al
jne 0x4653e5
test ebx, ebx
je 0x4653d7
cmp ebx, 1
je 0x4654c9
movzx eax, word [rsp + 0x60]
cmp ax, 2
jne 0x4653b1
movzx ecx, word [rsp + 0x62]
call r12
test ebx, ebx
je 0x4654dc
cmp ebx, 1
jne 0x4653c7
lea rbx, [rsp + 0x1e0]
mov r8d, 0x2c
mov rcx, rbx
jmp 0x465435
cmp dl, 0x2e
cmove edx, r8d
add rcx, 1
mov byte [rcx - 1], dl
add r14, 1
je 0x46543d
movzx edx, byte [r14]
test dl, dl
jne 0x465421
movzx edi, ah
lea r8, str.__d__d
movzx eax, al
mov byte [rcx], 0
mov r9d, edi
mov edx, 0x14
mov dword [rsp + 0x20], eax
mov ebp, 1
call fcn.0044b120
lea rcx, [rsi + 0x590]
lea r8, str.PORT
lea rdx, [0x006621a8]
mov r9, rbx
call fcn.00483070
test eax, eax
mov ebx, eax
jne 0x46555c
mov rdx, qword [rsi + 0x198]
mov dword [rsi + 0x62c], ebp
cmp rdx, 0xffffffffffffffff
je 0x4654a5
mov rcx, rsi
call fcn.0044d600
mov rax, qword [rsp + 0x50]
mov byte [rsi + 0x2a2], 1
mov dword [rsi + 0x638], 0x1c
mov qword [rsi + 0x198], rax
xor eax, eax
jmp 0x465090
cmp word [rsp + 0x60], 2
je 0x4653f9
mov ebp, 2
jmp 0x46548a
xor edx, edx
cmp word [rsp + 0x60], 2
movzx eax, ax
lea rcx, [rsi + 0x590]
lea r8, str.EPRT
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
setne dl
lea r9d, [rdx + 1]
lea rdx, str._s__d_s_hu
call fcn.00483070
test eax, eax
mov ebx, eax
je 0x46548a
mov ecx, eax
call fcn.0045d2d0
lea rdx, str.Failure_sending_EPRT_command:__s
mov r8, rax
mov rcx, r13
call fcn.0044ea90
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.0044d600
mov dword [rsi + 0x62c], 1
mov dword [rsi + 0x638], 0
mov eax, ebx
jmp 0x465090
mov ecx, eax
call fcn.0045d2d0
lea rdx, str.Failure_sending_PORT_command:__s
mov r8, rax
mov rcx, r13
call fcn.0044ea90
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
call fcn.0044d600
mov dword [rsi + 0x638], 0
mov eax, ebx
jmp 0x465090