Function at 0x140034680
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x4e8
mov rbp, rcx
mov qword [rsp + 0xa0], rdx
mov qword [rsp + 0xa8], r8
lea rcx, [rsp + 0xd8]
call fcn.14008b669
cmp dword [rsp + 0xd8], 1
mov rsi, qword [rsp + 0xe8]
mov rdi, qword [rsp + 0xe0]
jne 0x1400346e2
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rsi
mov qword [rbp], 1
jmp 0x140034de7
mov r15, qword [rsp + 0xf0]
mov rbx, qword [rsp + 0xf8]
cmp r15, rdi
mov qword [rsp + 0x40], rbp
je 0x140034795
sub rbx, r15
mov r14, rbx
sar r14, 5
mov rax, rsi
shr rax, 1
cmp r14, rax
jae 0x1400347a6
mov rax, qword [0x14043d8c0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0xd8], rax
xorps xmm0, xmm0
movups xmmword [rsp + 0xe0], xmm0
test rbx, rbx
jne 0x140034e17
xor r12d, r12d
mov rcx, r12
shl rcx, 5
add rcx, qword [rsp + 0x38]
mov rdx, r15
mov r8, rbx
call fcn.1400931b0
test rsi, rsi
je 0x140034777
shl rsi, 5
je 0x140034777
mov rcx, qword [0x140443578]
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
add r12, r14
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x48], rax
mov rdi, r12
shl rdi, 5
jne 0x1400347ce
jmp 0x140034bf0
mov qword [rsp + 0x48], rsi
sub rbx, rdi
sar rbx, 5
mov r12, rbx
jmp 0x1400347bc
mov qword [rsp + 0x48], rsi
mov rcx, rdi
mov rdx, r15
mov r8, rbx
call fcn.1400931b0
mov r12, r14
mov qword [rsp + 0x38], rdi
mov rdi, r12
shl rdi, 5
je 0x140034bf0
mov eax, dword [rsp + 0x558]
mov rdx, qword [rsp + 0x550]
mov r13, qword [rsp + 0x38]
add rdi, r13
test rdx, rdx
sete cl
test eax, eax
sete bl
and bl, cl
mov byte [rsp + 0x37], bl
mov ecx, eax
imul rcx, rcx, 0x10624dd3
shr rcx, 0x26
cmp eax, 0x3e8
mov eax, 1
mov ebp, ecx
cmovb ebp, eax
test edx, edx
cmovne ebp, ecx
mov dword [rsp + 0x54], ebp
lea rsi, [rsp + 0xd8]
jmp 0x14003485c
mov rcx, qword [0x140443578]
xor edx, edx
call sub.kernel32.dll_HeapFree
mov rcx, qword [0x140443578]
xor edx, edx
mov r8, r14
call sub.kernel32.dll_HeapFree
add r13, 0x20
cmp r13, rdi
je 0x140034bf0
mov eax, dword [r13]
cmp eax, 2
je 0x140034bf0
movups xmm0, xmmword [r13 + 4]
movups xmm1, xmmword [r13 + 0x10]
movups xmmword [rsp + 0x8c], xmm1
movaps xmmword [rsp + 0x80], xmm0
mov dword [rsp + 0x60], eax
movups xmm0, xmmword [rsp + 0x8c]
lea rax, [rsp + 0x64]
movups xmmword [rax + 0xc], xmm0
movaps xmm0, xmmword [rsp + 0x80]
movups xmmword [rax], xmm0
mov rax, qword [0x140443580]
cmp rax, 3
jne 0x140034a21
mov edx, dword [rsp + 0x60]
mov rcx, rsi
call fcn.14008c46e
cmp dword [rsp + 0xd8], 1
jne 0x140034910
mov rbx, qword [rsp + 0xe0]
mov r14, qword [rsp + 0xe8]
mov r15, rbx
shr r15, 8
mov rsi, rbx
shr rsi, 0x10
mov rbp, rbx
shr rbp, 0x20
lea ecx, [rbx - 1]
mov eax, r15d
cmp cl, 2
jae 0x140034b0b
jmp 0x140034b25
mov rbp, qword [rsp + 0xe0]
mov dword [rsp + 0xd8], 1
mov rcx, rbp
mov edx, 0x8004667e
mov r8, rsi
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140034a0a
cmp dword [rsp + 0x60], 1
mov r8d, 0x10
mov eax, 0x1c
cmove r8d, eax
mov rcx, rbp
lea rdx, [rsp + 0x64]
call qword [sym.imp.ws2_32.dll_connect]
mov esi, eax
mov bl, 4
cmp eax, 0xffffffff
jne 0x14003497a
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r15d, eax
shl r15, 0x18
xor r14d, r14d
xor ebx, ebx
mov rax, r14
shld rax, r15, 8
mov rcx, r15
shl rcx, 8
movzx edx, bl
or rdx, rcx
mov qword [rsp + 0xb8], rax
mov qword [rsp + 0xb0], rdx
mov dword [rsp + 0xd8], 0
mov rcx, rbp
mov edx, 0x8004667e
lea r8, [rsp + 0xd8]
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140034ac9
cmp esi, 0xffffffff
jne 0x140034adb
mov rcx, r15
shr rcx, 0x18
call fcn.140084604
cmp al, 0xd
jne 0x140034adb
cmp byte [rsp + 0x37], 0
je 0x140034a2b
lea r15, str.cannot_set_a_0_duration_timeout
mov r14, r15
shr r14, 8
shl r15, 0x38
or r15, 0x14
mov bl, 2
jmp 0x140034adb
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r15d, eax
shl r15, 0x18
xor ebx, ebx
xor r14d, r14d
jmp 0x140034ae4
call fcn.140096f03
jmp 0x1400348b4
mov rax, qword [rsp + 0x550]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x54]
mov dword [rsp + 0x5c], eax
mov qword [rsp + 0x2e0], 1
mov qword [rsp + 0x2e8], rbp
mov r8d, 0x1f8
lea rcx, [rsp + 0x2f0]
xor edx, edx
call fcn.140092ff0
mov qword [rsp + 0xd8], 1
mov qword [rsp + 0xe0], rbp
mov r8d, 0x1f8
lea rcx, [rsp + 0xe8]
xor edx, edx
call fcn.140092ff0
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov ecx, 1
xor edx, edx
lea r8, [rsp + 0x2e0]
lea r9, [rsp + 0xd8]
call qword [sym.imp.ws2_32.dll_select]
test eax, eax
je 0x140034b77
cmp eax, 0xffffffff
jne 0x140034b7b
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov r15d, eax
shl r15, 0x18
xor ebx, ebx
xor r14d, r14d
cmp bl, 4
je 0x140034dfb
mov rcx, rbp
call qword [sym.imp.ws2_32.dll_closesocket]
mov rsi, r15
shr rsi, 8
shld r14, r15, 8
mov rbp, r15
shr rbp, 0x18
lea ecx, [rbx - 1]
mov eax, r15d
cmp cl, 2
jb 0x140034b25
test bl, bl
jne 0x140034b20
mov ecx, ebp
call fcn.140084604
jmp 0x140034b25
movzx eax, byte [r14 + 0x10]
cmp al, 0x16
je 0x140034c37
add r12, 0xffffffffffffffff
je 0x140034c37
cmp bl, 3
lea rsi, [rsp + 0xd8]
jne 0x14003484f
mov rcx, qword [r14]
mov rax, qword [r14 + 8]
call qword [rax]
mov rax, qword [r14 + 8]
cmp qword [rax + 8], 0
je 0x14003483e
mov r8, qword [r14]
cmp qword [rax + 0x10], 0x11
jb 0x140034830
mov r8, qword [r8 - 8]
jmp 0x140034830
mov bl, 2
jmp 0x140034bb5
mov bl, 4
cmp dword [rsp + 0x2e0], 1
je 0x140034bb5
lea rcx, [rsp + 0xc0]
mov rdx, rbp
call fcn.14008c569
cmp dword [rsp + 0xc0], 1
mov r14, qword [rsp + 0xd0]
mov rax, qword [rsp + 0xc8]
je 0x140034bdd
cmp al, 4
jne 0x140034bdd
lea rcx, [rsp + 0xb0]
call fcn.140001eb0
lea r15, str.connection_timed_out
mov r14, r15
shr r14, 8
shl r15, 0x38
or r15, 0x16
jmp 0x140034adb
mov r15, rax
shrd r15, r14, 8
shr r14, 8
mov ebx, eax
jmp 0x140034adb
shl qword [rsp + 0x48], 5
je 0x140034c0b
mov rcx, qword [0x140443578]
xor edx, edx
mov r8, qword [rsp + 0x38]
call sub.kernel32.dll_HeapFree
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x60], rax
lea rax, [0x14001bc80]
mov qword [rsp + 0x68], rax
mov rcx, qword [0x140443578]
test rcx, rcx
je 0x140034c7a
mov rdi, qword [rsp + 0x40]
jmp 0x140034c97
mov rcx, qword [rsp + 0x40]
mov byte [rcx + 8], bl
mov byte [rcx + 9], r15b
mov word [rcx + 0xa], si
mov dword [rcx + 0xc], ebp
mov qword [rcx + 0x10], r14
mov eax, 1
mov qword [rcx], rax
shl qword [rsp + 0x48], 5
je 0x140034de7
mov rcx, qword [0x140443578]
xor edx, edx
mov r8, qword [rsp + 0x38]
call sub.kernel32.dll_HeapFree
jmp 0x140034de7
call sub.kernel32.dll_GetProcessHeap
test rax, rax
mov rdi, qword [rsp + 0x40]
je 0x140034e52
mov rcx, rax
mov qword [0x140443578], rax
mov r8d, 0x3c
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140034e52
mov qword [rsp + 0x2e0], rax
movaps xmm0, xmmword [0x1400989d0]
movups xmmword [rsp + 0x2e8], xmm0
lea rax, [rsp + 0x2e0]
mov qword [rsp + 0x80], rax
lea rax, [0x1403ea2a8]
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xe0], 1
mov qword [rsp + 0xe8], 0
lea rax, [rsp + 0x60]
mov qword [rsp + 0xf8], rax
mov qword [rsp + 0x100], 1
lea rdx, [0x140099ce0]
lea rcx, [rsp + 0x80]
lea r8, [rsp + 0xd8]
call fcn.14001ac01
test al, al
jne 0x140034e63
mov rcx, qword [0x140443578]
test rcx, rcx
jne 0x140034d5c
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140034e41
mov rcx, rax
mov qword [0x140443578], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140034e41
mov rsi, rax
mov rax, qword [rsp + 0x2f0]
mov qword [rsi + 0x10], rax
movups xmm0, xmmword [rsp + 0x2e0]
movups xmmword [rsi], xmm0
mov rcx, qword [0x140443578]
test rcx, rcx
jne 0x140034db0
call sub.kernel32.dll_GetProcessHeap
test rax, rax
je 0x140034e41
mov rcx, rax
mov qword [0x140443578], rax
mov r8d, 0x18
xor edx, edx
call sub.kernel32.dll_HeapAlloc
test rax, rax
je 0x140034e41
mov qword [rax], rsi
lea rcx, [0x1403eab08]
mov qword [rax + 8], rcx
mov byte [rax + 0x10], 9
mov qword [rdi + 0x10], rax
mov qword [rdi + 8], 3
mov qword [rdi], 1
add rsp, 0x4e8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, qword [rsp + 0x40]
mov qword [rcx + 8], rbp
xor eax, eax
mov qword [rcx], rax
shl qword [rsp + 0x48], 5
jne 0x140034c62
jmp 0x140034de7
lea rcx, [rsp + 0xd8]
mov rdx, r14
call fcn.1400952c0
mov rax, qword [rsp + 0xd8]
mov qword [rsp + 0x38], rax
mov r12, qword [rsp + 0xe8]
jmp 0x140034744
mov ecx, 0x18
mov edx, 8
call fcn.1400949bf
ud2
mov ecx, 0x3c
mov edx, 1
call fcn.1400949bf
ud2
ud2