Function at 0x52d5e0
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0x28
mov eax, dword [0x13413f8]
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 0x52d67e
sub eax, 0x15
je 0x52d62a
pop edi
pop ebp
mov eax, 9
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472272
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 0x52d65c
movzx eax, word [ebp + 0x1a]
jmp 0x52d660
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 0x52d6b9
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 0x52d6a2
movzx eax, word [ebp + 0x1a]
jmp 0x52d6a6
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 0x52d6de
mov eax, dword [eax]
test eax, eax
je 0x52d6de
push dword [edi + 0xb8]
push 0
push ebx
push ecx
call eax
add esp, 0x10
jmp 0x52d6e8
push 0
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x52d7f6
push ebp
push esi
call fcn.0052dac0
add esp, 8
test eax, eax
jns 0x52d755
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x52d736
mov eax, dword [eax + 4]
test eax, eax
je 0x52d736
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.00472272
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.00472272
add esp, 0x28
ret
cmp dword [esp + 0x44], 0
je 0x52d78a
mov eax, dword [edi + 0xb4]
mov dword [esp + 0x14], 1
test eax, eax
je 0x52d773
cmp dword [eax], 0
jne 0x52d78a
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 0x52d7ec
mov eax, dword [edi + 0xac]
test eax, eax
je 0x52d7a5
push dword [edi + 0xb0]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
js 0x52d7ec
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
push edi
call fcn.0052d5a0
add esp, 0x10
cmp eax, 0xffffffff
jne 0x52d7d1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x52d7d1
cmp eax, 0x2733
jne 0x52d7ec
mov eax, dword [edi + 0xa4]
test eax, eax
je 0x52d80e
push dword [edi + 0xa8]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
jns 0x52d80e
push esi
push edi
call fcn.0052d560
add esp, 8
pop esi
pop edi
pop ebp
mov eax, 0xb
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472272
add esp, 0x28
ret
push 0x14
call dword [0x1341f50]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x52d83f
push esi
push edi
call fcn.0052d560
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.00472272
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.00521ba0
mov ecx, dword [esp + 0x48]
add esp, 4
mov dword [ebx + 0x10], eax
mov dword [ebx + 8], ecx
test eax, eax
jne 0x52d892
push esi
push edi
call fcn.0052d560
push ebx
call dword [0x1341f58]
add esp, 0xc
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472272
add esp, 0x28
ret
push ebx
push dword [ebp + 0x64]
test ecx, ecx
je 0x52d8a1
call fcn.00521ce0
jmp 0x52d8a6
call fcn.00521c80
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x52d8e2
push esi
push edi
call fcn.0052d560
push dword [ebx + 0x10]
call fcn.00521bc0
push ebx
call dword [0x1341f58]
add esp, 0x10
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472272
add esp, 0x28
ret
push eax
push esi
push dword [edi + 0x98]
call fcn.00522630
add esp, 0xc
test eax, eax
jne 0x52d930
push esi
push edi
call fcn.0052d560
push dword [ebx + 0x10]
call fcn.00521bc0
push dword [esp + 0x1c]
call fcn.00521d60
push ebx
call dword [0x1341f58]
add esp, 0x14
mov eax, 0xf
pop esi
pop edi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472272
add esp, 0x28
ret
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x52d94a
push 0
push 1
push esi
push dword [edi + 0xa0]
call eax
add esp, 0x10
cmp dword [esp + 0x44], 0
je 0x52d954
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.00472272
add esp, 0x28
ret