Function at 0x1800187c0
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 + 0x30], r12d
mov ebp, r12d
mov qword [r11 - 0x28], r15
mov dword [rsp + 0x48], 1
call fcn.18002b164
mov rdi, rax
mov qword [rsp + 0x38], rax
mov rax, qword [rbx + 0x10]
lea r15d, [r12 + 0x17]
test rdi, rdi
jne 0x180018851
mov rsi, qword [rsp + 0x38]
mov ecx, 0x300
mov word [rax + 0x118], cx
mov eax, reloc.WS2_32.dll_setsockopt
mov dword [rbx + 0xdc], eax
jmp 0x180018f33
lea rsi, [rdi + 2]
xor r9d, r9d
lea rdx, [rsp + 0x40]
mov edi, reloc.WS2_32.dll_recv
mov qword [rsp + 0x28], rdx
lea rcx, [rbx + 0x188]
mov dword [rsp + 0x40], edi
mov r8d, 0x4000
mov qword [rsp + 0x20], rcx
mov rdx, rsi
mov rcx, qword [rax + 0x38]
call qword [0x180064a68]
mov rcx, qword [rbx + 0x10]
lea rdx, [rbx + 0x178]
mov dword [rsp + 0x40], edi
lea r8, [rsp + 0x40]
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 0x1800188d7
mov dword [rbx + 0xdc], 0x332
jmp 0x180018f28
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 [0x180064a40]
test eax, eax
je 0x18001891d
mov dword [rbx + 0xdc], 0x334
jmp 0x180018f28
mov rcx, qword [rbx + 0x70]
lea rdx, [rbx + 0x178]
mov r8d, edi
call qword [0x180064a10]
test eax, eax
je 0x180018945
mov ecx, 0x336
mov dword [rbx + 0xdc], ecx
jmp 0x180018f28
mov rax, qword [rbx + 0x10]
mov ecx, 0x300
mov word [rax + 0x118], cx
test r15d, r15d
jns 0x180018969
mov dword [rbx + 0xdc], 0x32d
jmp 0x180018f28
lea eax, [r15 - 0xe]
mov byte [rsi + 0x3fff], bpl
cmp eax, 0x3da
ja 0x180018f1e
mov rax, qword [rbx + 0x10]
mov rcx, rbx
mov dword [rbx + 0xb4], 0x100000
call qword [rax + 0x28]
test eax, eax
je 0x1800189a2
mov dword [rbx + 0xdc], eax
jmp 0x180018f28
cmp byte [rsi + 4], bpl
jne 0x180018f12
cmp byte [rsi + 5], 1
jne 0x180018f12
mov edi, listen
nop dword [rax + rax]
movsxd rax, edi
movzx ecx, byte [rax + rsi]
test cl, cl
je 0x1800189d8
inc edi
mov byte [rax + rsi], 0x2e
add edi, ecx
cmp edi, r15d
jl 0x1800189c0
lea eax, [r15 - 4]
cmp edi, eax
jle 0x1800189ef
mov dword [rbx + 0xdc], 0x331
jmp 0x180018f28
lea rcx, [rsi + 0xd]
call fcn.180033cd0
mov r13, rax
test rax, rax
jne 0x180018a10
mov eax, reloc.WS2_32.dll_setsockopt
mov dword [rbx + 0xdc], eax
jmp 0x180018f28
lea r14, [rsi + 0xc]
mov edx, 0x2e
lea rcx, [r14 + 1]
call fcn.180028598
mov rcx, rax
test rax, rax
je 0x180018a53
nop word [rax + rax]
movzx eax, cl
mov edx, 0x2e
sub al, r14b
dec al
mov byte [r14], al
mov r14, rcx
inc rcx
call fcn.180028598
mov rcx, rax
test rax, rax
jne 0x180018a30
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 0x180018a83
cmp ebp, 0x1c
jne 0x180018ac4
mov rax, qword [rbx + 0x10]
cmp dword [rax + 0x58], r12d
jne 0x180018ac4
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 + 0x44]
cmove ecx, eax
lea r8, [rsp + 0x68]
mov rdx, r13
call sym.ProxyProtocol.dll_udpresolve
mov rcx, qword [rsp + 0x50]
mov dword [rsp + 0x30], eax
jmp 0x180018ac7
mov eax, r12d
mov edx, edi
mov r14d, edi
add edi, 5
test eax, eax
je 0x180018b6d
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, [r14 + 0xa]
mov byte [rdi], 0xc0
mov byte [rcx + rsi], bpl
movsxd rcx, eax
mov byte [rcx + rsi], 1
mov ecx, dword [rsp + 0x44]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x44], eax
mov r9d, 4
mov dword [rdi + 6], eax
mov r8d, reloc.WS2_32.dll_recv
mov edx, r8d
lea eax, [r14 + 0x10]
movsxd rcx, eax
cmp ebp, 1
cmove edx, r9d
cmove r8d, r9d
mov byte [rcx + rsi], dl
lea rcx, [rdi + 0xc]
lea rdx, [rsp + 0x68]
call fcn.180027f20
cmp ebp, 1
mov edi, 0x21
mov eax, reloc.WS2_32.dll_setsockopt
cmove edi, eax
add edi, r14d
jmp 0x180018ec8
cmp ebp, 0xc
jne 0x180018c81
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 dword [rsp + 0x30], eax
jne 0x180018c77
cmp eax, dword [rbx + 0x17c]
jne 0x180018c77
mov word [rsi + 2], 0x8085
xor eax, eax
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 dword [rdi + 0x10], eax
lea eax, [r14 + 6]
movsxd rcx, eax
lea eax, [r14 + 8]
mov byte [rdi], 0xc0
mov byte [rcx + rsi], bpl
movsxd rcx, eax
lea eax, [r14 + 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 dword [rsp + 0x44], eax
mov dword [rdi + 6], eax
lea eax, [r14 + 0x10]
movsxd rcx, eax
lea eax, [r14 + 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, [r14 + 0x19]
mov r14d, dword [rsp + 0x30]
test r14d, r14d
jne 0x180018ecd
jmp 0x180018c86
mov r14d, r12d
mov dword [rsp + 0x30], r12d
jmp 0x180018c86
mov r14d, dword [rsp + 0x30]
cmp dword [sym.ProxyProtocol.dll_numservers], r12d
je 0x180018ec2
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 0x180018cd5
mov dword [rbx + 0xdc], 0x332
jmp 0x180018f28
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 [0x180064a10]
test eax, eax
je 0x180018d0f
mov dword [rbx + 0xdc], 0x333
jmp 0x180018f28
movups xmm0, xmmword [sym.ProxyProtocol.dll_nservers]
movups xmmword [rbx + 0x1a8], xmm0
cmp dword [0x180065920], r12d
je 0x180018d68
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 0x180018d53
mov dword [rbx + 0xdc], 0x33e
jmp 0x180018f28
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 0x180018da0
mov dword [rbx + 0xdc], 0x334
jmp 0x180018f28
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 0x180018dee
mov dword [rbx + 0xdc], 0x335
jmp 0x180018f28
add qword [rbx + 0x1d0], rdi
inc dword [rbx + 0x1d8]
cmp dword [0x180065920], r12d
je 0x180018e79
movzx ecx, word [rsi]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x1000
cmp ax, cx
jbe 0x180018e26
mov dword [rbx + 0xdc], 0x341
jmp 0x180018f28
add rsi, 2
movzx r14d, ax
sub edi, 2
cmp edi, r14d
jge 0x180018e63
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 0x180018e79
mov r14d, dword [rsp + 0x30]
mov dword [rbx + 0xdc], 0x340
jmp 0x180018f28
cmp byte [rsi + 6], r12b
jne 0x180018e85
cmp byte [rsi + 7], r12b
je 0x180018ec2
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 + 0x30]
cmp eax, edi
mov ecx, 0x336
cmovne r12d, ecx
mov dword [rbx + 0xdc], r12d
jmp 0x180018f28
mov word [rsi + 2], 0x8385
mov r14d, dword [rsp + 0x30]
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 0x180018f01
mov dword [rbx + 0xdc], 0x333
jmp 0x180018f28
test r14d, r14d
jne 0x180018f28
mov dword [rbx + 0xdc], 0x378
jmp 0x180018f28
mov dword [rbx + 0xdc], 0x330
jmp 0x180018f28
mov dword [rbx + 0xdc], 0x32e
mov rdi, qword [rsp + 0x38]
mov r15d, reloc.WS2_32.dll_socket
cmp dword [rbx + 0xdc], 0x32d
mov r12, qword [rsp + 0x90]
je 0x180018fb5
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 0x180018f71
cmp ebp, 1
je 0x180018f76
cmp ebp, 0x1c
jne 0x180018faa
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp byte [rsi + r8], 0
jne 0x180018f80
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 0x180018fe2
mov rcx, rdi
call fcn.18002b150
mov rdi, qword [rsp + 0xc8]
test r13, r13
je 0x180018ff7
mov rcx, r13
call fcn.18002b150
mov rcx, rbx
call sym.ProxyProtocol.dll_freeparam
xor eax, eax
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.180026c20
add rsp, 0x98
pop r13
pop rbx
ret