Function at 0x180025980
Capabilities:
Set socket configuration

Disassembly:
push rbp
push r13
push r15
lea rbp, [rsp - 0xfd0]
mov eax, 0x10d0
call fcn.1800273e0
sub rsp, rax
mov rax, qword [0x180065c40]
xor rax, rsp
mov qword [rbp + 0xf90], rax
mov r15d, ecx
mov dword [rsp + 0x38], ecx
mov rcx, qword [rbp + 0x1010]
mov r13, rdx
mov qword [rsp + 0x30], rcx
lea r10, sym.ProxyProtocol.dll_dns6_table
mov qword [rsp + 0x68], r9
mov qword [rsp + 0x58], r8
mov qword [rsp + 0x48], rdx
cmp r15d, 2
jne 0x1800259f3
lea rcx, sym.ProxyProtocol.dll_dns_table
call sym.ProxyProtocol.dll_hashresolv
test eax, eax
je 0x180025a09
jmp 0x180026196
cmp r15d, 0x17
jne 0x180025a0e
mov rcx, r10
call sym.ProxyProtocol.dll_hashresolv
test eax, eax
jne 0x180026196
mov rcx, qword [rsp + 0x30]
mov qword [rsp + 0x10b8], rdi
mov edi, dword [rbp + 0x1018]
test edi, edi
je 0x180025a2e
cmp dword [0x180067d84], 0
mov eax, 1
jne 0x180025a34
mov eax, dword [sym.ProxyProtocol.dll_numservers]
mov qword [rsp + 0x10c8], rbx
cdqe
mov qword [rsp + 0x10c0], rsi
mov qword [rsp + 0x10b0], r12
mov qword [rsp + 0x10a8], r14
mov qword [rsp + 0x60], rax
test rax, rax
jle 0x18002616c
lea rax, [sym.ProxyProtocol.dll_nservers]
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x40], rax
lea rsi, [rbp - 0x7e]
mov r9d, 6
test rcx, rcx
je 0x180025a9c
test edi, edi
jne 0x180025a9c
lea rbx, [rcx + 0x198]
lea r15, [rcx + 0x1a8]
jmp 0x180025abd
lea rbx, [rsp + 0x70]
test rcx, rcx
je 0x180025ab3
test edi, edi
jne 0x180025ab3
lea r15, [rcx + 0x1a8]
jmp 0x180025abd
lea r15, [rsp + 0x70]
lea rbx, [rsp + 0x70]
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [rbx], xmm0
movups xmmword [r15], xmm1
test edi, edi
je 0x180025ae7
cmp dword [0x180067d84], 0
je 0x180025ae7
mov r12d, dword [0x180067d90]
movzx eax, word [0x180067d80]
jmp 0x180025aee
mov r12d, dword [rax + 0x10]
movzx eax, word [rax]
mov word [rbx], ax
test r12d, r12d
mov r8d, reloc.WS2_32.dll_recvfrom
mov eax, r12d
cmovne r8d, r9d
mov ecx, 2
neg eax
sbb edx, edx
add edx, 2
call qword [sym.ProxyProtocol.dll_so]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x18002616c
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rbx
mov rcx, rax
call qword [0x180065840]
test eax, eax
jne 0x180026155
test edi, edi
je 0x180025b4f
cmp dword [0x180067d84], eax
je 0x180025b4f
movups xmm0, xmmword [0x180067d80]
jmp 0x180025b57
mov rax, qword [rsp + 0x40]
movups xmm0, xmmword [rax]
movups xmmword [r15], xmm0
test r12d, r12d
je 0x180025ba2
mov r9d, 8
mov rdx, r15
mov rcx, r14
lea r8d, [r9 + 8]
call sym.ProxyProtocol.dll_connectwithpoll
test eax, eax
jne 0x180026155
lea r9, [rsp + 0x3c]
mov dword [rsp + 0x3c], 1
lea edx, [rax + 6]
mov dword [rsp + 0x20], 4
lea r8d, [rax + 1]
mov rcx, r14
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdi, 0xffffffffffffffff
nop dword [rax]
inc rdi
cmp byte [rdi + r13], 0
jne 0x180025bb0
mov edx, edi
mov rcx, r13
call sym.ProxyProtocol.dll_myrand
mov rdx, qword [rsp + 0x48]
lea rcx, [rbp - 0x71]
mov r13d, eax
mov qword [rbp - 0x7c], 0x1000001
mov eax, 0xff
mov word [rbp - 0x7e], r13w
cmp edi, eax
mov word [rbp - 0x74], 0
cmovg edi, eax
movsxd rbx, edi
mov r8, rbx
call fcn.18004cb20
mov byte [rbp + rbx - 0x71], 0
lea rcx, [rbp - 0x71]
mov edx, 0x2e
lea rbx, [rbp - 0x72]
add edi, 0xd
call fcn.180027f20
test rax, rax
je 0x180025c3f
nop word [rax + rax]
movzx ecx, al
mov edx, 0x2e
sub cl, bl
dec cl
mov byte [rbx], cl
lea rcx, [rax + 1]
mov rbx, rax
call fcn.180027f20
test rax, rax
jne 0x180025c20
movzx eax, dil
inc edi
sub al, bl
dec al
add al, sil
mov byte [rbx], al
movsxd rax, edi
inc edi
cmp dword [rbp + 0x1018], 1
mov byte [rbp + rax - 0x7e], 0
jne 0x180025c68
mov ecx, listen
jmp 0x180025c7a
cmp dword [rsp + 0x38], 0x17
mov ecx, 1
mov eax, 0x1c
cmove ecx, eax
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x7e], cl
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x7e], 0
movsxd rax, edi
inc edi
mov byte [rbp + rax - 0x7e], 1
test r12d, r12d
je 0x180025cb0
movzx ecx, di
lea rsi, [rbp - 0x80]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x80], ax
add edi, 2
imul eax, dword [reloc.WS2_32.dll_getpeername], 0x3e8
mov r9d, edi
mov r8, rsi
mov rdx, r15
mov rcx, r14
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_socksendto
cmp eax, edi
je 0x180025cef
mov edx, 2
mov rcx, r14
call qword [0x1800658a0]
mov rcx, r14
call qword [0x1800658a8]
jmp 0x180025f2d
cmp qword [rsp + 0x30], 0
je 0x180025d08
movsxd rax, edi
mov rdi, qword [rsp + 0x30]
add qword [rdi + 0x1c8], rax
jmp 0x180025d0d
mov rdi, qword [rsp + 0x30]
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
mov r9d, 0x1000
mov r8, rsi
mov rdx, r15
mov rcx, r14
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_sockrecvfrom
mov edx, 2
movsxd rbx, eax
mov rcx, r14
call qword [0x1800658a0]
mov rcx, r14
call qword [0x1800658a8]
cmp ebx, 0xd
jle 0x180025f2d
test rdi, rdi
je 0x180025d5e
add qword [rdi + 0x1d0], rbx
test r12d, r12d
je 0x180025dba
movzx ecx, word [rsi]
call qword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x1000
sub ebx, 2
add rsi, 2
cmp ax, cx
ja 0x180025f2d
movzx edi, ax
cmp edi, ebx
jl 0x180025f2d
jle 0x180025dba
imul eax, dword [reloc.WS2_32.dll_ntohs], 0x3e8
sub edi, ebx
movsxd r8, ebx
mov r9d, edi
add r8, rsi
mov rdx, r15
mov rcx, r14
mov dword [rsp + 0x20], eax
call sym.ProxyProtocol.dll_sockrecvfrom
cmp eax, edi
jne 0x180025f2d
cmp word [rsi], r13w
jne 0x180025f2d
movzx r8d, byte [rsi + 6]
mov r10d, 0x100
movzx eax, byte [rsi + 7]
imul r8d, r10d
add r8w, ax
cmp r8w, 1
jb 0x18002616c
movzx edx, byte [rsi + 4]
movzx eax, byte [rsi + 5]
imul edx, r10d
add dx, ax
cmp dx, 1
jne 0x180025f2d
mov edx, reloc.WS2_32.dll_listen
cmp ebx, edx
jle 0x180025e1e
lea rax, [rsi + 0xd]
nop dword [rax]
cmp byte [rax], 0
je 0x180025e1e
inc edx
inc rax
cmp edx, ebx
jl 0x180025e10
add edx, 5
cmp edx, ebx
jge 0x180025f2d
mov r9d, 0xff
cmp r8w, r9w
jbe 0x180025e39
movzx r8d, r9w
xor r10d, r10d
movzx r14d, r8w
test r14d, r14d
je 0x180025f2d
mov r15d, dword [rsp + 0x38]
mov r13d, reloc.WS2_32.dll_recv
cmp r15d, 0x17
mov r11d, r13d
mov r12d, 0x1c
cmove r11d, r12d
movsxd rax, edx
movzx eax, byte [rax + rsi]
cmp al, 0xc0
jae 0x180025e92
test al, al
je 0x180025e92
movzx r8d, al
lea eax, [r8 + 0xe]
add eax, edx
cmp eax, ebx
jge 0x180025e92
inc edx
add edx, r8d
movsxd rax, edx
movzx eax, byte [rax + rsi]
cmp al, 0xc0
jb 0x180025e70
movsxd rax, edx
cmp byte [rax + rsi], 0
jne 0x180025e9d
dec edx
lea eax, [r11 + rdx]
cmp eax, ebx
jg 0x180025f2d
movsxd r8, edx
add edx, 0xc
movzx r9d, byte [r8 + rsi + 0xa]
lea rdi, [r8 + rsi]
movzx eax, byte [rdi + 0xb]
shl r9d, 8
add r9d, eax
add edx, r9d
cmp edx, ebx
jg 0x180025f2d
cmp dword [rbp + 0x1018], 1
je 0x180025f0f
cmp byte [r8 + rsi + 2], 0
jne 0x180025f21
movzx ecx, byte [rdi + 3]
cmp r15d, 0x17
mov eax, 1
cmove eax, r12d
cmp ecx, eax
jne 0x180025f21
cmp r15d, 0x17
mov r12d, 4
mov eax, r12d
cmove eax, r13d
cmp r9d, eax
je 0x180025f68
mov r12d, 0x1c
jmp 0x180025f21
cmp byte [r8 + rsi + 2], 0
jne 0x180025f21
cmp byte [rdi + 3], 0xc
je 0x1800260db
inc r10d
cmp r10d, r14d
jl 0x180025e65
mov rdx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x40]
inc rdx
add rax, 0x14
mov qword [rsp + 0x50], rdx
mov qword [rsp + 0x40], rax
cmp rdx, qword [rsp + 0x60]
jge 0x18002616c
mov rcx, qword [rsp + 0x30]
mov edi, dword [rbp + 0x1018]
mov r13, qword [rsp + 0x48]
jmp 0x180025a79
mov ecx, dword [rdi + 6]
call qword [sym.imp.WS2_32.dll_ntohl]
cmp r15d, 0x17
lea rdx, [rdi + 0xc]
mov esi, eax
cmove r12, r13
mov r8, r12
mov r12, qword [rsp + 0x58]
mov rcx, r12
call fcn.18004cb20
lea ecx, [rsi - 0x3c]
mov eax, 0x12c
cmp ecx, 0xa884
lea r14, sym.ProxyProtocol.dll_dns_table
lea rcx, [0x1800682c0]
cmova esi, eax
lea rax, sym.ProxyProtocol.dll_dns6_table
mov edi, esi
add rdi, qword [0x180065a58]
cmp r15d, 0x17
cmove r14, rax
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test r12, r12
je 0x1800260b8
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x1800260b8
cmp qword [r14 + 0x18], 0
je 0x1800260b8
mov rbx, qword [r14 + 0x28]
test rbx, rbx
je 0x1800260b8
mov rax, qword [rbx + 0x18]
lea r8, [r14 + 8]
mov rdx, rbx
mov qword [r14 + 0x28], rax
call sym.ProxyProtocol.dll_nametohash
mov r8d, dword [r14 + 4]
lea rcx, [rbx + 0x20]
mov rdx, r12
call fcn.18004cb20
mov qword [rbx + 0x10], rdi
xor edx, edx
xor r9d, r9d
mov qword [rbx + 0x18], r9
imul ecx, dword [rbx + 8], 0x11
imul eax, dword [rbx + 0xc], 0x1d
add eax, ecx
imul ecx, dword [rbx + 4], 7
add eax, ecx
mov ecx, dword [r14]
add eax, dword [rbx]
shr ecx, 2
div ecx
lea r8, [rdx*8]
mov rdx, qword [r14 + 0x18]
add rdx, r8
mov rcx, qword [rdx]
test rcx, rcx
je 0x1800260a4
nop dword [rax]
mov rax, qword [0x180065a58]
cmp qword [rcx + 0x10], rax
jl 0x180026085
mov rax, qword [rbx]
cmp rax, qword [rcx]
jne 0x18002607f
mov rax, qword [rbx + 8]
cmp rax, qword [rcx + 8]
je 0x180026085
lea rdx, [rcx + 0x18]
jmp 0x18002609c
mov rax, qword [rcx + 0x18]
mov qword [rdx], rax
mov qword [rcx + 0x10], r9
mov rax, qword [r14 + 0x28]
mov qword [rcx + 0x18], rax
mov qword [r14 + 0x28], rcx
mov rcx, qword [rdx]
test rcx, rcx
jne 0x180026060
mov rax, qword [r14 + 0x18]
mov rcx, qword [r8 + rax]
mov qword [rbx + 0x18], rcx
mov rax, qword [r14 + 0x18]
mov qword [r8 + rax], rbx
lea rcx, [0x1800682c0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1800260d1
mov dword [rcx], esi
mov eax, 1
jmp 0x18002616e
movsxd rdx, ebx
lea rcx, [rdi + 0xc]
add rdx, 0xc
add rdx, r8
add rdx, rsi
cmp rcx, rdx
jae 0x180026106
movzx eax, byte [rcx]
test al, al
je 0x180026106
mov byte [rcx], 0x2e
inc rcx
add rcx, rax
cmp rcx, rdx
jb 0x1800260f1
mov rbx, qword [rsp + 0x30]
mov byte [rcx], 0
mov rcx, qword [rbx + 0x118]
test rcx, rcx
je 0x18002611f
call fcn.18002baa0
lea rcx, [rdi + 0xd]
call fcn.180034620
mov r8, qword [rsp + 0x58]
xor r9d, r9d
mov rdx, rax
mov dword [rsp + 0x28], 2
mov ecx, r15d
mov qword [rbx + 0x118], rax
mov qword [rsp + 0x20], 0
call sym.ProxyProtocol.dll_udpresolve
jmp 0x18002616e
mov edx, 2
mov rcx, r14
call qword [0x1800658a0]
mov rcx, r14
call qword [0x1800658a8]
xor eax, eax
mov r12, qword [rsp + 0x10b0]
mov rbx, qword [rsp + 0x10c8]
mov rsi, qword [rsp + 0x10c0]
mov r14, qword [rsp + 0x10a8]
mov rdi, qword [rsp + 0x10b8]
mov rcx, qword [rbp + 0xf90]
xor rcx, rsp
call fcn.180027110
add rsp, 0x10d0
pop r15
pop r13
pop rbp
ret