Function at 0x529310
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x28
mov eax, dword [0x5a83f8]
xor eax, esp
mov dword [esp + 0x24], eax
mov ecx, dword [esp + 0x34]
push ebx
push ebp
mov ebp, dword [esp + 0x38]
mov ebx, ecx
neg ebx
push edi
mov edi, dword [esp + 0x38]
sbb ebx, ebx
mov eax, dword [ebp + 4]
add ebx, 2
sub eax, 2
je 0x5293ae
sub eax, 0x15
je 0x52935a
pop edi
pop ebp
mov eax, 9
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
mov dword [esp + 0xc], 0x1c
xorps xmm0, xmm0
movq qword [esp + 0x24], xmm0
mov eax, 0x17
mov dword [esp + 0x2c], 0
movups xmmword [esp + 0x14], xmm0
mov word [esp + 0x14], ax
test ecx, ecx
je 0x52938c
movzx eax, word [ebp + 0x1a]
jmp 0x529390
movzx eax, word [ebp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [ebp + 8]
mov word [esp + 0x16], ax
mov eax, dword [ebp + 0x5c]
movups xmmword [esp + 0x1c], xmm0
mov dword [esp + 0x2c], eax
jmp 0x5293e9
mov dword [esp + 0xc], 0x10
xorps xmm0, xmm0
mov eax, 2
movups xmmword [esp + 0x14], xmm0
mov word [esp + 0x14], ax
test ecx, ecx
je 0x5293d2
movzx eax, word [ebp + 0x1a]
jmp 0x5293d6
movzx eax, word [ebp + 0x18]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x16], ax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0xb4]
mov ecx, dword [ebp + 4]
push esi
test eax, eax
je 0x52940e
mov eax, dword [eax]
test eax, eax
je 0x52940e
push dword [edi + 0xb8]
push 0
push ebx
push ecx
call eax
add esp, 0x10
jmp 0x529418
push 0
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x529526
push ebp
push esi
call fcn.005297f0
add esp, 8
test eax, eax
jns 0x529485
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x529466
mov eax, dword [eax + 4]
test eax, eax
je 0x529466
push dword [edi + 0xb8]
push esi
call eax
add esp, 8
mov eax, 0xb
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
pop esi
pop edi
pop ebp
mov eax, 0xb
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
cmp dword [esp + 0x44], 0
je 0x5294ba
mov eax, dword [edi + 0xb4]
mov dword [esp + 0x14], 1
test eax, eax
je 0x5294a3
cmp dword [eax], 0
jne 0x5294ba
push 4
lea eax, [esp + 0x18]
push eax
push 1
push 6
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x52951c
mov eax, dword [edi + 0xac]
test eax, eax
je 0x5294d5
push dword [edi + 0xb0]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
js 0x52951c
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
push edi
call fcn.005292d0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x529501
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x529501
cmp eax, 0x2733
jne 0x52951c
mov eax, dword [edi + 0xa4]
test eax, eax
je 0x52953e
push dword [edi + 0xa8]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
jns 0x52953e
push esi
push edi
call fcn.00529290
add esp, 8
pop esi
pop edi
pop ebp
mov eax, 0xb
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
push 0x14
call dword [0x5a8f50]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x52956f
push esi
push edi
call fcn.00529290
add esp, 8
lea eax, [ebx + 0xf]
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
xorps xmm0, xmm0
movups xmmword [ebx], xmm0
mov dword [ebx + 0x10], 0
push 0
mov dword [ebx + 4], esi
mov dword [ebx], ebp
call fcn.0051d8f0
mov ecx, dword [esp + 0x48]
add esp, 4
mov dword [ebx + 0x10], eax
mov dword [ebx + 8], ecx
test eax, eax
jne 0x5295c2
push esi
push edi
call fcn.00529290
push ebx
call dword [0x5a8f58]
add esp, 0xc
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
push ebx
push dword [ebp + 0x64]
test ecx, ecx
je 0x5295d1
call fcn.0051da30
jmp 0x5295d6
call fcn.0051d9d0
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x529612
push esi
push edi
call fcn.00529290
push dword [ebx + 0x10]
call fcn.0051d910
push ebx
call dword [0x5a8f58]
add esp, 0x10
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
push eax
push esi
push dword [edi + 0x98]
call fcn.0051e2f0
add esp, 0xc
test eax, eax
jne 0x529660
push esi
push edi
call fcn.00529290
push dword [ebx + 0x10]
call fcn.0051d910
push dword [esp + 0x1c]
call fcn.0051dab0
push ebx
call dword [0x5a8f58]
add esp, 0x14
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x52967a
push 0
push 1
push esi
push dword [edi + 0xa0]
call eax
add esp, 0x10
cmp dword [esp + 0x44], 0
je 0x529684
mov dword [ebp + 0x68], ebx
mov ecx, dword [esp + 0x34]
xor eax, eax
pop esi
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.0046ec22
add esp, 0x28
ret