Function at 0x412180
Capabilities:
Set socket configuration

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5e386f
push eax
mov dword fs:[0], esp
sub esp, 0x34
push ebp
mov ebp, ecx
push esi
push edi
mov al, byte [ebp + 0x178]
test al, al
jne 0x412419
mov al, byte [ebp + 0x29]
test al, al
jne 0x412419
mov edx, dword [ebp + 0x20]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x30]
push eax
push ecx
push edx
mov dword [esp + 0x20], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4121ea
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x412419
mov ecx, ebp
call fcn.00413670
mov esi, eax
test esi, esi
je 0x412419
lea eax, [esi + 0x78]
mov dword [esi], edi
mov dword [esi + 0x74], eax
mov dword [esi + 0x70], 0x2000
mov ecx, dword [ebp + 0x174]
push esi
push ecx
push edi
mov ecx, ebp
call fcn.00413180
test eax, eax
jne 0x4122a4
mov dword [esp + 0x18], esi
lea ecx, [esi + 0x54]
mov dword [esp + 0x48], 4
call fcn.00401d20
lea ecx, [esi + 0x44]
mov byte [esp + 0x48], 3
call fcn.00401d20
lea ecx, [esi + 0x34]
mov byte [esp + 0x48], 2
call fcn.00401d20
lea ecx, [esi + 0x24]
mov byte [esp + 0x48], 1
call fcn.00401d20
lea ecx, [esi + 0x14]
mov byte [esp + 0x48], 0
call fcn.00401d20
lea ecx, [esi + 4]
mov dword [esp + 0x48], 0xffffffff
call fcn.00401d20
push esi
call fcn.005c0126
mov esi, dword [sym.imp.WS2_32.dll_closesocket]
add esp, 4
push edi
call esi
mov edx, dword [ebp + 0x20]
push edx
call esi
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x34]
mov dword fs:[0], ecx
add esp, 0x40
ret
lea eax, [esp + 0xf]
push 1
mov byte [esp + 0x13], 1
mov ecx, dword [esi]
push eax
push 8
push 0xffff
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edx, dword [ebp + 0x188]
push 0
lea eax, [esp + 0x13]
push 0
push eax
push 0
push 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], 0x2710
mov edx, dword [esi]
push 0xc
push ecx
push 0x98000004
push edx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
push str.OnAccept
lea ecx, [esp + 0x14]
call fcn.005c4bce
mov eax, dword [0x65290c]
mov dword [esp + 0x48], 5
mov dword [esp + 0x20], eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x48], 6
push ecx
lea ecx, [esp + 0x24]
call fcn.005c4c99
push 0x667780
mov dword [esp + 0x20], 0x667780
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [esp + 0x10]
mov byte [esp + 0x48], 8
call fcn.005c4b60
mov edx, dword [ebp + 0x138]
lea edi, [ebp + 0x130]
push 0
push edx
mov ecx, edi
call fcn.005249a0
mov dword [eax + 8], esi
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x412373
mov dword [ecx], eax
jmp 0x412376
mov dword [edi + 4], eax
push 0x18
mov dword [edi + 8], eax
call fcn.005c00fd
mov edx, eax
add esp, 4
test edx, edx
je 0x41239b
mov ecx, 6
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [edx + 0x14], eax
mov edi, edx
jmp 0x41239d
xor edi, edi
push str.PostQueuedCompletionStatus
push str.KERNEL32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp + 0x174]
push edi
push esi
push 0
push ecx
call eax
test eax, eax
jne 0x4123eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x4123eb
push 1
push esi
mov ecx, ebp
call fcn.004131b0
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x48], 0xffffffff
push edx
jmp 0x41240a
mov eax, dword [ebp + 8]
push 1
push esi
push eax
call dword [ebp + 4]
push esi
mov ecx, ebp
call fcn.00412750
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x48], 0xffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [esp + 0x20]
call fcn.005c4b60
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x40
ret