Function at 0x4cfff0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x10
push 0
push 0
dec ecx
jne 0x4cfff8
push ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x4d0347
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x506038]
cmp dword [eax], 0xa
jl 0x4d002e
mov eax, dword [0x506148]
cmp dword [eax], 0x3fab
jge 0x4d0100
movzx eax, byte [edi + 0x19]
mov dword [ebp - 0x14], eax
imul eax, dword [edi + 0x1c], 0x3e8
mov dword [ebp - 0x10], eax
imul eax, dword [edi + 0x20], 0x3e8
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 8], eax
push 0
push 0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0xc
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x5059a4]
push eax
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_WSAIoctl
test eax, eax
sete bl
test bl, bl
jne 0x4d031a
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
lea ecx, [ebp - 0x40]
movzx eax, byte [edi + 0x19]
mov dl, 1
call fcn.00421558
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0x11
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x34], eax
mov byte [ebp - 0x30], 0
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x28], 0
mov dword [ebp - 0x24], esi
mov byte [ebp - 0x20], 0
lea ecx, [ebp - 0x44]
xor edx, edx
mov eax, esi
call fcn.00426e38
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0x11
lea eax, [ebp - 0x3c]
push eax
push 4
lea edx, [ebp - 0x48]
mov eax, dword [edi]
call fcn.004083a0
lea eax, [ebp - 0x48]
mov edx, 0x4d0364
call fcn.0040addc
mov edx, dword [ebp - 0x48]
mov ecx, 0x4d038c
mov eax, 2
call fcn.004bbb40
jmp 0x4d031a
cmp byte [edi + 0x19], 1
cmc
sbb eax, eax
mov dword [ebp - 4], eax
push 4
lea eax, [ebp - 4]
push eax
push 8
push 0xffff
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
sete bl
test bl, bl
jne 0x4d0199
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
lea ecx, [ebp - 0x64]
movzx eax, byte [edi + 0x19]
mov dl, 1
call fcn.00421558
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x68]
xor edx, edx
mov eax, esi
call fcn.00426e38
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x6c]
mov eax, dword [edi]
call fcn.004083a0
lea eax, [ebp - 0x6c]
mov edx, 0x4d0364
call fcn.0040addc
mov edx, dword [ebp - 0x6c]
mov ecx, 0x4d0404
mov eax, 2
call fcn.004bbb40
jmp 0x4d031a
cmp byte [edi + 0x19], 0
je 0x4d031a
cmp dword [edi + 0x1c], 0
je 0x4d021d
push 4
lea eax, [edi + 0x1c]
push eax
push 3
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x4d021d
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x70]
xor edx, edx
mov eax, esi
call fcn.00426e38
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x74]
mov eax, dword [edi]
call fcn.004083a0
lea eax, [ebp - 0x74]
mov edx, 0x4d0364
call fcn.0040addc
mov edx, dword [ebp - 0x74]
mov ecx, 0x4d0464
mov eax, 2
call fcn.004bbb40
cmp dword [edi + 0x20], 0
je 0x4d0297
push 4
lea eax, [edi + 0x20]
push eax
push 0x11
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x4d0297
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x20]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x78]
xor edx, edx
mov eax, esi
call fcn.00426e38
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x7c]
mov eax, dword [edi]
call fcn.004083a0
lea eax, [ebp - 0x7c]
mov edx, 0x4d0364
call fcn.0040addc
mov edx, dword [ebp - 0x7c]
mov ecx, 0x4d04c4
mov eax, 2
call fcn.004bbb40
cmp dword [edi + 0x24], 0
je 0x4d031a
push 4
lea eax, [edi + 0x24]
push eax
push 0x10
push 6
mov eax, dword [edi + 0x28]
push eax
call sub.ws2_32.dll_setsockopt
test eax, eax
je 0x4d031a
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x54], 0
lea ecx, [ebp - 0x80]
xor edx, edx
mov eax, esi
call fcn.00426e38
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
lea eax, [ebp - 0x60]
push eax
push 2
lea edx, [ebp - 0x84]
mov eax, dword [edi]
call fcn.004083a0
lea eax, [ebp - 0x84]
mov edx, 0x4d0364
call fcn.0040addc
mov edx, dword [ebp - 0x84]
mov ecx, 0x4d0528
mov eax, 2
call fcn.004bbb40
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d034e
lea eax, [ebp - 0x84]
mov edx, 9
call fcn.0040a0e8
lea eax, [ebp - 0x48]
mov edx, 3
call fcn.0040a0e8
pop eax
jmp eax