Function at 0x140078e50
Capabilities:
Connect socket
Get socket status
Resolve dns

Disassembly:
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0xd8
mov rax, qword [0x14012bc80]
xor rax, rsp
mov qword [rsp + 0xb8], rax
movsxd rax, dword [rcx + 8]
mov r15d, dword [rcx + 0x10]
xor r12d, r12d
mov esi, r9d
mov dword [rsp + 0x58], r9d
mov r14d, r8d
mov dword [rsp + 0x40], r8d
mov rdi, rdx
mov qword [rsp + 0x60], rdx
mov rbx, rcx
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x5c], r15d
test eax, eax
js 0x140078eb0
mov rcx, rax
call qword [sym.imp.WS2_32.dll_closesocket]
xor r9d, r9d
lea rcx, [rsp + 0x68]
xor edx, edx
lea r8d, [r9 + 0x30]
mov dword [rbx + 8], 0xffffffff
call fcn.14002a5a0
lea rdx, [0x14010fccc]
lea rcx, [rsp + 0x98]
mov r8d, r14d
mov qword [rsp + 0x68], 4
mov dword [rsp + 0x70], 1
call fcn.14000ca3c
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x68]
lea rdx, [rsp + 0x98]
mov rcx, rdi
mov dword [rbx + 0xc], r12d
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x140078f68
mov dword [rbx + 0xc], eax
mov qword [rsp + 0x30], r12
lea rbx, [0x140143520]
mov r9d, 0x400
mov r8d, eax
xor edx, edx
mov ecx, 0x12ff
mov dword [rsp + 0x28], 0x400
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
lea r8, [rsp + 0x98]
lea rcx, str.s_connectToPort:_Error__s_getting_addrinfo_for__s__s_n
mov r9, rdi
mov rdx, rbx
call fcn.140079220
xor eax, eax
jmp 0x1400791f0
mov qword [rsp + 0xd0], rbp
test esi, esi
je 0x140078f7b
mov dword [rbx + 0x10], 1
mov rcx, qword [rsp + 0x50]
mov rbp, rcx
test rcx, rcx
je 0x140079191
mov qword [rsp + 0xc8], r13
nop dword [rax]
nop dword [rax + rax]
mov dword [rbx + 0xc], 0
mov r8d, dword [rbp + 0xc]
mov edx, dword [rbp + 8]
mov ecx, dword [rbp + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov dword [rbx + 8], eax
test eax, eax
jns 0x140078fd0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r12d, dword [rbx + 8]
mov dword [rbx + 0xc], eax
jmp 0x14007916d
mov rcx, rbx
call fcn.140079230
movsxd rcx, dword [rbx + 8]
mov r8d, dword [rbp + 0x10]
mov rdx, qword [rbp + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
mov r12d, eax
test eax, eax
jns 0x14007917a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0xc], eax
test esi, esi
je 0x14007916d
add eax, 0xffffd8cd
xor r13d, r13d
cmp eax, 1
ja 0x140079158
mov ecx, 0x4e208
call fcn.140010258
mov r14, rax
test rax, rax
jne 0x14007903a
mov r14d, dword [rsp + 0x40]
mov dword [rbx + 0xc], 8
jmp 0x14007916d
xor r9d, r9d
xor edx, edx
mov r8d, 0x4e208
mov rcx, rax
call fcn.14002a5a0
mov dword [r14], r13d
mov eax, dword [rbx + 8]
mov qword [r14 + 8], rax
inc dword [r14]
mov eax, 0x431bde83
imul esi
mov edi, edx
mov ecx, esi
sar edi, 0x12
mov eax, edi
shr eax, 0x1f
add edi, eax
mov dword [rsp + 0x48], edi
imul eax, edi, 0xf4240
sub ecx, eax
mov dword [rsp + 0x4c], ecx
xor ecx, ecx
call fcn.14000ee4c
mov ecx, dword [rbx + 8]
xor r9d, r9d
mov r15, rax
lea rax, [rsp + 0x48]
mov r8, r14
inc ecx
xor edx, edx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
test eax, eax
jns 0x140079113
nop dword [rax]
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2714
jne 0x140079106
xor ecx, ecx
call fcn.14000ee4c
sub eax, r15d
cmp eax, edi
jg 0x1400790fd
mov ecx, edi
xor r9d, r9d
mov r8, r14
sub ecx, eax
lea rax, [rsp + 0x48]
xor edx, edx
mov dword [rsp + 0x48], ecx
mov ecx, dword [rbx + 8]
mov dword [rsp + 0x4c], r13d
inc ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
mov esi, eax
test eax, eax
js 0x1400790b0
jmp 0x140079113
mov dword [rbx + 0xc], 0x274c
jmp 0x14007910f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rbx + 0xc], eax
test esi, esi
js 0x14007913d
test esi, esi
jne 0x140079120
mov dword [rbx + 0xc], 0x274c
jmp 0x14007913d
movsxd rcx, dword [rbx + 8]
mov rdx, r14
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x14007913d
xor r12d, r12d
mov r13d, 1
mov dword [rbx + 0xc], r12d
mov rcx, r14
call fcn.1400108e4
mov rdi, qword [rsp + 0x60]
test r13d, r13d
jne 0x14007917a
mov esi, dword [rsp + 0x58]
mov r14d, dword [rsp + 0x40]
mov edx, dword [rbx + 0xc]
lea rcx, str.s_connectToPort:_Error__d_in_connect_to__d__s_n
mov r9, rdi
mov r8d, r14d
call fcn.140079220
mov rbp, qword [rbp + 0x28]
test rbp, rbp
jne 0x140078fa0
mov rcx, qword [rsp + 0x50]
mov r14d, dword [rsp + 0x40]
mov r15d, dword [rsp + 0x5c]
mov r13, qword [rsp + 0xc8]
mov dword [rbx + 0x10], r15d
test r12d, r12d
js 0x1400791bc
mov edx, dword [rbp + 0x10]
mov rcx, qword [rbp + 0x20]
call fcn.1400b4670
mov qword [rbx], rax
test rax, rax
jne 0x1400791c6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, qword [rsp + 0x50]
mov dword [rbx + 0xc], eax
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xor eax, eax
jmp 0x1400791e8
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
lea rcx, str.Client_connected_to__d__s_n
mov r8, rdi
mov edx, r14d
call fcn.140079220
mov eax, 1
mov rbp, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xb8]
xor rcx, rsp
call fcn.14000c9f0
add rsp, 0xd8
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
ret