Function at 0x788380
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create raw socket
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c
call fcn.005b9d80
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x28], 0
je 0x7883ad
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x28]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
sub edx, 1
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 7
ja case.default.0x7883cb
mov eax, dword [ebp - 0x18]
jmp dword [eax*4 + 0x788948]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
jne 0x7883fe
push 0x8b
push str..crypto_bio_bss_conn.c
push 0x70
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
jmp 0x788924
jmp 0x788409
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx]
test edx, edx
je 0x78842d
mov eax, dword [ebp - 8]
movsx ecx, byte [eax]
cmp ecx, 0x3a
je 0x788429
mov edx, dword [ebp - 8]
movsx eax, byte [edx]
cmp eax, 0x2f
jne 0x78842b
jmp 0x78842d
jmp 0x788400
mov ecx, dword [ebp - 8]
movsx edx, byte [ecx]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0x3a
je 0x788442
cmp dword [ebp - 0xc], 0x2f
jne 0x7884b1
mov eax, dword [ebp - 8]
mov byte [eax], 0
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
cmp dword [ebp - 0xc], 0x3a
jne 0x7884b1
mov edx, dword [ebp - 8]
mov dword [ebp - 0x10], edx
jmp 0x788468
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
movsx edx, byte [ecx]
test edx, edx
je 0x788487
mov eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
cmp ecx, 0x2f
jne 0x788485
mov edx, dword [ebp - 0x10]
mov byte [edx], 0
jmp 0x788487
jmp 0x78845f
mov eax, dword [ebp + 0xc]
cmp dword [eax + 8], 0
je 0x78849f
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
push edx
call fcn.00601890
add esp, 4
mov eax, dword [ebp - 8]
push eax
call fcn.00622190
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 8], 0
jne 0x7884ed
push 0xa4
push str..crypto_bio_bss_conn.c
push 0x72
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
push str.host
push 2
call fcn.00613bb0
add esp, 0xc
jmp 0x788924
mov edx, dword [ebp + 0xc]
mov dword [edx], 2
jmp 0x7888fa
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
push edx
call fcn.0078a400
add esp, 8
test eax, eax
jg 0x788523
jmp 0x788924
mov eax, dword [ebp + 0xc]
mov dword [eax], 3
jmp 0x7888fa
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 8], 0
jne 0x788541
jmp 0x788924
mov edx, dword [ebp + 0xc]
add edx, 0x14
push edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push ecx
call fcn.0078a570
add esp, 8
test eax, eax
jg 0x788560
jmp 0x788924
mov edx, dword [ebp + 0xc]
mov dword [edx], 4
jmp 0x7888fa
push 0x10
push 0
mov eax, dword [ebp + 0xc]
add eax, 0x18
push eax
call fcn.007351d0
add esp, 0xc
mov ecx, 2
mov edx, dword [ebp + 0xc]
mov word [edx + 0x18], cx
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [ebp + 0xc]
mov word [edx + 0x1a], ax
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + ecx + 0x10]
shl eax, 0x18
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp + 0xc]
movzx ecx, byte [edx + ecx + 0x10]
shl ecx, 0x10
or eax, ecx
mov edx, 1
shl edx, 1
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + edx + 0x10]
shl edx, 8
or eax, edx
mov ecx, 1
imul edx, ecx, 3
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + edx + 0x10]
or eax, edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x1c], eax
mov edx, dword [ebp + 0xc]
mov dword [edx], 4
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x78867d
push 0xc8
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.00614610
add esp, 0x14
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push ecx
push 0x7cabdc
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
push str.host
push 4
call fcn.00613bb0
add esp, 0x14
push 0xcb
push str..crypto_bio_bss_conn.c
push 0x76
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
jmp 0x788924
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp + 0xc]
mov dword [eax], 8
jmp 0x7888fa
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0xc], 0
je 0x7886f1
push 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x1c]
push eax
call fcn.0078a8c0
add esp, 8
test eax, eax
jne 0x7886f1
push 0xd5
push str..crypto_bio_bss_conn.c
push 0x68
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
push edx
push 0x7cabdc
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
push str.host
push 4
call fcn.00613bb0
add esp, 0x14
jmp 0x788924
mov edx, dword [ebp + 0xc]
mov dword [edx], 5
mov dword [ebp - 0xc], 1
push 4
lea eax, [ebp - 0xc]
push eax
push 8
push 0xffff
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x1c]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jge 0x788780
push 0xe2
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.00614610
add esp, 0x14
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
push ecx
push 0x7cabdc
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
push eax
push str.host
push 4
call fcn.00613bb0
add esp, 0x14
push 0xe5
push str..crypto_bio_bss_conn.c
push 0x6d
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
jmp 0x788924
jmp 0x7888fa
push 0xf
mov ecx, dword [ebp + 8]
push ecx
call fcn.00602790
add esp, 8
push 0x10
mov edx, dword [ebp + 0xc]
add edx, 0x18
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
mov dword [edx + 0x18], 0
cmp dword [ebp - 4], 0
jge 0x788851
mov eax, dword [ebp - 4]
push eax
call fcn.007879c0
add esp, 4
test eax, eax
je 0x7887f3
push 0xc
mov ecx, dword [ebp + 8]
push ecx
call fcn.00603080
add esp, 8
mov edx, dword [ebp + 0xc]
mov dword [edx], 7
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 2
jmp 0x78884a
push 0xf6
push str..crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
push 2
call fcn.00614610
add esp, 0x14
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
push edx
push 0x7cabdc
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
push str.host
push 4
call fcn.00613bb0
add esp, 0x14
push 0xf9
push str..crypto_bio_bss_conn.c
push 0x67
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
jmp 0x788924
mov edx, dword [ebp + 0xc]
mov dword [edx], 6
jmp 0x7888fa
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x1c]
push ecx
call fcn.0078a780
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x7888e4
push 0xf
mov edx, dword [ebp + 8]
push edx
call fcn.00602790
add esp, 8
push 0x104
push str..crypto_bio_bss_conn.c
mov eax, dword [ebp - 0xc]
push eax
push 2
push 2
call fcn.00614610
add esp, 0x14
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
push edx
push 0x7cabdc
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
push ecx
push str.host
push 4
call fcn.00613bb0
add esp, 0x14
push 0x107
push str..crypto_bio_bss_conn.c
push 0x6e
push 0x73
push 0x20
call fcn.00614610
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x788924
mov edx, dword [ebp + 0xc]
mov dword [edx], 6
jmp 0x7888fa
mov dword [ebp - 4], 1
jmp 0x788924
jmp 0x788924
cmp dword [ebp - 0x14], 0
je 0x78891f
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [ebp - 0x14]
add esp, 0xc
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x78891f
jmp 0x788941
jmp 0x7883ad
cmp dword [ebp - 0x14], 0
je 0x788941
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [ebp - 0x14]
add esp, 0xc
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret