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

Disassembly:
mov eax, 8
call fcn.0049f020
mov eax, dword [esi + 0x28]
push ebp
push edi
xor edi, edi
or ebp, 0xffffffff
test eax, eax
mov dword [esp + 0xc], edi
je 0x5966f2
mov dword [esp + 0xc], eax
mov edi, eax
mov eax, dword [esi]
sub eax, 1
cmp eax, 7
ja case.default.0x596700
jmp dword [eax*4 + 0x596b30]
mov edi, dword [esi + 4]
test edi, edi
je 0x596994
cmp byte [edi], 0
je 0x596729
mov al, byte [edi]
cmp al, 0x3a
je 0x596729
cmp al, 0x2f
je 0x596729
add edi, 1
cmp byte [edi], 0
jne 0x596717
movsx eax, byte [edi]
cmp eax, 0x3a
mov dword [esp + 8], eax
je 0x59673a
cmp eax, 0x2f
jne 0x59677e
mov byte [edi], 0
add edi, 1
cmp dword [esp + 8], 0x3a
jne 0x59677e
cmp byte [edi], 0
mov eax, edi
je 0x596762
mov edi, edi
cmp byte [eax], 0x2f
je 0x59675f
add eax, 1
cmp byte [eax], 0
jne 0x596750
jmp 0x596762
mov byte [eax], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x596772
push eax
call fcn.004ec7e0
add esp, 4
push edi
call fcn.004f9120
add esp, 4
mov dword [esi + 8], eax
cmp dword [esi + 8], 0
je 0x5969b5
mov edi, dword [esp + 0xc]
mov dword [esi], 2
jmp 0x596969
mov ecx, dword [esi + 4]
lea eax, [esi + 0x10]
push eax
push ecx
call fcn.00598fc0
add esp, 8
test eax, eax
jle case.default.0x596700
mov dword [esi], 3
jmp 0x596969
mov eax, dword [esi + 8]
test eax, eax
je case.default.0x596700
lea edx, [esi + 0x14]
push edx
push eax
call fcn.00598c30
add esp, 8
test eax, eax
jle case.default.0x596700
mov dword [esi], 4
jmp 0x596969
xor eax, eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
movzx eax, word [esi + 0x14]
push eax
mov word [esi + 0x18], 2
call dword [sym.imp.WS2_32.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 dword [sym.imp.WS2_32.dll_htonl]
push 6
push 1
push 2
mov dword [esi + 0x1c], eax
mov dword [esi], 4
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x5969e6
mov dword [ebx + 0x1c], ebp
mov dword [esi], 8
jmp 0x596969
cmp dword [esi + 0xc], 0
je 0x596873
mov eax, dword [ebx + 0x1c]
push 1
push eax
call fcn.00598f70
add esp, 8
test eax, eax
je 0x596a36
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 dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
mov dword [esp + 8], eax
jge 0x596969
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.004ea090
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push 0x60bf70
push ecx
push 0x5f50a4
push 4
call fcn.004ea3b0
push 0xe5
push str..crypto_bio_bss_conn.c
push 0x6d
push 0x73
push 0x20
call fcn.004ea090
add esp, 0x3c
jmp case.default.0x596700
push 0xf
push ebx
call fcn.004ea690
mov ecx, dword [ebx + 0x1c]
add esp, 8
push 0x10
lea eax, [esi + 0x18]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov ebp, eax
test ebp, ebp
mov dword [ebx + 0x18], 0
jge 0x596963
push ebp
call fcn.00596240
add esp, 4
test eax, eax
je 0x596a6c
push 0xc
push ebx
call fcn.004ea6b0
mov dword [esi], 7
add esp, 8
mov dword [ebx + 0x18], 2
jmp case.default.0x596700
mov edx, dword [ebx + 0x1c]
push edx
call fcn.00598de0
add esp, 4
test eax, eax
mov dword [esp + 8], eax
jne 0x596ab9
mov dword [esi], 6
test edi, edi
je 0x596981
mov eax, dword [esi]
push ebp
push eax
push ebx
call edi
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x596b27
mov eax, dword [esi]
sub eax, 1
cmp eax, 7
jbe switch.0x00596700
jmp case.default.0x596700
push 0x8b
push str..crypto_bio_bss_conn.c
push 0x70
push 0x73
push 0x20
call fcn.004ea090
mov edi, dword [esp + 0x20]
add esp, 0x14
jmp case.default.0x596700
push 0xa4
push str..crypto_bio_bss_conn.c
push 0x72
push 0x73
push 0x20
call fcn.004ea090
mov ecx, dword [esi + 4]
push ecx
push 0x5f50a4
push 2
call fcn.004ea3b0
mov edi, dword [esp + 0x2c]
add esp, 0x20
jmp case.default.0x596700
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.004ea090
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x60bf70
push eax
push 0x5f50a4
push 4
call fcn.004ea3b0
push 0xcb
push str..crypto_bio_bss_conn.c
push 0x76
push 0x73
push 0x20
call fcn.004ea090
add esp, 0x3c
jmp case.default.0x596700
push 0xd5
push str..crypto_bio_bss_conn.c
push 0x68
push 0x73
push 0x20
call fcn.004ea090
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push 0x60bf70
push edx
push 0x5f50a4
push 4
call fcn.004ea3b0
add esp, 0x28
jmp case.default.0x596700
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.004ea090
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x60bf70
push eax
push 0x5f50a4
push 4
call fcn.004ea3b0
push 0xf9
push str..crypto_bio_bss_conn.c
push 0x67
push 0x73
push 0x20
call fcn.004ea090
add esp, 0x3c
jmp case.default.0x596700
push 0xf
push ebx
call fcn.004ea690
mov ecx, dword [esp + 0x10]
push 0x104
push str..crypto_bio_bss_conn.c
push ecx
push 2
push 2
call fcn.004ea090
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x60bf70
push eax
push 0x5f50a4
push 4
call fcn.004ea3b0
push 0x107
push str..crypto_bio_bss_conn.c
push 0x6e
push 0x73
push 0x20
call fcn.004ea090
add esp, 0x44
xor ebp, ebp
jmp case.default.0x596700
mov ebp, 1
test edi, edi
je 0x596b27
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