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

Disassembly:
mov eax, 8
call fcn.100a1060
mov eax, dword [esi + 0x28]
push ebp
push edi
xor edi, edi
or ebp, 0xffffffff
test eax, eax
mov dword [esp + 0xc], edi
je 0x10046e32
mov dword [esp + 0xc], eax
mov edi, eax
mov eax, dword [esi]
dec eax
cmp eax, 7
ja case.default.0x10046e40
mov edi, edi
jmp dword [eax*4 + 0x1004726c]
mov edi, dword [esi + 4]
test edi, edi
je 0x100470d3
cmp byte [edi], 0
je 0x10046e69
mov al, byte [edi]
cmp al, 0x3a
je 0x10046e69
cmp al, 0x2f
je 0x10046e69
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10046e57
movsx eax, byte [edi]
cmp eax, 0x3a
mov dword [esp + 8], eax
je 0x10046e7a
cmp eax, 0x2f
jne 0x10046ebe
mov byte [edi], 0
mov eax, dword [esp + 8]
inc edi
cmp eax, 0x3a
jne 0x10046ebe
cmp byte [edi], 0
mov eax, edi
je 0x10046ea2
mov edi, edi
cmp byte [eax], 0x2f
je 0x10046e9f
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10046e90
jmp 0x10046ea2
mov byte [eax], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x10046eb2
push eax
call sym.LIBEAY32.dll_CRYPTO_free
add esp, 4
push edi
call sym.LIBEAY32.dll_BUF_strdup
add esp, 4
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x100470f4
mov edi, dword [esp + 0xc]
mov dword [esi], 2
jmp 0x100470aa
mov ecx, dword [esi + 4]
lea eax, [esi + 0x10]
push eax
push ecx
call sym.LIBEAY32.dll_BIO_get_host_ip
add esp, 8
test eax, eax
jle case.default.0x10046e40
mov dword [esi], 3
jmp 0x100470aa
mov eax, dword [esi + 8]
test eax, eax
je case.default.0x10046e40
lea edx, [esi + 0x14]
push edx
push eax
call sym.LIBEAY32.dll_BIO_get_port
add esp, 8
test eax, eax
jle case.default.0x10046e40
mov dword [esi], 4
jmp 0x100470aa
lea eax, [esi + 0x18]
xor ecx, ecx
mov edx, eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov word [eax], 2
xor eax, eax
mov ax, word [esi + 0x14]
push eax
call sub.WSOCK32.dll_htons
movzx ecx, byte [esi + 0x12]
movzx edx, byte [esi + 0x13]
mov word [esi + 0x1a], ax
xor eax, eax
mov ah, byte [esi + 0x10]
mov al, byte [esi + 0x11]
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
push eax
call sub.WSOCK32.dll_htonl
push 6
push 1
push 2
mov dword [esi + 0x1c], eax
mov dword [esi], 4
call sub.WSOCK32.dll_socket
mov ebp, eax
cmp ebp, 0xffffffff
je 0x10047125
mov dword [ebx + 0x1c], ebp
mov dword [esi], 8
jmp 0x100470aa
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10046fb7
mov eax, dword [ebx + 0x1c]
push 1
push eax
call sym.LIBEAY32.dll_BIO_socket_nbio
add esp, 8
test eax, eax
je 0x10047174
push 4
lea ecx, [esp + 0xc]
push ecx
push 8
mov dword [esi], 5
mov edx, dword [ebx + 0x1c]
push 0xffff
push edx
mov dword [esp + 0x1c], 1
call sub.WSOCK32.dll_setsockopt
test eax, eax
mov dword [esp + 8], eax
jge 0x100470aa
push 0xf4
push str..crypto_bio_bss_conn.c
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 4
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push str.:_
push ecx
push 0x100b2b54
push 4
call sym.LIBEAY32.dll_ERR_add_error_data
push 0xf7
push str..crypto_bio_bss_conn.c
push 0x6d
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x3c
jmp case.default.0x10046e40
push 0xf
push ebx
call sym.LIBEAY32.dll_BIO_clear_flags
mov ecx, dword [ebx + 0x1c]
add esp, 8
push 0x10
lea eax, [esi + 0x18]
push eax
push ecx
call sub.WSOCK32.dll_connect
mov ebp, eax
test ebp, ebp
mov dword [ebx + 0x18], 0
jge 0x100470a4
push ebp
call sym.LIBEAY32.dll_BIO_sock_should_retry
add esp, 4
test eax, eax
je 0x100471aa
push 0xc
push ebx
call sym.LIBEAY32.dll_BIO_set_flags
mov dword [esi], 7
add esp, 8
mov dword [ebx + 0x18], 2
jmp case.default.0x10046e40
mov edx, dword [ebx + 0x1c]
push edx
call sym.LIBEAY32.dll_BIO_sock_error
add esp, 4
test eax, eax
mov dword [esp + 8], eax
jne 0x100471f6
mov dword [esi], 6
test edi, edi
je 0x100470c2
mov eax, dword [esi]
push ebp
push eax
push ebx
call edi
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x10047264
mov eax, dword [esi]
dec eax
cmp eax, 7
jbe switch.0x10046e40
jmp case.default.0x10046e40
push 0x92
push str..crypto_bio_bss_conn.c
push 0x70
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
mov edi, dword [esp + 0x20]
add esp, 0x14
jmp case.default.0x10046e40
push 0xaf
push str..crypto_bio_bss_conn.c
push 0x72
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
mov ecx, dword [esi + 4]
push ecx
push 0x100b2b54
push 2
call sym.LIBEAY32.dll_ERR_add_error_data
mov edi, dword [esp + 0x2c]
add esp, 0x20
jmp case.default.0x10046e40
push 0xd7
push str..crypto_bio_bss_conn.c
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 4
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push str.:_
push eax
push 0x100b2b54
push 4
call sym.LIBEAY32.dll_ERR_add_error_data
push 0xda
push str..crypto_bio_bss_conn.c
push 0x76
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x3c
jmp case.default.0x10046e40
push 0xe6
push str..crypto_bio_bss_conn.c
push 0x68
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push str.:_
push edx
push 0x100b2b54
push 4
call sym.LIBEAY32.dll_ERR_add_error_data
add esp, 0x28
jmp case.default.0x10046e40
push 0x10d
push str..crypto_bio_bss_conn.c
call sub.WSOCK32.dll_WSAGetLastError
push eax
push 2
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push str.:_
push eax
push 0x100b2b54
push 4
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x111
push str..crypto_bio_bss_conn.c
push 0x67
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x3c
jmp case.default.0x10046e40
push 0xf
push ebx
call sym.LIBEAY32.dll_BIO_clear_flags
mov ecx, dword [esp + 0x10]
push 0x11e
push str..crypto_bio_bss_conn.c
push ecx
push 2
push 2
call sym.LIBEAY32.dll_ERR_put_error
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push str.:_
push eax
push 0x100b2b54
push 4
call sym.LIBEAY32.dll_ERR_add_error_data
push 0x122
push str..crypto_bio_bss_conn.c
push 0x6e
push 0x73
push 0x20
call sym.LIBEAY32.dll_ERR_put_error
add esp, 0x44
xor ebp, ebp
jmp case.default.0x10046e40
mov ebp, 1
test edi, edi
je 0x10047264
mov ecx, dword [esi]
push ebp
push ecx
push ebx
call edi
add esp, 0xc
pop edi
pop ebp
add esp, 8
ret
pop edi
mov eax, ebp
pop ebp
add esp, 8
ret