Function at 0x1002f560
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x10086014]
xor eax, esp
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x1c]
push edi
mov ecx, dword [esi]
mov edi, dword [ebp + 0x28]
mov dword [esp + 0x14], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], edx
cmp ecx, 0xffffffff
je 0x1002f5d0
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push ecx
lea edx, [esp + 0x1b]
mov dword [esp + 0x40], 0x10086bd4
mov byte [esp + 0x1b], 0
call fcn.1002e9c0
mov edx, dword [esp + 0x20]
add esp, 8
mov dword [esi], 0xffffffff
mov eax, dword [ebx + 4]
add eax, 0x18
lock inc dword [eax]
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x24], eax
mov eax, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x28], eax
mov eax, dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
mov dword [esp + 0x20], eax
test edx, edx
je 0x1002f661
xor eax, eax
lock xadd dword [edx], eax
cmp eax, 1
jne 0x1002f661
mov esi, dword [ebx + 4]
mov dword [edi + 0x1c], eax
call fcn.1002ccc0
push edi
push 2
push 0
mov dword [edi], eax
mov dword [edi + 8], 0x3e3
mov dword [edi + 0xc], 0
push dword [esi + 0x14]
call dword [esp + 0x30]
test eax, eax
jne 0x1002f661
lea eax, [esi + 0x38]
push eax
call dword [esp + 0x28]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1002f649
mov dword [eax + 0x14], edi
jmp 0x1002f64c
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
lea eax, [esi + 0x38]
push eax
call dword [esp + 0x2c]
push 1
push 0
push 0
push dword [ebp + 0x18]
xorps xmm0, xmm0
push dword [ebp + 0x14]
movlpd qword [esp + 0x48], xmm0
push dword [ebp + 0x10]
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1002f6b0
cmp dword [ebp + 0x10], 0x17
mov dword [esp + 0x38], 0x10086bd4
jne 0x1002f6c8
push 4
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x1002f6c8
call fcn.1002ccc0
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x38], esi
or esi, 0xffffffff
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1002f6fe
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
push ecx
lea edx, [esp + 0x1b]
mov dword [esp + 0x48], 0x10086bd4
mov byte [esp + 0x1b], 0
call fcn.1002e9c0
mov eax, dword [esp + 0x1c]
add esp, 8
mov dword [eax], esi
cmp esi, 0xffffffff
jne 0x1002f728
push ecx
mov ecx, dword [ebx + 4]
lea eax, [esp + 0x38]
push eax
push edi
call fcn.1002e2c0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24
push edi
lea eax, [esp + 0x34]
mov dword [esp + 0x34], 0
push eax
mov eax, dword [ebp + 0x20]
push eax
push eax
push 0
push dword [esp + 0x40]
push esi
push dword [esp + 0x38]
call dword [sym.imp.MSWSOCK.dll_AcceptEx]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x1002f77e
cmp eax, 0x3e5
je 0x1002f77e
mov ecx, dword [ebx + 4]
push esi
push eax
push edi
call fcn.1002e240
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x38]
xor ecx, esp
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x1002f79c
xor eax, eax
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x1002f79c
push edi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CancelIoEx]
mov esi, dword [ebx + 4]
lea ecx, [edi + 0x1c]
mov ebx, 1
xor eax, eax
mov edx, ebx
lock cmpxchg dword [ecx], edx
cmp eax, ebx
jne 0x1002f7f1
push edi
push 2
push 0
push dword [esi + 0x14]
call dword [esp + 0x30]
test eax, eax
jne 0x1002f7f1
lea eax, [esi + 0x38]
push eax
call dword [esp + 0x28]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1002f7de
mov dword [eax + 0x14], edi
jmp 0x1002f7e1
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
xchg dword [eax], ebx
lea eax, [esi + 0x38]
push eax
call dword [esp + 0x2c]
mov ecx, dword [esp + 0x44]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24