Function at 0x10050fd0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Set socket configuration

Disassembly:
mov eax, 0x38
call fcn.100b1990
mov eax, dword [0x10100110]
push ebx
push ebp
or ebp, 0xffffffff
test eax, eax
push edi
mov dword [esp + 0x14], 0
jne 0x10051057
mov ecx, 0x64
xor eax, eax
mov edi, 0x100fff80
push 0x100fff80
rep stosd dword es:[edi], eax
push 0x101
mov dword [0x10100110], 1
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x10051057
call sub.WS2_32.dll_WSAGetLastError
push 0x1d3
push str..crypto_bio_b_sock.c
push eax
push 9
push 2
call sym.LIBEAY32_smt.dll_ERR_put_error
push 0x1d4
push str..crypto_bio_b_sock.c
push 0x7a
push 0x70
push 0x20
call sym.LIBEAY32_smt.dll_ERR_put_error
add esp, 0x28
or eax, 0xffffffff
pop edi
pop ebp
pop ebx
add esp, 0x38
ret
mov eax, dword [esp + 0x48]
push eax
call sym.LIBEAY32_smt.dll_BUF_strdup
mov ebx, eax
add esp, 4
test ebx, ebx
mov dword [esp + 0x10], ebx
jne 0x10051078
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x38
ret
mov cl, byte [ebx]
xor edx, edx
mov edi, ebx
mov eax, ebx
test cl, cl
mov dword [esp + 0xc], edi
je 0x100510ad
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x10051097
lea edx, [eax + 1]
mov byte [eax], 0
jmp 0x1005109c
cmp cl, 0x2f
je 0x100510a6
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10051088
jmp 0x100510a9
mov byte [eax], 0
test edx, edx
jne 0x100510bb
mov dword [esp + 0xc], 0x100c5c00
mov edx, ebx
mov edi, dword [esp + 0xc]
lea ecx, [esp + 0x18]
push esi
push ecx
push edx
call sym.LIBEAY32_smt.dll_BIO_get_port
add esp, 8
test eax, eax
je 0x100513a8
mov eax, dword [esp + 0x1c]
xor edx, edx
mov dword [esp + 0x28], edx
push eax
mov dword [esp + 0x30], edx
mov word [esp + 0x2c], 2
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
call sub.WS2_32.dll_htons
mov word [esp + 0x2a], ax
mov esi, 0x100c5c00
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x10051125
test cl, cl
je 0x10051121
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x10051125
add eax, 2
add esi, 2
test cl, cl
jne 0x10051101
xor eax, eax
jmp 0x1005112a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10051134
mov dword [esp + 0x2c], eax
jmp 0x10051184
lea eax, [esp + 0x20]
push eax
push edi
call sym.LIBEAY32_smt.dll_BIO_get_host_ip
add esp, 8
test eax, eax
je 0x100513a8
mov ecx, dword [esp + 0x21]
mov edx, dword [esp + 0x22]
xor eax, eax
and ecx, 0xff
mov ah, byte [esp + 0x20]
and edx, 0xff
or eax, ecx
mov ecx, dword [esp + 0x23]
shl eax, 8
or eax, edx
and ecx, 0xff
shl eax, 8
or eax, ecx
push eax
call sub.WS2_32.dll_htonl
mov dword [esp + 0x2c], eax
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov ebp, eax
cmp ebp, 0xffffffff
je 0x100512b6
mov esi, dword [esp + 0x50]
jmp 0x100511a8
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
cmp esi, 2
jne 0x100511cf
lea edx, [esp + 0x50]
push 4
push edx
push 4
push 0xffff
push ebp
mov dword [esp + 0x64], 1
call sub.WS2_32.dll_setsockopt
mov dword [esp + 0x18], eax
xor esi, esi
lea eax, [esp + 0x28]
push 0x10
push eax
push ebp
call sub.WS2_32.dll_bind
cmp eax, 0xffffffff
jne 0x1005134a
call sub.WS2_32.dll_WSAGetLastError
cmp esi, 1
mov ebx, eax
jne 0x10051302
cmp ebx, 0x2740
jne 0x10051302
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x44], ecx
mov esi, 0x100c5c00
mov eax, edi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x1005124c
test cl, cl
je 0x10051248
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x1005124c
add eax, 2
add esi, 2
test cl, cl
jne 0x10051228
xor eax, eax
jmp 0x10051251
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x10051263
push 0x7f000001
call sub.WS2_32.dll_htonl
mov dword [esp + 0x3c], eax
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
cmp esi, 0xffffffff
je 0x10051302
lea eax, [esp + 0x38]
push 0x10
push eax
push esi
call sub.WS2_32.dll_connect
push esi
mov edi, eax
call sub.WS2_32.dll_closesocket
cmp edi, 0xffffffff
jne 0x10051302
push ebp
mov esi, 2
call sub.WS2_32.dll_closesocket
push 6
push 1
push esi
call sub.WS2_32.dll_socket
mov ebp, eax
cmp ebp, edi
jne 0x100511a0
mov ebx, dword [esp + 0x14]
push 0x282
push str..crypto_bio_b_sock.c
call sub.WS2_32.dll_WSAGetLastError
push eax
push 4
push 2
call sym.LIBEAY32_smt.dll_ERR_put_error
mov ecx, dword [esp + 0x60]
push 0x100c5bc4
push ecx
push str.port
push 3
call sym.LIBEAY32_smt.dll_ERR_add_error_data
push 0x284
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.LIBEAY32_smt.dll_ERR_put_error
add esp, 0x38
jmp 0x100513a8
push 0x2ad
push str..crypto_bio_b_sock.c
push ebx
push 6
push 2
call sym.LIBEAY32_smt.dll_ERR_put_error
mov edx, dword [esp + 0x60]
push 0x100c5bc4
push edx
push str.port
push 3
call sym.LIBEAY32_smt.dll_ERR_add_error_data
push 0x2af
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.LIBEAY32_smt.dll_ERR_put_error
mov ebx, dword [esp + 0x4c]
add esp, 0x38
jmp 0x100513a8
push 5
push ebp
call sub.WS2_32.dll_listen
cmp eax, 0xffffffff
jne 0x100513a0
push 0x2b4
push str..crypto_bio_b_sock.c
call sub.WS2_32.dll_WSAGetLastError
push eax
push 6
push 2
call sym.LIBEAY32_smt.dll_ERR_put_error
mov eax, dword [esp + 0x60]
push 0x100c5bc4
push eax
push str.port
push 3
call sym.LIBEAY32_smt.dll_ERR_add_error_data
push 0x2b6
push str..crypto_bio_b_sock.c
push 0x77
push 0x69
push 0x20
call sym.LIBEAY32_smt.dll_ERR_put_error
add esp, 0x38
jmp 0x100513a8
mov dword [esp + 0x18], 1
push ebx
call sym.LIBEAY32_smt.dll_CRYPTO_free
mov eax, dword [esp + 0x1c]
add esp, 4
test eax, eax
pop esi
jne 0x100513c8
cmp ebp, 0xffffffff
je 0x100513c8
push ebp
call sub.WS2_32.dll_closesocket
or ebp, 0xffffffff
mov eax, ebp
pop edi
pop ebp
pop ebx
add esp, 0x38
ret