Function at 0x41f1f0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x492f5e
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x4bad80]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x34]
call fcn.00420830
movzx eax, al
test eax, eax
je 0x41f239
push 5
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor al, al
jmp 0x41f3ca
push 0
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
je 0x41f3c1
mov eax, dword [ebp + 0x18]
and eax, 4
je 0x41f29f
mov dword [ebp - 0x28], 1
push 4
lea ecx, [ebp - 0x28]
push ecx
push 4
push 0xffff
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x41f29f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x41f3ca
cmp dword [ebp + 0x14], 2
jne 0x41f2ee
mov ecx, dword [ebp + 0x18]
and ecx, 0x20
je 0x41f2ee
mov dword [ebp - 0x2c], 1
push 4
lea edx, [ebp - 0x2c]
push edx
push 0x20
push 0xffff
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x41f2ee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
xor al, al
jmp 0x41f3ca
lea ecx, [ebp - 0x24]
call fcn.0041eb80
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
lea ecx, [ebp - 0x24]
call fcn.0041ec50
lea ecx, [ebp - 0x24]
call fcn.004207e0
push eax
lea ecx, [ebp - 0x24]
call fcn.00424a80
push eax
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x41f361
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [ebp - 0x2d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.0041ebc0
mov al, byte [ebp - 0x2d]
jmp 0x41f3ca
cmp dword [ebp + 0x14], 1
jne 0x41f3aa
push SysReAllocString
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x41f3aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [ebp - 0x2e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.0041ebc0
mov al, byte [ebp - 0x2e]
jmp 0x41f3ca
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x24]
call fcn.0041ebc0
xor eax, eax
cmp dword [ebp - 0x10], 0xffffffff
setne al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00478af2
mov esp, ebp
pop ebp
ret 0x14