Function at 0x140004870
Capabilities:
Connect socket
Get socket status

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x290
mov rbx, rcx
mov rdi, rdx
mov qword [rsp + 0x2c8], r9
mov esi, r8d
call method.sf::TcpSocket.disconnect__
mov rcx, rbx
call method.sf::Socket.create__
mov rcx, rdi
lea rdi, [rsp + 0x60]
call method.sf::IpAddress.toInteger___const
movzx r8d, si
mov rcx, rdi
mov edx, eax
call method.sf::priv::SocketImpl.createAddress_unsigned_int__unsigned_short_
mov rax, qword [0x1400d2eb0]
mov rcx, qword [rsp + 0x2c8]
mov rdx, qword [rax]
call fcn.14000c650
mov rcx, rbx
test al, al
je 0x140004900
call method.sf::Socket.getHandle___const
mov r8d, 0x10
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140004940
xor eax, eax
add rsp, 0x290
pop rbx
pop rsi
pop rdi
ret
call method.sf::Socket.isBlocking___const
mov esi, eax
test al, al
jne 0x140004950
mov rcx, rbx
call method.sf::Socket.getHandle___const
mov r8d, 0x10
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
js 0x140004940
movzx edx, sil
mov rcx, rbx
call method.sf::Socket.setBlocking_bool_
jmp 0x1400048ed
call method.sf::priv::SocketImpl.getErrorStatus__
add rsp, 0x290
pop rbx
pop rsi
pop rdi
ret
xor edx, edx
mov rcx, rbx
call method.sf::Socket.setBlocking_bool_
mov rcx, rbx
call method.sf::Socket.getHandle___const
mov r8d, 0x10
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x140004929
call method.sf::priv::SocketImpl.getErrorStatus__
cmp eax, 1
je 0x1400049a8
mov edx, 1
mov rcx, rbx
mov dword [rsp + 0x3c], eax
call method.sf::Socket.setBlocking_bool_
mov eax, dword [rsp + 0x3c]
add rsp, 0x290
pop rbx
pop rsi
pop rdi
ret
mov rcx, rbx
lea rdi, [rsp + 0x2c8]
mov dword [rsp + 0x80], 0
movabs rsi, 0x431bde82d7b634db
call method.sf::Socket.getHandle___const
mov rcx, rdi
add dword [rsp + 0x80], 1
mov qword [rsp + 0x88], rax
call method.sf::Time.asMicroseconds___const
mov rcx, rax
imul rsi
sar rcx, 0x3f
sar rdx, 0x12
sub rdx, rcx
mov rcx, rdi
mov dword [rsp + 0x50], edx
call method.sf::Time.asMicroseconds___const
mov rcx, rax
imul rsi
mov rax, rcx
sar rax, 0x3f
sar rdx, 0x12
sub rdx, rax
imul rdx, rdx, 0xf4240
sub rcx, rdx
mov dword [rsp + 0x54], ecx
mov rcx, rbx
call method.sf::Socket.getHandle___const
xor r9d, r9d
xor edx, edx
lea r8, [rsp + 0x80]
lea ecx, [rax + 1]
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x140004ad6
mov rcx, rbx
lea rdi, [rsp + 0x70]
call method.sf::Socket.getHandle___const
mov rsi, rax
call method.sf::priv::SocketImpl.invalidSocket__
cmp rsi, rax
je 0x140004ae0
mov rcx, rbx
mov dword [rsp + 0x4c], 0x10
call method.sf::Socket.getHandle___const
lea r8, [rsp + 0x4c]
mov rdx, rdi
mov rcx, rax
call qword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
je 0x140004ae0
mov ecx, dword [rsp + 0x74]
call qword [sym.imp.WS2_32.dll_ntohl]
lea rcx, [rsp + 0x58]
mov edx, eax
call method.sf::IpAddress.IpAddress_unsigned_int_
mov ecx, dword [rsp + 0x58]
movzx eax, byte [rsp + 0x5c]
mov rdx, qword [0x1400d2ed0]
mov dword [rsp + 0x70], ecx
mov rcx, rdi
mov byte [rsp + 0x74], al
call fcn.140002750
mov edx, eax
xor eax, eax
test dl, dl
jne 0x140004982
call method.sf::priv::SocketImpl.getErrorStatus__
jmp 0x140004982
mov rdx, qword [0x1400d2ed0]
mov ecx, dword [rdx]
movzx eax, byte [rdx + 4]
jmp 0x140004aba