Function at 0x1002f320
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10086014]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [ebx + 4]
push esi
push edi
mov edi, dword [ebp + 0x28]
add eax, 0x18
mov dword [ebp - 0x2c], ecx
lock inc dword [eax]
cmp dword [ecx], 0xffffffff
jne 0x1002f3c0
mov esi, dword [ebx + 4]
mov dword [edi + 0x1c], 1
call fcn.1002ccc0
mov dword [edi + 8], 0x2719
push edi
push 2
push 0
mov dword [edi], eax
mov dword [edi + 0xc], 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1002f544
lea ebx, [esi + 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1002f3aa
mov dword [eax + 0x14], edi
jmp 0x1002f3ad
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
lea eax, [esi + 0x34]
mov ecx, 1
xchg dword [eax], ecx
push ebx
jmp 0x1002f53e
cmp byte [ebp + 0xc], 0
je 0x1002f3de
mov esi, dword [ebx + 4]
mov dword [edi + 0x1c], 1
call fcn.1002ccc0
mov dword [edi + 8], 1
jmp 0x1002f36e
push 1
push 0
push 0
push dword [ebp + 0x1c]
xorps xmm0, xmm0
push dword [ebp + 0x18]
movlpd qword [ebp - 0x14], xmm0
push dword [ebp + 0x14]
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1002f429
cmp dword [ebp + 0x14], 0x17
mov dword [ebp - 0x10], 0x10086bd4
jne 0x1002f43f
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
push 0x1b
push 0x29
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x1002f43f
call fcn.1002ccc0
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x10], esi
or esi, 0xffffffff
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x1002f46e
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push ecx
lea edx, [ebp - 0x1d]
mov dword [ebp - 0x18], 0x10086bd4
mov byte [ebp - 0x1d], 0
call fcn.1002e9c0
mov eax, dword [ebp - 0x24]
add esp, 8
mov dword [eax], esi
cmp esi, 0xffffffff
jne 0x1002f496
push ecx
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0x14]
push eax
push edi
call fcn.1002e2c0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24
push edi
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push eax
mov eax, dword [ebp + 0x24]
push eax
push eax
mov eax, dword [ebp - 0x2c]
push 0
push dword [ebp - 0x28]
push esi
push dword [eax]
call dword [sym.imp.MSWSOCK.dll_AcceptEx]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test esi, esi
jne 0x1002f4e9
cmp eax, 0x3e5
je 0x1002f4e9
mov ecx, dword [ebx + 4]
push esi
push eax
push edi
call fcn.1002e240
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24
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 0x1002f544
push edi
push 2
push 0
push dword [esi + 0x14]
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
test eax, eax
jne 0x1002f544
lea eax, [esi + 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [edi + 0x14], 0
mov eax, dword [esi + 0x58]
test eax, eax
je 0x1002f52f
mov dword [eax + 0x14], edi
jmp 0x1002f532
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 [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003c310
mov esp, ebp
pop ebp
ret 0x24