Function at 0x40fe40
Capabilities:
Set socket configuration

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x492040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x308]
push esi
push edi
mov edi, dword [ebx + 8]
lea esi, [ecx + 0x30c]
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 0x1c], ecx
mov eax, dword [edi]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edi
call dword [sym.imp.MSVCP140.dll__Mtx_lock]
add esp, 4
test eax, eax
jne 0x41002d
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
je 0x40ffbe
push dword [ebp - 8]
call dword [sym.imp.libssl_3.dll_SSL_new]
mov dword [ebp - 0x18], eax
add esp, 4
mov eax, dword [ebp - 0x1c]
add eax, 0x30c
push eax
call dword [sym.imp.MSVCP140.dll__Mtx_unlock]
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x410002
lea eax, [ebp - 8]
mov dword [ebp - 8], 1
push eax
push 0x8004667e
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0
push dword [ebp - 0x20]
call dword [sym.imp.libcrypto_3.dll_BIO_new_socket]
push 0
push 1
push 0x66
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.libcrypto_3.dll_BIO_ctrl]
mov eax, dword [ebp - 8]
push eax
push eax
push dword [ebp - 0x18]
call dword [sym.imp.libssl_3.dll_SSL_set_bio]
mov eax, dword [ebp - 0x1c]
add esp, 0x24
add eax, 8
cmp dword [eax + 0x14], 0xf
jbe 0x40ff29
mov eax, dword [eax]
push eax
push 0
push 0x37
push dword [ebp - 0x18]
call dword [sym.imp.libssl_3.dll_SSL_ctrl]
add esp, 0x10
lea ecx, [ebp - 0x14]
push dword [ebp - 0x18]
call fcn.00410040
cmp al, 1
jne 0x40ff92
push 0
push 0
push 0x66
push dword [ebp - 8]
call dword [sym.imp.libcrypto_3.dll_BIO_ctrl]
add esp, 0x10
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x8004667e
push dword [ebp - 0x20]
call eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 4], eax
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0044ec8d
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8
push dword [ebp - 0x18]
call dword [sym.imp.libssl_3.dll_SSL_shutdown]
mov eax, dword [ebp - 0x1c]
add esp, 4
add eax, 0x30c
push eax
call dword [sym.imp.MSVCP140.dll__Mtx_lock]
add esp, 4
test eax, eax
jne 0x41002d
mov eax, dword [esi + 0x2c]
cmp eax, 0x7fffffff
jne 0x40ffca
dec eax
push 6
mov dword [esi + 0x2c], eax
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
push dword [ebp - 0x18]
call dword [sym.imp.libssl_3.dll_SSL_free]
mov eax, dword [ebp - 0x1c]
add esp, 4
add eax, 0x30c
push eax
call dword [sym.imp.MSVCP140.dll__Mtx_unlock]
add esp, 4
mov dword [ebp - 8], 0
lea eax, [ebp - 8]
push eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
push 0x8004667e
push dword [ebp - 0x20]
call eax
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x410012
push 2
push eax
call dword [sym.imp.WS2_32.dll_shutdown]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x410026
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0xffffffff
xor al, al
jmp 0x40ff7d
push 5
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Throw_Cpp_error_int_]
int3