Function at 0x10096510
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.101025a0
mov eax, dword [0x1017ec40]
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.crypto_ssl.dll_UIO_sock_init
mov edi, 1
cmp eax, edi
je 0x10096560
pop edi
pop esi
or eax, ebp
pop ebp
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.10102ab4
add esp, 0x74
ret
push ebx
push esi
call sym.crypto_ssl.dll_UUF_strdup
mov ebx, eax
add esp, 4
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x1009658a
pop ebx
pop edi
pop esi
or eax, 0xffffffff
pop ebp
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.10102ab4
add esp, 0x74
ret
xor esi, esi
cmp byte [ebx], 0
mov dword [esp + 0x10], ebx
je 0x100965bc
mov cl, byte [eax]
cmp cl, 0x3a
jne 0x100965a0
mov esi, eax
jmp 0x100965a5
cmp cl, 0x2f
je 0x100965ae
add eax, edi
cmp byte [eax], 0
jne 0x10096595
jmp 0x100965b1
mov byte [eax], 0
test esi, esi
je 0x100965bc
mov byte [esi], 0
add esi, edi
jmp 0x100965ca
mov dword [esp + 0x10], 0
mov esi, ebx
mov ebx, dword [esp + 0x10]
cmp dword [0x10180534], 0
jne 0x1009660e
push str.getaddrinfo
call sym.crypto_ssl.dll_USO_global_lookup
add esp, 4
mov dword [0x10180534], eax
test eax, eax
je 0x100965ff
push str.freeaddrinfo
call sym.crypto_ssl.dll_USO_global_lookup
add esp, 4
mov dword [0x10180538], eax
test eax, eax
jne 0x1009660e
mov dword [0x10180534], 0xffffffff
jmp 0x100966a9
cmp dword [0x10180534], 0xffffffff
je 0x100966a9
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 0x1009668f
push 0x3a
push ebx
call fcn.10103000
add esp, 8
test eax, eax
je 0x10096670
cmp byte [ebx + 1], 0
jne 0x10096666
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x10]
mov dword [esp + 0x2c], 0x17
jmp 0x1009668f
cmp byte [ebx], 0x2a
jne 0x1009668f
cmp byte [ebx + 1], 0
jne 0x1009668f
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 [0x10180534]
test eax, eax
je 0x10096789
lea edx, [esp + 0x14]
push edx
push esi
call sym.crypto_ssl.dll_UIO_get_port
add esp, 8
test eax, eax
je 0x10096a16
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 0x1009677f
mov ecx, 0x1011ebe0
mov eax, ebx
lea ebx, [ebx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10096730
test dl, dl
je 0x1009672c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10096730
add eax, 2
add ecx, 2
test dl, dl
jne 0x10096710
xor eax, eax
jmp 0x10096735
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1009677f
lea edx, [esp + 0x14]
push edx
push ebx
call sym.crypto_ssl.dll_UIO_get_host_ip
add esp, 8
test eax, eax
je 0x10096a16
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 0x100967be
mov dword [esp + 0x4c], 0
jmp 0x100967be
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x10]
mov dword [esp + 0x1c], eax
cmp eax, 0x1c
jbe 0x100967a1
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 fcn.10102620
add esp, 0xc
push esi
call dword [0x10180538]
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 0x10096926
mov esi, dword [esp + 0x8c]
jmp 0x100967e6
mov edi, 1
cmp esi, 2
jne 0x1009680a
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 0x100969b7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp esi, edi
jne 0x10096973
cmp ebx, 0x2740
jne 0x10096973
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 0x10096889
mov ecx, 0x1011ebe0
lea esp, [esp]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x10096880
test dl, dl
je 0x1009687c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x10096880
add eax, 2
add ecx, 2
test dl, dl
jne 0x10096860
xor eax, eax
jmp 0x10096885
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x100968c6
mov ax, word [esp + 0x48]
cmp ax, 0x17
jne 0x100968ad
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 0x100968c6
cmp ax, 2
jne 0x10096a16
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 0x10096973
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 0x10096973
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 0x100967e1
push 0x2d8
push str..crypto_bio_b_sock.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call sym.crypto_ssl.dll_URR_put_error
mov edx, dword [esp + 0x34]
push 0x101308e8
push edx
push str.port
push 3
call sym.crypto_ssl.dll_URR_add_error_data
push 0x2da
push str..crypto_bio_b_sock.c
push 0x76
push 0x69
push 0x20
call sym.crypto_ssl.dll_URR_put_error
add esp, 0x38
jmp 0x10096a16
push 0x30f
push str..crypto_bio_b_sock.c
push ebx
push 6
push 2
call sym.crypto_ssl.dll_URR_put_error
mov eax, dword [esp + 0x34]
push 0x101308e8
push eax
push str.port
push 3
call sym.crypto_ssl.dll_URR_add_error_data
push 0x311
push str..crypto_bio_b_sock.c
push 0x75
push 0x69
push 0x20
call sym.crypto_ssl.dll_URR_put_error
add esp, 0x38
jmp 0x10096a16
push bind
push ebp
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x10096a12
push 0x315
push str..crypto_bio_b_sock.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 6
push 2
call sym.crypto_ssl.dll_URR_put_error
mov ecx, dword [esp + 0x34]
push 0x101308e8
push ecx
push str.port
push 3
call sym.crypto_ssl.dll_URR_add_error_data
push 0x317
push str..crypto_bio_b_sock.c
push 0x77
push 0x69
push 0x20
call sym.crypto_ssl.dll_URR_put_error
add esp, 0x38
jmp 0x10096a16
mov dword [esp + 0x18], edi
mov edx, dword [esp + 0x24]
push edx
call sym.crypto_ssl.dll_URYPTO_free
add esp, 4
cmp dword [esp + 0x18], 0
jne 0x10096a39
cmp ebp, 0xffffffff
je 0x10096a39
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.10102ab4
add esp, 0x74
ret