Function at 0x140058060
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xa0
mov rax, qword [0x14017b4c0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov rsi, qword [rbp + 0x77]
mov qword [rbp - 0x59], rsi
xor r15d, r15d
mov ebx, r15d
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x11], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 1], xmm1
mov qword [rbp - 0x19], 1
cmp qword [rdx + 0x10], r15
je 0x1400580c9
mov rbx, rdx
cmp qword [rdx + 0x18], 0xf
jbe 0x1400580bf
mov rbx, qword [rdx]
mov qword [rbp - 0x21], 4
jmp 0x1400580f1
cmp qword [reloc.WS2_32.dll_htons], rbx
je 0x1400580e9
lea rbx, str.localhost
cmp qword [reloc.WS2_32.dll_ntohs], 0xf
cmova rbx, qword [str.localhost]
mov dword [rbp - 0x1d], r9d
mov dword [rbp - 0x21], r15d
mov edx, 0x1f90
lea rcx, [rbp - 0x41]
call fcn.140002550
nop
lea rdx, [rbp - 0x41]
cmp qword [rbp - 0x29], 0xf
cmova rdx, qword [rbp - 0x41]
lea r9, [rbp - 0x51]
lea r8, [rbp - 0x21]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x1400581b6
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x140058162
inc rdx
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005815d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140058381
call fcn.1400ce56c
movdqa xmm0, xmmword [0x14015cbe0]
mov byte [rbp - 0x41], 0
movdqu xmmword [rbp - 0x31], xmm0
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x14005818c
cmp rcx, rsi
mov rax, qword [rcx]
setne dl
call qword [rax + reloc.WLDAP32.dll_Ordinal_32]
mov qword [rsi + 0x38], r15
mov rax, 0xffffffffffffffff
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.1400ce1f0
mov rbx, qword [rsp + 0xd0]
add rsp, 0xa0
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov rbx, qword [rbp - 0x51]
test rbx, rbx
je 0x1400582c4
movzx r14d, byte [rbp + 0x6f]
nop dword [rax + rax]
mov dword [rsp + 0x28], 0x81
mov dword [rsp + 0x20], r15d
xor r9d, r9d
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_WSASocketW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140058216
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1400582b3
test r14b, r14b
je 0x140058242
mov dword [rbp - 0x49], 1
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x49]
mov edx, 6
mov r8d, 1
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140058259
mov qword [rbp - 0x49], rdi
mov rax, qword [rcx]
lea rdx, [rbp - 0x49]
call qword [rax + reloc.WS2_32.dll_recv]
cmp dword [rbx + 4], 0x17
jne 0x140058283
mov dword [rbp - 0x49], r15d
mov dword [rsp + 0x20], 4
lea r9, [rbp - 0x49]
mov edx, reloc.WLDAP32.dll_Ordinal_41
mov r8d, reloc.WLDAP32.dll_Ordinal_27
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov r8d, dword [rbx + 0x10]
mov rdx, qword [rbx + 0x20]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x1400582aa
mov edx, 5
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x14005830d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x1400581d0
mov rbx, qword [rbp - 0x51]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x140058162
inc rdx
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005815d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140058381
jmp 0x14005815d
mov rcx, qword [rbp - 0x51]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
nop
mov rdx, qword [rbp - 0x29]
cmp rdx, 0xf
jbe 0x14005834f
inc rdx
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14005834a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140058381
call fcn.1400ce56c
movdqa xmm0, xmmword [0x14015cbe0]
movdqu xmmword [rbp - 0x31], xmm0
mov byte [rbp - 0x41], 0
mov rcx, qword [rsi + 0x38]
test rcx, rcx
je 0x140058379
mov rax, qword [rcx]
cmp rcx, rsi
setne dl
call qword [rax + reloc.WLDAP32.dll_Ordinal_32]
mov qword [rsi + 0x38], r15
mov rax, rdi
jmp 0x140058193
call fcn.1400e1a34
int3