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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x90]
sub rsp, 0x190
mov rax, qword [0x1803c1370]
xor rax, rsp
mov qword [rbp + 0x80], rax
mov rsi, qword [rcx]
mov rbx, rcx
lea rcx, [rbp - 0x7f]
xor edx, edx
mov r8d, 0xff
mov byte [rbp - 0x80], 0
call sub.MSVCR100.dll_memset
xor eax, eax
mov dword [rsp + 0x40], reloc.WS2_32.dll_recv
mov r12, qword [rsi + 0x450]
xor r14b, r14b
mov r13d, eax
mov r15b, 1
test r12, r12
je 0x180218b52
lea r8, [rsp + 0x44]
lea ecx, [rax + 2]
mov rdx, r12
call fcn.180224420
lea ecx, [r13 + 2]
test eax, eax
jle 0x180218a36
lea rdx, [rsp + 0x44]
xor r9d, r9d
mov r8, r12
call fcn.1802141b0
mov r13, rax
jmp 0x180218add
lea r8, [rbp - 0x80]
mov r9d, 0x100
mov rdx, r12
call fcn.180224450
test rax, rax
je 0x180218a82
lea r8, [rsp + 0x44]
lea rdx, [rbp - 0x80]
mov ecx, 2
call fcn.180224420
test eax, eax
jle 0x180218b52
xor r9d, r9d
lea r8, [rbp - 0x80]
lea rdx, [rsp + 0x44]
lea ecx, [r9 + 2]
call fcn.1802141b0
mov r13, rax
jmp 0x180218add
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 1
jbe 0x180218b52
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rdx, r12
mov rcx, rbx
mov qword [rsp + 0x50], rax
call fcn.180203f20
cmp eax, 1
jne 0x180218ac5
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.180214900
mov rdx, qword [rsp + 0x50]
mov rcx, rsi
test rdx, rdx
je 0x180218b43
mov r13, qword [rdx]
call fcn.1802040e0
xor r15b, r15b
test r13, r13
je 0x180218b52
mov r12d, reloc.WS2_32.dll_recv
xor r8d, r8d
lea edx, [r8 + 1]
lea ecx, [rdx + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180218d37
mov rcx, qword [rbx + 0x128]
cmp rcx, 0xffffffffffffffff
je 0x180218b18
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x128], rdi
test r14b, r14b
jne 0x180218bb1
movsxd r8, dword [rsp + 0x40]
mov rdx, qword [r13 + 0x20]
lea rcx, [rsp + 0x58]
call sub.MSVCR100.dll_memcpy
xor eax, eax
mov dword [rsp + 0x5c], eax
jmp 0x180218bb3
lea rdx, str.Failed_to_resolve_host_name__s_n
mov r8, r12
call fcn.180203670
mov rcx, qword [rbx + 0x120]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x58]
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x180218b94
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, rbx
mov edx, eax
call fcn.180213960
lea rdx, str.getsockname___failed:__s
mov rcx, rsi
mov r8, rax
call fcn.180203720
jmp 0x180218d46
mov eax, dword [rsp + 0x40]
mov r12d, reloc.WS2_32.dll_recv
mov r14b, 1
cmp eax, 0x10
cmovg eax, r12d
mov dword [rsp + 0x40], eax
jmp 0x180218ae8
xor eax, eax
lea rdx, [rsp + 0x58]
mov r8d, r12d
mov rcx, rdi
mov word [rsp + 0x5a], ax
mov dword [rsp + 0x40], r12d
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x180218d2e
lea r8, [rsp + 0x48]
lea rdx, [rsp + 0x68]
mov rcx, rdi
mov dword [rsp + 0x48], r12d
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x180218b6d
movzx ecx, word [rsp + 0x6a]
call qword [sym.imp.WS2_32.dll_ntohs]
mov edx, 1
mov rcx, rdi
movzx r12d, ax
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x180218c23
lea rdx, str.listen_2__failed_on_socket
jmp 0x180218d3e
test r14b, r14b
je 0x180218c43
lea r8, [rbp - 0x80]
lea rdx, [rsp + 0x5c]
mov r9d, 0x100
mov ecx, 2
call fcn.180213b50
jmp 0x180218c55
lea rdx, [rbp - 0x80]
mov r8d, 0x100
mov rcx, r13
call fcn.180203c40
lea rax, [rsp + 0x7e]
lea r9, [rsp + 0x7a]
lea r8, [rsp + 0x78]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x7c]
lea rdx, str._hu._hu._hu._hu
lea rcx, [rbp - 0x80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.MSVCR100.dll_sscanf]
cmp eax, 4
jne 0x180218d46
movzx ecx, word [rsp + 0x7c]
movzx eax, word [rsp + 0x7e]
movzx r9d, word [rsp + 0x7a]
movzx r8d, word [rsp + 0x78]
movzx edi, r12w
lea rdx, str.Telling_server_to_connect_to__d._d._d._d:_d_n
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, rsi
call fcn.180203670
movzx ecx, word [rsp + 0x7c]
movzx eax, word [rsp + 0x7e]
movzx r9d, word [rsp + 0x7a]
movzx r8d, word [rsp + 0x78]
movzx edx, dil
mov dword [rsp + 0x38], edx
shr edi, 8
lea rdx, str.PORT__d__d__d__d__d__d
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov rcx, rbx
call fcn.1802180c0
test eax, eax
jne 0x180218d4b
test r15b, r15b
je 0x180218d0f
mov rcx, r13
call fcn.180213e30
mov dword [rbx + 0x42c], 1
mov byte [rbx + 0x1b1], 1
xor eax, eax
mov dword [rbx + 0x458], 0x1a
jmp 0x180218d4b
lea rdx, str.bind_2__failed_on_socket
jmp 0x180218d3e
lea rdx, str.socket_2__failed___s_
mov rcx, rsi
call fcn.180203720
mov eax, 0x1e
mov rcx, qword [rbp + 0x80]
xor rcx, rsp
call fcn.180227610
lea r11, [rsp + 0x190]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret