Function at 0x52d760
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 0x52d7fe
sub eax, 0x15
je 0x52d7aa
pop edi
pop ebp
mov eax, 9
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472312
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 0x52d7dc
movzx eax, word [ebp + 0x1a]
jmp 0x52d7e0
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 0x52d839
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 0x52d822
movzx eax, word [ebp + 0x1a]
jmp 0x52d826
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 0x52d85e
mov eax, dword [eax]
test eax, eax
je 0x52d85e
push dword [edi + 0xb8]
push 0
push ebx
push ecx
call eax
add esp, 0x10
jmp 0x52d868
push 0
push ebx
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
je 0x52d976
push ebp
push esi
call fcn.0052dc40
add esp, 8
test eax, eax
jns 0x52d8d5
mov eax, dword [edi + 0xb4]
test eax, eax
je 0x52d8b6
mov eax, dword [eax + 4]
test eax, eax
je 0x52d8b6
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.00472312
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.00472312
add esp, 0x28
ret
cmp dword [esp + 0x44], 0
je 0x52d90a
mov eax, dword [edi + 0xb4]
mov dword [esp + 0x14], 1
test eax, eax
je 0x52d8f3
cmp dword [eax], 0
jne 0x52d90a
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 0x52d96c
mov eax, dword [edi + 0xac]
test eax, eax
je 0x52d925
push dword [edi + 0xb0]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
js 0x52d96c
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push esi
push edi
call fcn.0052d720
add esp, 0x10
cmp eax, 0xffffffff
jne 0x52d951
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2734
je 0x52d951
cmp eax, 0x2733
jne 0x52d96c
mov eax, dword [edi + 0xa4]
test eax, eax
je 0x52d98e
push dword [edi + 0xa8]
push ebx
push esi
call eax
add esp, 0xc
test eax, eax
jns 0x52d98e
push esi
push edi
call fcn.0052d6e0
add esp, 8
pop esi
pop edi
pop ebp
mov eax, 0xb
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00472312
add esp, 0x28
ret
push 0x14
call dword [0x1341f50]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x52d9bf
push esi
push edi
call fcn.0052d6e0
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.00472312
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.00521d00
mov ecx, dword [esp + 0x48]
add esp, 4
mov dword [ebx + 0x10], eax
mov dword [ebx + 8], ecx
test eax, eax
jne 0x52da12
push esi
push edi
call fcn.0052d6e0
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.00472312
add esp, 0x28
ret
push ebx
push dword [ebp + 0x64]
test ecx, ecx
je 0x52da21
call fcn.00521e40
jmp 0x52da26
call fcn.00521de0
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
jne 0x52da62
push esi
push edi
call fcn.0052d6e0
push dword [ebx + 0x10]
call fcn.00521d20
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.00472312
add esp, 0x28
ret
push eax
push esi
push dword [edi + 0x98]
call fcn.005226b0
add esp, 0xc
test eax, eax
jne 0x52dab0
push esi
push edi
call fcn.0052d6e0
push dword [ebx + 0x10]
call fcn.00521d20
push dword [esp + 0x1c]
call fcn.00521ec0
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.00472312
add esp, 0x28
ret
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x52daca
push 0
push 1
push esi
push dword [edi + 0xa0]
call eax
add esp, 0x10
cmp dword [esp + 0x44], 0
je 0x52dad4
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.00472312
add esp, 0x28
ret