Function at 0x180018c90
Capabilities:
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
mov r11, rsp
push rbx
push r13
sub rsp, 0x98
mov rax, qword [0x180064c28]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov qword [r11 + 0x10], rbp
mov rbx, rcx
mov qword [r11 + 0x18], rsi
mov ecx, 0x4002
mov qword [r11 + 0x20], rdi
mov qword [r11 - 0x18], r12
xor r12d, r12d
mov qword [r11 - 0x20], r14
mov r13d, r12d
mov r14d, r12d
mov dword [rsp + 0x38], r12d
mov ebp, r12d
mov qword [r11 - 0x28], r15
mov dword [rsp + 0x48], 1
call fcn.18002b67c
mov r10, qword [rbx + 0x10]
mov rdi, rax
mov qword [rsp + 0x30], rax
lea r15d, [r12 + 0x17]
test rax, rax
jne 0x180018d1e
mov rsi, qword [rsp + 0x30]
mov word [r10 + 0x118], 0x300
mov dword [rbx + 0xdc], reloc.WS2_32.dll_setsockopt
jmp 0x1800193f8
lea rsi, [rax + 2]
mov edi, reloc.WS2_32.dll_recv
lea rcx, [rsp + 0x3c]
mov dword [rsp + 0x3c], edi
mov qword [rsp + 0x28], rcx
lea rax, [rbx + 0x188]
mov rcx, qword [r10 + 0x38]
xor r9d, r9d
mov r8d, 0x4000
mov qword [rsp + 0x20], rax
mov rdx, rsi
call qword [0x180064898]
mov rcx, qword [rbx + 0x10]
lea rdx, [rbx + 0x178]
mov dword [rsp + 0x3c], edi
lea r8, [rsp + 0x3c]
mov r15d, eax
mov rcx, qword [rcx + 0x38]
call qword [sym.imp.WS2_32.dll_getsockname]
mov eax, 2
lea r8d, [rdi + 1]
mov edx, eax
mov ecx, eax
call qword [sym.ProxyProtocol.dll_so]
mov qword [rbx + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x180018da4
mov dword [rbx + 0xdc], 0x332
jmp 0x1800193ed
lea r8, [rsp + 0x48]
mov edx, 0x8004667e
mov rcx, rax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov rcx, qword [rbx + 0x70]
lea r9, [rsp + 0x48]
mov eax, 4
mov edx, 0xffff
mov r8d, eax
mov dword [rsp + 0x20], eax
call qword [0x180064870]
test eax, eax
je 0x180018dea
mov dword [rbx + 0xdc], 0x334
jmp 0x1800193ed
mov rcx, qword [rbx + 0x70]
lea rdx, [rbx + 0x178]
mov r8d, edi
call qword [0x180064840]
test eax, eax
je 0x180018e11
mov dword [rbx + 0xdc], 0x336
jmp 0x1800193ed
mov rax, qword [rbx + 0x10]
mov word [rax + 0x118], 0x300
test r15d, r15d
jns 0x180018e32
mov dword [rbx + 0xdc], 0x32d
jmp 0x1800193ed
lea eax, [r15 - 0xe]
mov byte [rsi + 0x3fff], bpl
cmp eax, 0x3da
ja 0x1800193e3
mov rax, qword [rbx + 0x10]
mov rcx, rbx
mov dword [rbx + 0xb4], 0x100000
call qword [rax + 0x28]
test eax, eax
je 0x180018e6b
mov dword [rbx + 0xdc], eax
jmp 0x1800193ed
cmp byte [rsi + 4], bpl
jne 0x1800193d7
cmp byte [rsi + 5], 1
jne 0x1800193d7
mov edi, listen
movsxd rax, edi
movzx ecx, byte [rax + rsi]
test cl, cl
je 0x180018e9c
inc edi
mov byte [rax + rsi], 0x2e
add edi, ecx
cmp edi, r15d
jl 0x180018e84
lea eax, [r15 - 4]
cmp edi, eax
jle 0x180018eb3
mov dword [rbx + 0xdc], 0x331
jmp 0x1800193ed
lea rcx, [rsi + 0xd]
call fcn.1800341e0
mov r13, rax
test rax, rax
jne 0x180018ed3
mov dword [rbx + 0xdc], reloc.WS2_32.dll_setsockopt
jmp 0x1800193ed
lea r14, [rsi + 0xc]
mov edx, 0x2e
lea rcx, [r14 + 1]
call fcn.180028ab0
mov rcx, rax
test rax, rax
je 0x180018f13
nop dword [rax]
movzx eax, cl
mov edx, 0x2e
sub al, r14b
dec al
mov byte [r14], al
mov r14, rcx
inc rcx
call fcn.180028ab0
mov rcx, rax
test rax, rax
jne 0x180018ef0
movsxd rcx, edi
movzx eax, dil
sub al, r14b
mov qword [rsp + 0x50], rcx
dec al
add al, sil
mov byte [r14], al
movzx ebp, byte [rcx + rsi + 1]
movzx eax, byte [rcx + rsi + 2]
shl ebp, 8
add ebp, eax
cmp ebp, 1
je 0x180018f43
cmp ebp, 0x1c
jne 0x180018f87
mov rax, qword [rbx + 0x10]
cmp dword [rax + 0x58], r12d
jne 0x180018f87
cmp ebp, 0x1c
mov dword [rsp + 0x28], r12d
mov ecx, 2
mov qword [rsp + 0x20], rbx
mov eax, reloc.WS2_32.dll_socket
lea r9, [rsp + 0x40]
cmove ecx, eax
lea r8, [rsp + 0x68]
mov rdx, r13
call sym.ProxyProtocol.dll_udpresolve
mov rcx, qword [rsp + 0x50]
mov r14d, eax
mov dword [rsp + 0x38], eax
jmp 0x180018f8a
mov r14d, r12d
mov edx, edi
mov r8d, edi
add edi, 5
mov dword [rsp + 0x44], edx
test r14d, r14d
je 0x180019039
mov word [rsi + 2], 0x8085
lea eax, [rdx + 8]
mov dword [rsi + 6], pe_nt_image_headers64
xorps xmm0, xmm0
mov word [rsi + 0xa], r12w
movsxd rdi, edi
add rdi, rsi
movups xmmword [rdi], xmm0
mov byte [rcx + rsi + 6], listen
movsxd rcx, eax
lea eax, [rdx + 0xa]
mov byte [rdi], 0xc0
mov byte [rcx + rsi], bpl
movsxd rcx, eax
mov byte [rcx + rsi], 1
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_htonl]
mov r15d, dword [rsp + 0x44]
mov r9d, 4
mov dword [rsp + 0x40], eax
mov r8d, reloc.WS2_32.dll_recv
mov edx, r8d
mov dword [rdi + 6], eax
cmp ebp, 1
lea eax, [r15 + 0x10]
movsxd rcx, eax
cmove edx, r9d
cmove r8d, r9d
mov byte [rcx + rsi], dl
lea rcx, [rdi + 0xc]
lea rdx, [rsp + 0x68]
call fcn.180028440
cmp ebp, 1
mov edi, 0x21
mov eax, reloc.WS2_32.dll_setsockopt
cmove edi, eax
add edi, r15d
jmp 0x180019392
cmp ebp, 0xc
jne 0x18001914b
lea rax, [rsp + 0x58]
mov rcx, r13
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x60]
lea rax, [rsp + 0x5c]
lea r8, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea rdx, str._u._u._u._u
call sym.ProxyProtocol.dll_sscanf
mov ecx, dword [rsp + 0x58]
shl ecx, 8
xor ecx, dword [rsp + 0x5c]
shl ecx, 8
xor ecx, dword [rsp + 0x60]
shl ecx, 8
xor ecx, dword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_htonl]
cmp word [rbx + 0x178], 2
mov r14d, eax
mov dword [rsp + 0x38], eax
jne 0x180019143
cmp eax, dword [rbx + 0x17c]
jne 0x180019143
mov edx, dword [rsp + 0x44]
xor eax, eax
mov word [rsi + 2], 0x8085
xorps xmm0, xmm0
mov dword [rsi + 6], pe_nt_image_headers64
mov word [rsi + 0xa], r12w
movsxd rdi, edi
add rdi, rsi
movups xmmword [rdi], xmm0
mov dword [rdi + 0x10], eax
lea eax, [rdx + 6]
movsxd rcx, eax
lea eax, [rdx + 8]
mov byte [rdi], 0xc0
mov byte [rcx + rsi], bpl
movsxd rcx, eax
lea eax, [rdx + 0xa]
mov byte [rcx + rsi], bpl
movsxd rcx, eax
mov byte [rcx + rsi], 1
mov ecx, 0xe10
call qword [sym.imp.WS2_32.dll_htonl]
mov edx, dword [rsp + 0x44]
mov dword [rsp + 0x40], eax
mov dword [rdi + 6], eax
lea eax, [rdx + 0x10]
movsxd rcx, eax
lea eax, [rdx + 0x11]
mov byte [rcx + rsi], 7
movsxd rcx, eax
mov byte [rcx + rsi], 6
mov eax, dword [str.3proxy]
mov dword [rdi + 0xd], eax
movzx eax, word [0x18004defc]
mov word [rdi + 0x11], ax
lea edi, [rdx + 0x19]
test r14d, r14d
jne 0x180019392
jmp 0x18001914b
mov r14d, r12d
mov dword [rsp + 0x38], r12d
cmp dword [sym.ProxyProtocol.dll_numservers], r12d
je 0x180019387
mov eax, dword [0x180065920]
mov ecx, 6
test eax, eax
mov r8d, reloc.WS2_32.dll_recvfrom
cmovne r8d, ecx
neg eax
mov ecx, 2
sbb edx, edx
add edx, 2
call qword [sym.ProxyProtocol.dll_so]
mov qword [rbx + 0x78], rax
cmp rax, 0xffffffffffffffff
jne 0x18001919a
mov dword [rbx + 0xdc], 0x332
jmp 0x1800193ed
lea rdx, [rbx + 0x198]
xorps xmm0, xmm0
movups xmmword [rdx], xmm0
movzx eax, word [sym.ProxyProtocol.dll_nservers]
mov r8d, reloc.WS2_32.dll_recv
mov rcx, qword [rbx + 0x78]
mov word [rdx], ax
call qword [0x180064840]
test eax, eax
je 0x1800191d4
mov dword [rbx + 0xdc], 0x333
jmp 0x1800193ed
movups xmm0, xmmword [sym.ProxyProtocol.dll_nservers]
movups xmmword [rbx + 0x1a8], xmm0
cmp dword [0x180065920], r12d
je 0x18001922d
mov rcx, qword [rbx + 0x78]
lea rdx, [rbx + 0x1a8]
mov r9d, 8
lea r8d, [r9 + 8]
call sym.ProxyProtocol.dll_connectwithpoll
test eax, eax
je 0x180019218
mov dword [rbx + 0xdc], 0x33e
jmp 0x1800193ed
movzx ecx, r15w
sub rsi, 2
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsi], ax
add r15d, 2
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
lea rdx, [rbx + 0x1a8]
mov rcx, qword [rbx + 0x78]
mov r9d, r15d
mov r8, rsi
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_socksendto
cmp eax, r15d
je 0x180019265
mov dword [rbx + 0xdc], 0x334
jmp 0x1800193ed
inc dword [rbx + 0x1dc]
lea rdx, [rbx + 0x1a8]
mov rcx, qword [rbx + 0x78]
mov r9d, 0x4000
movsxd rax, r15d
mov r8, rsi
add qword [rbx + 0x1c8], rax
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_sockrecvfrom
movsxd rdi, eax
cmp edi, 0xd
jg 0x1800192b3
mov dword [rbx + 0xdc], 0x335
jmp 0x1800193ed
add qword [rbx + 0x1d0], rdi
inc dword [rbx + 0x1d8]
cmp dword [0x180065920], r12d
je 0x18001933e
movzx ecx, word [rsi]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x1000
cmp ax, cx
jbe 0x1800192eb
mov dword [rbx + 0xdc], 0x341
jmp 0x1800193ed
add rsi, 2
movzx r14d, ax
sub edi, 2
cmp edi, r14d
jge 0x180019328
mov eax, dword [reloc.WS2_32.dll_getpeername]
mov r9d, r14d
mov dword [rsp + 0x28], eax
sub r9d, edi
movsxd r8, edi
mov edx, 1
add r8, rsi
mov dword [rsp + 0x20], r12d
mov rcx, rbx
call sym.ProxyProtocol.dll_sockgetlinebuf
add edi, eax
cmp edi, r14d
je 0x18001933e
mov r14d, dword [rsp + 0x38]
mov dword [rbx + 0xdc], 0x340
jmp 0x1800193ed
cmp byte [rsi + 6], r12b
jne 0x18001934a
cmp byte [rsi + 7], r12b
je 0x180019387
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
lea rdx, [rbx + 0x188]
mov rcx, qword [rbx + 0x70]
mov r9d, edi
mov r8, rsi
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_socksendto
mov r14d, dword [rsp + 0x38]
cmp eax, edi
mov ecx, 0x336
cmovne r12d, ecx
mov dword [rbx + 0xdc], r12d
jmp 0x1800193ed
mov r14d, dword [rsp + 0x38]
mov word [rsi + 2], 0x8385
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
lea rdx, [rbx + 0x188]
mov rcx, qword [rbx + 0x70]
mov r9d, edi
mov r8, rsi
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_socksendto
cmp eax, edi
je 0x1800193c6
mov dword [rbx + 0xdc], 0x333
jmp 0x1800193ed
test r14d, r14d
jne 0x1800193ed
mov dword [rbx + 0xdc], 0x378
jmp 0x1800193ed
mov dword [rbx + 0xdc], 0x330
jmp 0x1800193ed
mov dword [rbx + 0xdc], 0x32e
mov rdi, qword [rsp + 0x30]
mov r15d, reloc.WS2_32.dll_socket
cmp dword [rbx + 0xdc], 0x32d
mov r12, qword [rsp + 0x90]
je 0x180019477
test r13, r13
lea r9, [0x18004d577]
mov r8d, ebp
lea rdx, str._04x__s_
cmovne r9, r13
mov rcx, rsi
call sym.ProxyProtocol.dll_sprintf
test r14d, r14d
je 0x180019436
cmp ebp, 1
je 0x18001943b
cmp ebp, 0x1c
jne 0x18001946c
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rsi + r8], 0
jne 0x180019442
mov eax, 2
lea rdx, [rsp + 0x68]
add r8, rsi
cmp ebp, 1
cmove r15d, eax
lea r9d, [rax + 0x3e]
mov ecx, r15d
call sym.ProxyProtocol.dll_myinet_ntop
mov rdx, rsi
mov rcx, rbx
call sym.ProxyProtocol.dll_dolog
mov r15, qword [rsp + 0x80]
mov r14, qword [rsp + 0x88]
mov rsi, qword [rsp + 0xc0]
mov rbp, qword [rsp + 0xb8]
test rdi, rdi
je 0x1800194a4
mov rcx, rdi
call fcn.18002b668
mov rdi, qword [rsp + 0xc8]
test r13, r13
je 0x1800194b9
mov rcx, r13
call fcn.18002b668
mov rcx, rbx
call sym.ProxyProtocol.dll_freeparam
xor eax, eax
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.180027140
add rsp, 0x98
pop r13
pop rbx
ret