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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
mov eax, dword [edi + 0x28]
or ecx, 0xffffffff
xor esi, esi
test eax, eax
cmovne esi, eax
mov eax, dword [edi]
dec eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], esi
cmp eax, 7
ja case.default.0x45c79b
mov dword [ebp - 0x1c], 1
mov edx, 2
jmp dword [eax*4 + 0x45cc20]
mov esi, dword [edi + 4]
test esi, esi
je 0x45ca8a
cmp byte [esi], 0
je 0x45c7c2
mov al, byte [esi]
cmp al, 0x3a
je 0x45c7c2
cmp al, 0x2f
je 0x45c7c2
inc esi
cmp byte [esi], 0
jne 0x45c7b2
movsx eax, byte [esi]
mov dword [ebp - 8], eax
cmp eax, 0x3a
je 0x45c7d2
cmp eax, 0x2f
jne 0x45c849
mov byte [esi], 0
inc esi
cmp dword [ebp - 8], 0x3a
jne 0x45c849
cmp byte [esi], 0
mov eax, esi
je 0x45c7f3
cmp byte [eax], 0x2f
je 0x45c7f0
inc eax
cmp byte [eax], 0
jne 0x45c7e3
jmp 0x45c7f3
mov byte [eax], 0
mov ebx, dword [edi + 8]
test ebx, ebx
je 0x45c827
mov eax, dword [0x59fb4c]
test eax, eax
je 0x45c80b
push 0
push ebx
call eax
add esp, 8
push ebx
call dword [0x594128]
mov eax, dword [0x59fb4c]
add esp, 4
test eax, eax
je 0x45c827
push 1
push 0
call eax
add esp, 8
mov edx, esi
lea ecx, [edx + 1]
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x45c830
sub edx, ecx
mov ecx, esi
call fcn.00436790
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov dword [edi + 8], eax
cmp dword [edi + 8], 0
je 0x45ca41
mov esi, dword [ebp - 0xc]
mov dword [edi], 2
jmp 0x45ca1a
mov ecx, dword [edi + 4]
lea edx, [edi + 0x10]
call fcn.0049fd20
mov ecx, dword [ebp - 4]
test eax, eax
jle case.default.0x45c79b
mov dword [edi], 3
jmp 0x45ca1a
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x45ca6f
lea edx, [edi + 0x14]
call fcn.0049fe40
mov ecx, dword [ebp - 4]
test eax, eax
jle case.default.0x45c79b
mov dword [edi], 4
jmp 0x45ca1a
xorps xmm0, xmm0
movq qword [edi + 0x18], xmm0
movq qword [edi + 0x20], xmm0
movzx eax, word [edi + 0x14]
push eax
mov word [edi + 0x18], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 0x1a], ax
movzx ecx, byte [edi + 0x10]
movzx eax, byte [edi + 0x11]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0x12]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 0x13]
shl ecx, 8
or ecx, eax
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [edi + 0x1c], eax
push 6
push 1
push 2
mov dword [edi], 4
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, eax
mov dword [ebp - 4], ecx
cmp ecx, 0xffffffff
je 0x45caa8
mov dword [ebx + 0x1c], ecx
mov dword [edi], 8
jmp 0x45ca1a
cmp dword [edi + 0xc], 0
je 0x45c938
mov ecx, dword [ebx + 0x1c]
call fcn.004a0220
test eax, eax
je 0x45cafe
push 4
lea eax, [ebp - 8]
push eax
push 8
push 0xffff
mov dword [edi], 5
push dword [ebx + 0x1c]
mov dword [ebp - 8], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
mov dword [ebp - 8], eax
test eax, eax
jns 0x45ca17
push 0xe2
push str.crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 4
push eax
lea ecx, [edx - 2]
call fcn.004144f0
push dword [edi + 8]
push 0x5688a0
push dword [edi + 4]
push str.host
push 4
call fcn.00415160
push 0xe5
push str.crypto_bio_bss_conn.c
push 0x6d
jmp 0x45cae9
and dword [ebx + 0x14], 0xfffffff0
push 0x10
lea eax, [edi + 0x18]
push eax
push dword [ebx + 0x1c]
call dword [sym.imp.WS2_32.dll_connect]
mov ecx, eax
mov dword [ebp - 4], ecx
mov dword [ebx + 0x18], 0
test ecx, ecx
js 0x45cb36
mov dword [edi], 6
jmp 0x45ca1a
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x1007
push 0xffff
push dword [ebx + 0x1c]
mov dword [ebp - 0x14], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
mov ecx, dword [ebp - 0x18]
test eax, eax
cmovs ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x45cbb5
mov dword [edi], 6
mov ecx, dword [ebp - 4]
test esi, esi
je 0x45ca34
push ecx
push dword [edi]
push ebx
call esi
mov ecx, eax
add esp, 0xc
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x45cc14
mov eax, dword [edi]
dec eax
cmp eax, 7
ja case.default.0x45c79b
jmp 0x45c796
push 0xa4
mov edx, 0x73
push str.crypto_bio_bss_conn.c
push 0x72
lea ecx, [edx - 0x53]
call fcn.004144f0
push dword [edi + 4]
push str.host
push 2
call fcn.00415160
add esp, 0x18
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
test esi, esi
je 0x45cc14
push ecx
push dword [edi]
push ebx
call esi
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x8b
mov edx, 0x73
push str.crypto_bio_bss_conn.c
push 0x70
lea ecx, [edx - 0x53]
call fcn.004144f0
add esp, 0xc
jmp 0x45ca6c
push 0xc8
push str.crypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, 4
push eax
lea ecx, [edx - 2]
call fcn.004144f0
push dword [edi + 8]
push 0x5688a0
push dword [edi + 4]
push str.host
push 4
call fcn.00415160
push 0xcb
push str.crypto_bio_bss_conn.c
push 0x76
mov edx, 0x73
lea ecx, [edx - 0x53]
call fcn.004144f0
add esp, 0x2c
jmp 0x45ca6f
push 0xd5
mov edx, 0x73
push str.crypto_bio_bss_conn.c
push 0x68
lea ecx, [edx - 0x53]
call fcn.004144f0
push dword [edi + 8]
push 0x5688a0
push dword [edi + 4]
push str.host
push 4
call fcn.00415160
add esp, 0x20
jmp 0x45ca6f
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp ecx, 0xffffffff
jne 0x45cb64
call esi
mov ecx, eax
call fcn.004415e0
test eax, eax
je 0x45cb64
or dword [ebx + 0x14], 0xc
mov dword [edi], 7
mov dword [ebx + 0x18], 2
jmp 0x45ca6c
push 0xf6
push str.crypto_bio_bss_conn.c
call esi
mov edx, 2
push eax
mov ecx, edx
call fcn.004144f0
push dword [edi + 8]
push 0x5688a0
push dword [edi + 4]
push str.host
push 4
call fcn.00415160
push 0xf9
mov edx, 0x73
push str.crypto_bio_bss_conn.c
push 0x67
lea ecx, [edx - 0x53]
call fcn.004144f0
add esp, 0x2c
jmp 0x45ca6c
and dword [ebx + 0x14], 0xfffffff0
push 0x104
push str.crypto_bio_bss_conn.c
mov edx, 2
push ecx
mov ecx, edx
call fcn.004144f0
push dword [edi + 8]
push 0x5688a0
push dword [edi + 4]
push str.host
push 4
call fcn.00415160
push 0x107
mov edx, 0x73
push str.crypto_bio_bss_conn.c
push 0x6e
lea ecx, [edx - 0x53]
call fcn.004144f0
add esp, 0x2c
xor ecx, ecx
jmp case.default.0x45c79b
mov ecx, 1
jmp case.default.0x45c79b
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret