Function at 0x10059a60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
mov eax, 0x74
call fcn.100bff40
mov eax, dword [0x10116c70]
xor eax, esp
mov dword [esp + 0x70], eax
push ebp
push esi
mov esi, dword [esp + 0x80]
push edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x14], 0
or ebp, 0xffffffff
call sym.LIBEAY32.dll_BIO_sock_init
mov edi, 1
cmp eax, edi
je 0x10059ab0
pop edi
pop esi
or eax, ebp
pop ebp
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.100bff70
add esp, 0x74
ret
push ebx
push esi
call sym.LIBEAY32.dll_BUF_strdup
mov ebx, eax
add esp, 4
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x10059ada
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.100bff70
add esp, 0x74
ret
xor esi, esi
cmp byte [ebx], 0
mov dword [esp + 0x10], ebx
je 0x10059b0c
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x10059af0
mov esi, eax
jmp 0x10059af5
cmp cl, 0x2f
je 0x10059afe
add eax, edi
cmp byte [eax], 0
jne 0x10059ae5
jmp 0x10059b01
mov byte [eax], 0
test esi, esi
je 0x10059b0c
mov byte [esi], 0
add esi, edi
jmp 0x10059b1a
mov dword [esp + 0x10], 0
mov esi, ebx
mov ebx, dword [esp + 0x10]
cmp dword [0x1011712c], 0
jne 0x10059b5e
push str.getaddrinfo
call sym.LIBEAY32.dll_DSO_global_lookup
add esp, 4
mov dword [0x1011712c], eax
test eax, eax
je 0x10059b4f
push str.freeaddrinfo
call sym.LIBEAY32.dll_DSO_global_lookup
add esp, 4
mov dword [0x10117130], eax
test eax, eax
jne 0x10059b5e
mov dword [0x1011712c], 0xffffffff
jmp 0x10059bfa
cmp dword [0x1011712c], 0xffffffff
je 0x10059bfa
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], edi
test ebx, ebx
je 0x10059be0
push 0x3a
push ebx
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x10059bc1
cmp byte [ebx + 1], 0
jne 0x10059bb7
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], 0x17
jmp 0x10059be0
cmp byte [ebx], 0x2a
jne 0x10059be0
cmp byte [ebx + 1], 0
jne 0x10059be0
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], 2
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
push esi
push ebx
call dword [0x1011712c]
test eax, eax
je 0x10059cd9
lea edx, [esp + 0x14]
push edx
push esi
call sym.LIBEAY32.dll_BIO_get_port
add esp, 8
test eax, eax
je 0x10059f66
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov eax, 2
push ecx
mov word [esp + 0x4c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x4a], ax
mov dword [esp + 0x1c], 0x10
test ebx, ebx
je 0x10059ccf
mov ecx, 0x100c1a94
mov eax, ebx
jmp 0x10059c60
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10059c80
test dl, dl
je 0x10059c7c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10059c80
add eax, 2
add ecx, 2
test dl, dl
jne 0x10059c60
xor eax, eax
jmp 0x10059c85
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x10059ccf
lea edx, [esp + 0x14]
push edx
push ebx
call sym.LIBEAY32.dll_BIO_get_host_ip
add esp, 8
test eax, eax
je 0x10059f66
mov eax, dword [esp + 0x14]
movzx ecx, al
shl ecx, 8
movzx edx, ah
movzx eax, byte [esp + 0x16]
or ecx, edx
movzx edx, byte [esp + 0x17]
shl ecx, 8
or ecx, eax
shl ecx, 8
or ecx, edx
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x4c], eax
jmp 0x10059d0e
mov dword [esp + 0x4c], 0
jmp 0x10059d0e
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x10]
mov dword [esp + 0x1c], eax
cmp eax, 0x1c
jbe 0x10059cf1
mov dword [esp + 0x1c], 0x1c
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x18]
push eax
push ecx
lea edx, [esp + 0x50]
push edx
call sub.MSVCR90.dll_memcpy
add esp, 0xc
push esi
call dword [0x10117130]
movzx eax, word [esp + 0x48]
push 6
push edi
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x10059e76
mov esi, dword [esp + 0x8c]
jmp 0x10059d36
mov edi, 1
cmp esi, 2
jne 0x10059d5a
push 4
lea ecx, [esp + 0x1c]
push ecx
push 4
push 0xffff
push ebp
mov dword [esp + 0x2c], edi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [esp + 0x18], eax
xor esi, esi
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x4c]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x10059f07
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp esi, edi
jne 0x10059ec3
cmp ebx, 0x2740
jne 0x10059ec3
mov eax, dword [esp + 0x10]
mov ecx, 7
lea esi, [esp + 0x48]
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
test eax, eax
je 0x10059dd9
mov ecx, 0x100c1a94
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10059dd0
test dl, dl
je 0x10059dcc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10059dd0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10059db0
xor eax, eax
jmp 0x10059dd5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10059e16
mov ax, word [esp + 0x48]
cmp ax, 0x17
jne 0x10059dfd
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov byte [esp + 0x7b], 1
jmp 0x10059e16
cmp ax, 2
jne 0x10059f66
push 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x68], eax
movzx ecx, word [esp + 0x64]
push 6
push 1
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x10059ec3
mov edx, dword [esp + 0x1c]
push edx
lea eax, [esp + 0x68]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
push esi
mov edi, eax
call dword [sym.imp.WS2_32.dll_closesocket]
cmp edi, 0xffffffff
jne 0x10059ec3
push ebp
mov esi, 2
call dword [sym.imp.WS2_32.dll_closesocket]
movzx ecx, word [esp + 0x48]
push 6
push 1
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, edi
jne 0x10059d31
push 0x2e5
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
mov edx, dword [esp + 0x34]
push 0x100d1d38
push edx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x2e7
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x10059f66
push 0x324
push str..crypto_bio_b_sock.c
push ebx
push 6
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov eax, dword [esp + 0x34]
push 0x100d1d38
push eax
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x326
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x10059f66
push bind
push ebp
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x10059f62
push 0x32b
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
mov ecx, dword [esp + 0x34]
push 0x100d1d38
push ecx
push str.port
push 3
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x32d
push str..crypto_bio_b_sock.c
push 0x77
push 0x69
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x38
jmp 0x10059f66
mov dword [esp + 0x18], edi
mov edx, dword [esp + 0x24]
push edx
call sym.LIBEAY32.dll_CRYPTO_free
add esp, 4
cmp dword [esp + 0x18], 0
jne 0x10059f89
cmp ebp, 0xffffffff
je 0x10059f89
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
or ebp, 0xffffffff
mov ecx, dword [esp + 0x80]
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
xor ecx, esp
call fcn.100bff70
add esp, 0x74
ret