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

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
or ebp, 0xffffffff
mov eax, dword [esi + 0x28]
xor edi, edi
test eax, eax
mov dword [esp + 0x10], edi
je 0x1001270f
mov dword [esp + 0x10], eax
mov edi, eax
mov eax, dword [esi]
mov ebx, dword [esp + 0x18]
dec eax
cmp eax, 7
ja case.default.0x1001271f
jmp dword [eax*4 + 0x10012b54]
mov edi, dword [esi + 4]
test edi, edi
je 0x1001293f
mov al, byte [edi]
test al, al
je 0x10012747
cmp al, 0x3a
je 0x10012747
cmp al, 0x2f
je 0x10012747
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x10012737
movsx eax, byte [edi]
cmp eax, 0x3a
mov dword [esp + 0x1c], eax
je 0x10012758
cmp eax, 0x2f
jne 0x1001279a
mov byte [edi], 0
mov eax, dword [esp + 0x1c]
inc edi
cmp eax, 0x3a
jne 0x1001279a
mov al, byte [edi]
mov ecx, edi
test al, al
je 0x1001277e
cmp al, 0x2f
je 0x1001277b
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x1001276d
jmp 0x1001277e
mov byte [ecx], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x1001278e
push eax
call fcn.10077ad0
add esp, 4
push edi
call fcn.10023a00
add esp, 4
mov dword [esi + 8], eax
mov eax, dword [esi + 8]
test eax, eax
je 0x10012960
mov edi, dword [esp + 0x10]
mov dword [esi], 2
jmp 0x10012916
mov ecx, dword [esi + 4]
lea eax, [esi + 0x10]
push eax
push ecx
call fcn.1000ede0
add esp, 8
test eax, eax
jle case.default.0x1001271f
mov dword [esi], 3
jmp 0x10012916
mov eax, dword [esi + 8]
test eax, eax
je case.default.0x1001271f
lea edx, [esi + 0x14]
push edx
push eax
call fcn.1000eef0
add esp, 8
test eax, eax
jle case.default.0x1001271f
mov dword [esi], 4
jmp 0x10012916
lea eax, [esi + 0x18]
xor ecx, ecx
mov edx, eax
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov dword [edx + 0xc], ecx
mov word [eax], 2
mov ax, word [esi + 0x14]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 0x1a], ax
xor eax, eax
mov ah, byte [esi + 0x10]
xor ecx, ecx
mov al, byte [esi + 0x11]
mov cl, byte [esi + 0x12]
shl eax, 8
or eax, ecx
xor edx, edx
mov dl, byte [esi + 0x13]
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 0x10012991
mov dword [ebx + 0x1c], ebp
mov dword [esi], 8
jmp 0x10012916
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10012896
mov eax, dword [ebx + 0x1c]
push 1
push eax
call fcn.1000fab0
add esp, 8
test eax, eax
je 0x100129e1
lea ecx, [esp + 0x1c]
push 4
mov dword [esi], 5
mov edx, dword [ebx + 0x1c]
push ecx
push 8
push 0xffff
push edx
mov dword [esp + 0x30], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
mov dword [esp + 0x1c], eax
jl 0x10012a17
jmp 0x10012916
push 0xf
push ebx
call fcn.10010fa0
mov ecx, dword [ebx + 0x1c]
add esp, 8
lea eax, [esi + 0x18]
push 0x10
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov ebp, eax
mov dword [ebx + 0x18], 0
test ebp, ebp
jl 0x10012a67
jmp 0x10012910
mov edx, dword [ebx + 0x1c]
push edx
call fcn.1000f1c0
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x10012ade
mov dword [esi], 6
test edi, edi
je 0x1001292e
mov eax, dword [esi]
push ebp
push eax
push ebx
call edi
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x10012b4c
mov eax, dword [esi]
dec eax
cmp eax, 7
jbe switch.0x1001271f
jmp case.default.0x1001271f
push 0x94
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x70
push 0x73
push 0x20
call fcn.10026360
mov edi, dword [esp + 0x24]
add esp, 0x14
jmp case.default.0x1001271f
push 0xb1
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x72
push 0x73
push 0x20
call fcn.10026360
mov ecx, dword [esi + 4]
push ecx
push 0x100abde4
push 2
call fcn.10026a50
mov edi, dword [esp + 0x30]
add esp, 0x20
jmp case.default.0x1001271f
push 0xd9
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.10026360
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x100a92d8
push eax
push 0x100abde4
push 4
call fcn.10026a50
push 0xdc
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x76
push 0x73
push 0x20
call fcn.10026360
add esp, 0x3c
jmp case.default.0x1001271f
push 0xe8
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x68
push 0x73
push 0x20
call fcn.10026360
mov ecx, dword [esi + 8]
mov edx, dword [esi + 4]
push ecx
push 0x100a92d8
push edx
push 0x100abde4
push 4
call fcn.10026a50
add esp, 0x28
jmp case.default.0x1001271f
push 0xf6
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 4
push 2
call fcn.10026360
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push eax
push 0x100a92d8
push ecx
push 0x100abde4
push 4
call fcn.10026a50
push 0xf9
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x6d
push 0x73
push 0x20
call fcn.10026360
add esp, 0x3c
jmp case.default.0x1001271f
push ebp
call fcn.10014a20
add esp, 4
test eax, eax
je 0x10012a91
push 0xc
push ebx
call fcn.10010fc0
mov dword [esi], 7
add esp, 8
mov dword [ebx + 0x18], 2
jmp case.default.0x1001271f
push 0x10f
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
push 2
call fcn.10026360
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x100a92d8
push eax
push 0x100abde4
push 4
call fcn.10026a50
push 0x113
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x67
push 0x73
push 0x20
call fcn.10026360
add esp, 0x3c
jmp case.default.0x1001271f
push 0xf
push ebx
call fcn.10010fa0
mov ecx, dword [esp + 0x24]
push 0x120
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push ecx
push 2
push 2
call fcn.10026360
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push 0x100a92d8
push eax
push 0x100abde4
push 4
call fcn.10026a50
push 0x124
push str.D:EjrsysDevworkspacemsvsopensslcrypto_bio_bss_conn.c
push 0x6e
push 0x73
push 0x20
call fcn.10026360
add esp, 0x44
xor ebp, ebp
jmp case.default.0x1001271f
mov ebp, 1
test edi, edi
je 0x10012b4c
mov ecx, dword [esi]
push ebp
push ecx
push ebx
call edi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
pop ecx
ret