Function at 0x180018dff
Capabilities:
Set socket configuration

Disassembly:
push rbp
sub rsp, 0x1a0
lea rbp, [rsp + 0x30]
mov qword [rsp], rax
mov rax, 0x19c
mov dword [rsp + rax], 0xcccccccc
sub rax, 4
cmp rax, 4
jg 0x180018e17
mov rax, qword [rsp]
mov dword [rsp], 0xcccccccc
mov dword [rsp + 4], 0xcccccccc
mov qword [rbp + 0x120], rsi
mov qword [rbp + 0x118], rbx
mov dword [rbp + 0x180], ecx
mov dword [rbp + 0x188], edx
mov dword [rbp + 0x190], r8d
mov dword [rbp + 0x198], r9d
mov rax, qword [0x1800f4ae8]
xor rax, rbp
mov qword [rbp + 0x160], rax
mov byte [rbp + 0x40], 0
mov byte [rbp + 0x41], 0
mov eax, dword [rbp + 0x188]
test eax, eax
jne 0x180018ee6
mov eax, 0x2726
mov rdx, qword [sym.imp.WS2_32.dll_WSASetLastError]
mov ecx, eax
call rdx
mov rax, 0xffffffffffffffff
mov qword [rbp + 0x98], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0x98]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
mov eax, dword [rbp + 0x198]
test eax, eax
je 0x1800191de
mov eax, dword [rbp + 0x1a0]
test eax, eax
je 0x1800191de
mov eax, dword [rbp + 0x198]
mov edx, dword [rbp + 0x1a0]
cmp eax, edx
jg 0x1800191de
mov eax, dword [rbp + 0x198]
mov edx, dword [rbp + 0x1a0]
mov ecx, eax
call fcn.18001b2bd
mov dword [rbp + 0x48], eax
mov eax, dword [rbp + 0x48]
mov dword [rbp + 0x4c], eax
mov eax, 0
cmp eax, 1
jne 0x180018f5f
jmp 0x18001939e
mov eax, dword [rbp + 0x198]
mov edx, dword [rbp + 0x1a0]
mov ecx, eax
call fcn.18001b2bd
mov dword [rbp + 0x68], eax
mov eax, dword [rbp + 0x68]
mov dword [rbp + 0x4c], eax
jmp 0x180018f32
mov eax, dword [rbp + 0x180]
mov ecx, eax
call fcn.1800176b0
mov qword [rbp + 0x88], rax
mov byte [rbp + 0x40], 1
mov rax, qword [rbp + 0x88]
mov qword [rbp + 0x30], rax
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x180018f99
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
test rax, rax
jge 0x180018ff2
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xa0], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xa0]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x180019009
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
mov edx, dword [rbp + 0x4c]
mov rcx, rax
call fcn.180018c06
mov dword [rbp + 0x60], eax
mov byte [rbp + 0x41], 1
mov eax, dword [rbp + 0x60]
mov dword [rbp + 0x58], eax
movzx eax, byte [rbp + 0x41]
test eax, eax
jne 0x18001903c
lea rax, [0x180101fd4]
mov rcx, rax
call fcn.180064a90
mov eax, dword [rbp + 0x58]
test eax, eax
jge 0x180019068
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov eax, 5
mov rdx, qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, eax
call rdx
jmp 0x180018f41
lea rax, [rbp + 0x130]
mov edx, 0
mov ecx, reloc.WS2_32.dll_recv
mov qword [rbp + 0xe0], rcx
mov rcx, rax
mov rax, qword [rbp + 0xe0]
mov r8, rax
call fcn.180062370
mov qword [rbp + 0x90], rax
mov word [rbp + 0x130], 2
mov eax, dword [rbp + 0x188]
mov dword [rbp + 0x134], eax
mov eax, dword [rbp + 0x190]
mov rdx, qword [sym.imp.WS2_32.dll_htons]
mov ecx, eax
call rdx
mov word [rbp + 0x44], ax
movzx eax, word [rbp + 0x44]
mov word [rbp + 0x132], ax
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x1800190e5
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
lea rdx, [rbp + 0x130]
mov ecx, reloc.WS2_32.dll_recv
mov rbx, qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0xe8], ecx
mov rcx, rax
mov eax, dword [rbp + 0xe8]
mov r8d, eax
call rbx
mov dword [rbp + 0x6c], eax
mov byte [rbp + 0x41], 1
mov eax, dword [rbp + 0x6c]
mov dword [rbp + 0x58], eax
movzx eax, byte [rbp + 0x41]
test eax, eax
jne 0x180019134
lea rax, [0x180101fd4]
mov rcx, rax
call fcn.180064a90
mov eax, dword [rbp + 0x58]
test eax, eax
jge 0x18001939e
mov rax, qword [sym.imp.WS2_32.dll_WSAGetLastError]
call rax
mov dword [rbp + 0x70], eax
mov eax, dword [rbp + 0x70]
mov dword [rbp + 0x74], eax
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov eax, dword [rbp + 0x74]
cmp eax, 0x2740
jne 0x180019180
mov eax, 5
mov rdx, qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, eax
call rdx
jmp 0x180018f41
mov eax, dword [rbp + 0x74]
mov rdx, qword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, eax
call rdx
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xa8], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xa8]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
mov eax, dword [rbp + 0x180]
mov ecx, eax
call fcn.1800176b0
mov qword [rbp + 0x78], rax
mov byte [rbp + 0x40], 1
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x30], rax
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x180019212
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
test rax, rax
jge 0x18001926b
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xb0], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xb0]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
lea rax, [rbp + 0x148]
mov edx, 0
mov ecx, reloc.WS2_32.dll_recv
mov qword [rbp + 0xf0], rcx
mov rcx, rax
mov rax, qword [rbp + 0xf0]
mov r8, rax
call fcn.180062370
mov qword [rbp + 0x80], rax
mov word [rbp + 0x148], 2
mov eax, dword [rbp + 0x188]
mov dword [rbp + 0x14c], eax
mov eax, dword [rbp + 0x190]
mov rdx, qword [sym.imp.WS2_32.dll_htons]
mov ecx, eax
call rdx
mov word [rbp + 0x42], ax
movzx eax, word [rbp + 0x42]
mov word [rbp + 0x14a], ax
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x1800192e8
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
lea rdx, [rbp + 0x148]
mov ecx, reloc.WS2_32.dll_recv
mov rbx, qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0xf8], ecx
mov rcx, rax
mov eax, dword [rbp + 0xf8]
mov r8d, eax
call rbx
mov dword [rbp + 0x50], eax
mov byte [rbp + 0x41], 1
mov eax, dword [rbp + 0x50]
mov dword [rbp + 0x58], eax
movzx eax, byte [rbp + 0x41]
test eax, eax
jne 0x180019337
lea rax, [0x180101fd4]
mov rcx, rax
call fcn.180064a90
mov eax, dword [rbp + 0x58]
test eax, eax
jge 0x18001939e
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xb8], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xb8]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
mov eax, dword [rbp + 0x180]
cmp eax, 6
jne 0x180019532
mov word [rbp + 8], 1
mov word [rbp + 0xa], 5
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x1800193d0
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
mov edx, 0xffff
mov ecx, 0x80
lea rbx, [rbp + 8]
mov dword [rsp + 0x20], 4
mov rsi, qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rbp + 0x100], ecx
mov rcx, rax
mov eax, dword [rbp + 0x100]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0x54], eax
mov eax, dword [rbp + 0x54]
test eax, eax
je 0x180019472
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xc0], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xc0]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
mov dword [rbp + 0x14], 1
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x180019490
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
mov edx, 6
mov ecx, 1
lea rbx, [rbp + 0x14]
mov dword [rsp + 0x20], 4
mov rsi, qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rbp + 0x108], ecx
mov rcx, rax
mov eax, dword [rbp + 0x108]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0x64], eax
mov eax, dword [rbp + 0x64]
test eax, eax
je 0x180019532
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xc8], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xc8]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
mov eax, dword [rbp + 0x180]
cmp eax, 0x11
jne 0x180019601
mov dword [rbp + 0x20], 0x40000
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x18001955f
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
mov edx, 0xffff
mov ecx, 0x1002
lea rbx, [rbp + 0x20]
mov dword [rsp + 0x20], 4
mov rsi, qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rbp + 0x110], ecx
mov rcx, rax
mov eax, dword [rbp + 0x110]
mov r8d, eax
mov r9, rbx
call rsi
mov dword [rbp + 0x5c], eax
mov eax, dword [rbp + 0x5c]
test eax, eax
je 0x180019601
mov byte [rbp + 0x40], 1
lea rax, [rbp + 0x30]
mov rcx, rax
call fcn.18001792c
mov rax, 0xffffffffffffffff
mov qword [rbp + 0xd0], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xd0]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret
movzx eax, byte [rbp + 0x40]
test eax, eax
jne 0x180019618
lea rax, [0x180101fd0]
mov rcx, rax
call fcn.180064a90
mov rax, qword [rbp + 0x30]
mov qword [rbp + 0xd8], rax
lea rax, reloc.WS2_32.dll_getsockname
mov rdx, rax
mov rcx, rbp
call fcn.180061140
mov rax, qword [rbp + 0x160]
xor rax, rbp
mov rcx, rax
call fcn.1800612f0
mov rax, qword [rbp + 0xd8]
mov rbx, qword [rbp + 0x118]
mov rsi, qword [rbp + 0x120]
lea rsp, [rbp + 0x170]
pop rbp
ret