Function at 0x578e40
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xc
call fcn.004c03f0
mov dword [ebp - 0xc], 1
mov dword [ebp - 8], 4
cmp dword [ebp + 8], 0xffffffff
jne 0x578e86
push 0xd5
push str.crypto_bio_b_sock2.c
push 0x87
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
push 0x1008
push 0xffff
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WSOCK32.dll_getsockopt]
test eax, eax
jne 0x578eac
cmp dword [ebp - 8], 4
je 0x578eee
push 0xdc
push str.crypto_bio_b_sock2.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0xf
push 2
call fcn.004e9ee0
add esp, 0x14
push 0xdd
push str.crypto_bio_b_sock2.c
push 0x86
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
mov eax, dword [ebp + 0x10]
and eax, 8
neg eax
sbb eax, eax
neg eax
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0054a390
add esp, 8
test eax, eax
jne 0x578f12
xor eax, eax
jmp 0x5790c7
mov edx, dword [ebp + 0x10]
and edx, 4
je 0x578f77
push 4
lea eax, [ebp - 0xc]
push eax
push 8
push 0xffff
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
je 0x578f77
push 0xe7
push str.crypto_bio_b_sock2.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0xe
push 2
call fcn.004e9ee0
add esp, 0x14
push 0xe8
push str.crypto_bio_b_sock2.c
push 0x89
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
mov edx, dword [ebp + 0x10]
and edx, 0x10
je 0x578fd9
push 4
lea eax, [ebp - 0xc]
push eax
push 1
push 6
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
je 0x578fd9
push 0xf0
push str.crypto_bio_b_sock2.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0xe
push 2
call fcn.004e9ee0
add esp, 0x14
push 0xf1
push str.crypto_bio_b_sock2.c
push 0x8a
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
mov edx, dword [ebp + 0xc]
push edx
call fcn.00544f30
add esp, 4
cmp eax, 0x17
jne 0x579050
mov eax, dword [ebp + 0x10]
and eax, 2
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0xc], eax
push 4
lea ecx, [ebp - 0xc]
push ecx
push 0x1b
push 0x29
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WSOCK32.dll_setsockopt]
test eax, eax
je 0x579050
push 0xff
push str.crypto_bio_b_sock2.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0xe
push 2
call fcn.004e9ee0
add esp, 0x14
push pe_nt_image_headers32
push str.crypto_bio_b_sock2.c
push 0x88
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00578da0
add esp, 0xc
test eax, eax
jne 0x57906c
xor eax, eax
jmp 0x5790c7
cmp dword [ebp - 4], 2
je 0x5790c2
push bind
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WSOCK32.dll_listen]
cmp eax, 0xffffffff
jne 0x5790c2
push 0x10a
push str.crypto_bio_b_sock2.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 7
push 2
call fcn.004e9ee0
add esp, 0x14
push 0x10b
push str.crypto_bio_b_sock2.c
push 0x77
push 0x8b
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x5790c7
mov eax, 1
mov esp, ebp
pop ebp
ret