Function at 0x1800078e0
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x288
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov rax, qword [0x180049170]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov r13d, r9d
mov ebp, r8d
mov rdi, rcx
or rsi, 0xffffffffffffffff
mov qword [rcx], rsi
mov rcx, rdx
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rbx, rax
test rax, rax
je 0x180007d18
mov edx, 1
lea r8d, [rdx + 5]
mov r12d, 2
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi], rax
cmp rax, 0xffffffffffffffff
jne 0x180007958
xor eax, eax
jmp 0x180007d18
mov word [rsp + 0x260], r12w
movzx ecx, bp
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x262], ax
mov rax, qword [rbx + 0x18]
mov rdx, qword [rax]
mov eax, dword [rdx]
mov dword [rsp + 0x264], eax
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x1800079b2
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x180007d18
mov r12d, dword [rsp + 0x2e0]
test r12d, r12d
je 0x180007ad9
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, rax
lea rax, vtable.CLock.0
mov qword [rsp + 0x30], rax
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rdx, qword [0x18004ab68]
mov r8, qword [0x18004ab60]
lea ecx, [r8 + rdx]
test cl, 1
jne 0x180007a42
lea rax, [rdx + 2]
shr rax, 1
mov rcx, qword [0x18004ab58]
cmp rcx, rax
ja 0x180007a49
mov edx, 1
lea rcx, [0x18004ab30]
call fcn.1800076c0
mov rdx, qword [0x18004ab68]
mov r8, qword [0x18004ab60]
mov rcx, qword [0x18004ab58]
jmp 0x180007a49
mov rcx, qword [0x18004ab58]
lea rbp, [rdx + r8]
mov rbx, rbp
shr rbx, 1
cmp rcx, rbx
ja 0x180007a5b
sub rbx, rcx
mov rax, qword [0x18004ab50]
cmp qword [rax + rbx*8], 0
jne 0x180007a8c
mov ecx, reloc.WS2_32.dll_recv
call fcn.18000b8ac
mov rcx, qword [0x18004ab50]
mov qword [rcx + rbx*8], rax
mov rdx, qword [0x18004ab68]
mov rax, qword [0x18004ab50]
and ebp, 1
mov rax, qword [rax + rbx*8]
lea rcx, [rax + rbp*8]
test rcx, rcx
je 0x180007aa6
mov qword [rcx], rsi
mov rdx, qword [0x18004ab68]
inc rdx
mov qword [0x18004ab68], rdx
cmp rdx, 1
jne 0x180007ac0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
nop
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or edx, 0xffffffff
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x260]
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_connect]
mov eax, 0x10624dd3
mul r13d
shr edx, 6
mov dword [rsp + 0x40], edx
imul edx, edx, 0x3e8
sub r13d, edx
imul r13d, r13d, 0x3e8
mov dword [rsp + 0x44], r13d
mov rax, qword [rdi]
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x50], 1
lea ecx, [rax + 1]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x50]
xor edx, edx
call qword [sym.imp.WS2_32.dll_select]
mov ebx, eax
xor ebp, ebp
mov dword [rsp + 0x30], ebp
lea r8, [rsp + 0x30]
mov edx, 0x8004667e
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x180007c5f
test ebx, ebx
jle 0x180007c5f
lea rdx, [rsp + 0x50]
mov rcx, qword [rdi]
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x180007c5f
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
lea edx, [rbp + 6]
lea r8d, [rbp + 1]
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_setsockopt]
test r12d, r12d
je 0x180007c55
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x18004ab68]
test r11, r11
je 0x180007bfa
mov rcx, qword [0x18004ab60]
inc rcx
mov rax, qword [0x18004ab58]
add rax, rax
cmp rax, rcx
cmovbe rcx, rbp
sub r11, 1
mov qword [0x18004ab68], r11
cmove rcx, rbp
mov qword [0x18004ab60], rcx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x18004ab68]
test r11, r11
je 0x180007c48
mov rbx, qword [0x18004ab60]
lea rax, [r11 + rbx]
cmp rbx, rax
jbe 0x180007c24
call fcn.18001d178
mov rdx, qword [0x18004ab30]
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x38], rbx
lea rcx, [rsp + 0x30]
call fcn.1800074b0
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x180007d18
mov rcx, qword [rdi]
call qword [sym.imp.WS2_32.dll_closesocket]
test r12d, r12d
je 0x180007d16
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r11, qword [0x18004ab68]
test r11, r11
je 0x180007cbb
mov rcx, qword [0x18004ab60]
inc rcx
mov rax, qword [0x18004ab58]
add rax, rax
cmp rax, rcx
cmovbe rcx, rbp
sub r11, 1
mov qword [0x18004ab68], r11
cmove rcx, rbp
mov qword [0x18004ab60], rcx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r11, qword [0x18004ab68]
test r11, r11
je 0x180007d09
mov rbx, qword [0x18004ab60]
lea rax, [r11 + rbx]
cmp rbx, rax
jbe 0x180007ce5
call fcn.18001d178
mov rax, qword [0x18004ab30]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rbx
lea rcx, [rsp + 0x30]
call fcn.1800074b0
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_SetEvent]
lea rcx, [0x180048208]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.18001d8a0
add rsp, 0x288
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret