Function at 0x524210
Capabilities:
Set socket configuration

Disassembly:
push esi
push ebx
sub esp, 0x34
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], 4
cmp ebx, 0xffffffff
je 0x5242d1
lea eax, [esp + 0x2c]
mov dword [esp + 8], 0x1008
mov dword [esp + 0x10], eax
lea eax, [esp + 0x28]
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_getsockopt]
sub esp, 0x14
test eax, eax
jne 0x52426d
cmp dword [esp + 0x2c], 4
je 0x524307
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xa6
mov dword [esp + 8], eax
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 4], 0xf
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xa7
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x86
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
xor esi, esi
add esp, 0x34
mov eax, esi
pop ebx
pop esi
ret
mov dword [esp + 0x10], 0xa0
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x87
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
xor esi, esi
call fcn.0055ae30
add esp, 0x34
mov eax, esi
pop ebx
pop esi
ret
mov eax, dword [esp + 0x48]
mov dword [esp], ebx
shr eax, 3
and eax, 1
mov dword [esp + 4], eax
call fcn.00523d70
mov esi, eax
test eax, eax
je 0x5242c9
test byte [esp + 0x48], 4
jne 0x5243b8
test byte [esp + 0x48], 0x10
jne 0x524450
test byte [esp + 0x48], 2
je 0x524355
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.0051f9f0
cmp eax, 0x17
je 0x524546
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.0051fb90
mov esi, eax
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.0051fb70
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
mov esi, eax
test eax, eax
jne 0x5244e5
cmp dword [esp + 0x28], 2
je 0x5243ae
mov dword [esp + 4], 0x7fffffff
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_listen]
inc eax
push edx
push edx
je 0x5245db
mov esi, 1
jmp 0x5242c9
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 8
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
je 0x52432e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xbc
mov dword [esp + 8], eax
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 4], 0xe
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xbd
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x89
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
xor esi, esi
jmp 0x5242c9
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
je 0x524339
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xc4
mov dword [esp + 8], eax
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 4], 0xe
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xc5
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x8a
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
xor esi, esi
jmp 0x5242c9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xd5
mov dword [esp + 8], eax
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 4], 6
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xd6
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x75
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
xor esi, esi
jmp 0x5242c9
lea eax, [esp + 0x24]
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1b
mov dword [esp + 4], 0x29
mov dword [esp], ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
test eax, eax
je 0x524355
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xcd
mov dword [esp + 8], eax
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 4], 0xe
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xce
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x88
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
xor esi, esi
jmp 0x5242c9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x10], 0xdb
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], eax
mov dword [esp + 4], 7
mov dword [esp], 2
call fcn.0055ae30
mov dword [esp + 0x10], 0xdc
mov dword [esp + 0xc], str.crypto_bio_b_sock2.c
mov dword [esp + 8], 0x77
mov dword [esp + 4], 0x8b
mov dword [esp], 0x20
call fcn.0055ae30
jmp 0x5242c9