Function at 0x100596f0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Set socket configuration

Disassembly:
mov eax, 0x70
call fcn.100bf140
mov eax, dword [0x10116cb0]
xor eax, esp
mov dword [esp + 0x6c], eax
push ebx
mov ebx, dword [esp + 0x78]
push ebp
mov dword [esp + 0x14], ebx
or ebp, 0xffffffff
mov dword [esp + 0xc], 0
call sym.LIBEAY32.dll_BIO_sock_init
cmp eax, 1
je 0x10059738
pop ebp
or eax, 0xffffffff
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.100bf100
add esp, 0x70
ret
push ebx
call sym.LIBEAY32.dll_BUF_strdup
mov edx, eax
add esp, 4
mov dword [esp + 0x18], edx
test edx, edx
je 0x10059724
push esi
xor esi, esi
mov ebx, edx
cmp byte [edx], 0
push edi
je 0x1005977b
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x10059761
mov esi, eax
jmp 0x10059766
cmp cl, 0x2f
je 0x1005976e
inc eax
cmp byte [eax], 0
jne 0x10059756
jmp 0x10059771
mov byte [eax], 0
test esi, esi
je 0x1005977b
mov byte [esi], 0
inc esi
jmp 0x1005977f
mov esi, edx
xor ebx, ebx
cmp dword [0x10117004], 0
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
jne 0x1005985b
push str.getaddrinfo
call sym.LIBEAY32.dll_DSO_global_lookup
add esp, 4
mov dword [0x10117004], eax
test eax, eax
je 0x100597c2
push str.freeaddrinfo
call sym.LIBEAY32.dll_DSO_global_lookup
add esp, 4
mov dword [0x10117008], eax
test eax, eax
jne 0x1005985b
mov dword [0x10117004], 0xffffffff
lea eax, [esp + 0x18]
push eax
push esi
call sym.LIBEAY32.dll_BIO_get_port
add esp, 8
test eax, eax
je 0x10059b1a
push dword [esp + 0x18]
xorps xmm0, xmm0
mov dword [esp + 0x60], 0
mov eax, 2
movq qword [esp + 0x58], xmm0
movdqu xmmword [esp + 0x48], xmm0
mov word [esp + 0x48], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x46], ax
mov dword [esp + 0x18], 0x10
test ebx, ebx
je 0x10059951
mov ecx, 0x100c0ae8
mov eax, ebx
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10059902
test dl, dl
je 0x10059854
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10059902
add eax, 2
add ecx, 2
test dl, dl
jne 0x10059830
xor eax, eax
jmp 0x10059907
cmp dword [0x10117004], 0xffffffff
je 0x100597cc
xorps xmm0, xmm0
movdqu xmmword [esp + 0x24], xmm0
mov dword [esp + 0x24], 1
movdqu xmmword [esp + 0x34], xmm0
test ebx, ebx
je 0x100598ba
push 0x3a
push ebx
call dword [sym.imp.MSVCR120.dll_strchr]
add esp, 8
test eax, eax
je 0x100598a5
xor eax, eax
mov dword [esp + 0x28], 0x17
cmp byte [ebx + 1], al
cmove ebx, eax
jmp 0x100598ba
cmp byte [ebx], 0x2a
jne 0x100598ba
cmp byte [ebx + 1], 0
jne 0x100598ba
mov dword [esp + 0x28], 2
xor ebx, ebx
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x28]
push eax
push esi
push ebx
call dword [0x10117004]
test eax, eax
jne 0x100597cc
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x44]
mov ecx, 0x1c
cmp dword [esi + 0x10], ecx
cmovbe ecx, dword [esi + 0x10]
push ecx
push dword [esi + 0x18]
mov dword [esp + 0x20], ecx
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
push esi
call dword [0x10117008]
jmp 0x10059959
sbb eax, eax
or eax, 1
test eax, eax
je 0x10059951
lea eax, [esp + 0x10]
push eax
push ebx
call sym.LIBEAY32.dll_BIO_get_host_ip
add esp, 8
test eax, eax
je 0x10059b1a
mov eax, dword [esp + 0x10]
movzx ecx, al
shl ecx, 8
movzx eax, ah
or ecx, eax
movzx eax, byte [esp + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [esp + 0x13]
shl ecx, 8
or ecx, eax
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x48], eax
jmp 0x10059959
mov dword [esp + 0x48], 0
movzx eax, word [esp + 0x44]
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 6
push 1
push eax
call edi
mov ebp, eax
cmp ebp, 0xffffffff
je 0x10059acd
mov esi, dword [esp + 0x88]
lea ecx, [ecx]
cmp esi, 2
jne 0x100599a8
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 1
push eax
push 4
push 0xffff
push ebp
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0x14], eax
xor esi, esi
push dword [esp + 0x18]
lea eax, [esp + 0x48]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x10059ba0
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], eax
cmp esi, 1
jne 0x10059b51
cmp eax, 0x2740
jne 0x10059b51
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x78], eax
movdqu xmm0, xmmword [esp + 0x44]
movdqu xmmword [esp + 0x60], xmm0
movq xmm0, qword [esp + 0x54]
movq qword [esp + 0x70], xmm0
test ebx, ebx
je 0x10059a39
mov ecx, 0x100c0ae8
mov eax, ebx
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10059a30
test dl, dl
je 0x10059a2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10059a30
add eax, 2
add ecx, 2
test dl, dl
jne 0x10059a10
xor eax, eax
jmp 0x10059a35
sbb eax, eax
or eax, 1
test eax, eax
jne 0x10059a6d
mov ax, word [esp + 0x44]
cmp ax, 0x17
jne 0x10059a54
xorps xmm0, xmm0
movdqu xmmword [esp + 0x68], xmm0
mov byte [esp + 0x77], 1
jmp 0x10059a6d
cmp ax, 2
jne 0x10059b14
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x64], eax
movzx eax, word [esp + 0x60]
push 6
push 1
push eax
call edi
mov edi, eax
cmp edi, 0xffffffff
je 0x10059b4d
push dword [esp + 0x18]
lea eax, [esp + 0x64]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
mov esi, eax
call edi
cmp esi, 0xffffffff
jne 0x10059b9a
push ebp
mov esi, 2
call edi
movzx eax, word [esp + 0x44]
mov edi, dword [sym.imp.WS2_32.dll_socket]
push 6
push 1
push eax
call edi
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x10059980
push 0x2d4
push str..crypto_bio_b_sock.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call sym.LIBEAY32.dll_ERR_put_error
push 0x100d116c
push dword [esp + 0x34]
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x2d6
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push dword [esp + 0x20]
call sym.LIBEAY32.dll_CRYPTO_free
add esp, 4
cmp dword [esp + 0x14], 0
jne 0x10059b38
cmp ebp, 0xffffffff
je 0x10059b38
push ebp
call edi
or ebp, 0xffffffff
mov ecx, dword [esp + 0x7c]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100bf100
add esp, 0x70
ret
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
push 0x30b
push str..crypto_bio_b_sock.c
push eax
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
push 0x100d116c
push dword [esp + 0x34]
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x30d
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x10059b1a
mov eax, dword [esp + 0x10]
jmp 0x10059b57
push bind
push ebp
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x10059bf1
push 0x311
push str..crypto_bio_b_sock.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
push 0x100d116c
push dword [esp + 0x34]
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x313
push str..crypto_bio_b_sock.c
push 0x77
jmp 0x10059b08
mov dword [esp + 0x14], 1
jmp 0x10059b14