Function at 0x411df0
Capabilities:
Get local ipv4 addresses
Get socket information
Get thread local storage value
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x88
mov eax, dword [0x454004]
xor eax, esp
mov dword [esp + 0x84], eax
push esi
push edi
mov esi, ecx
mov dword [esp + 0x14], 0x10
mov dword [esp + 0x18], 1
mov edi, edx
mov dword [esp + 0xc], edi
test esi, esi
je 0x4121d9
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x38]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
je 0x4121d9
push dword [esp + 0x38]
call dword [sym.imp.WS2_32.dll_ntohl]
mov edx, eax
mov ecx, edi
call fcn.00410150
test eax, eax
jne 0x411ec6
cmp word [esp + 0x34], 2
mov byte [esp + 0x58], al
jne 0x411e86
push 2
push eax
push eax
push 0x32
lea eax, [esp + 0x68]
push eax
push 0x10
lea eax, [esp + 0x4c]
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
lea eax, [esp + 0x58]
mov dword [0x456bd0], edi
push eax
push str.accept_new_connection
push str._s:__s_is_not_allowed_to_connect
push 0x456960
call fcn.004064e0
add esp, 0x10
push dword [esp + 0x20]
call dword [sym.imp.WS2_32.dll_closesocket]
pop edi
pop esi
mov ecx, dword [esp + 0x84]
xor ecx, esp
call fcn.00423c62
mov esp, ebp
pop ebp
ret
push 0
push 1
push dword [esp + 0x28]
mov dword [0x456bd0], edi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
movzx eax, byte [esi + 0x24]
mov byte [esp + 0x44], al
movzx eax, byte [esi + 0x25]
mov byte [esp + 0x45], al
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x411f2f
mov dword [0x456bd0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00433516
add esp, 4
push eax
push str.accept_new_connection
push str._s:_getsockname___failed:__s
push 0x456960
call fcn.004064e0
add esp, 0x10
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [esp + 0x18]
push 4
push eax
push 8
push 0xffff
push dword [esp + 0x30]
call esi
test eax, eax
je 0x411f7a
mov dword [0x456bd0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00433516
add esp, 4
push eax
push str.accept_new_connection
push str._s:_setsockopt_SOL_SOCKET_SO_KEEPALIVE__failed:__s
push 0x456960
call fcn.004064e0
add esp, 0x10
test edi, edi
je 0x412059
mov eax, dword [edi + 0x94]
test eax, eax
je 0x412004
mov ecx, 0x44fcfc
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x411fb1
test dl, dl
je 0x411fad
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x411fb1
add eax, 2
add ecx, 2
test dl, dl
jne 0x411f91
xor eax, eax
jmp 0x411fb6
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412004
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 1
push eax
push 1
push 6
push dword [esp + 0x30]
call esi
test eax, eax
je 0x412004
mov dword [0x456bd0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00433516
add esp, 4
push eax
push str.accept_new_connection
push str._s:_setsockopt_IPPROTO_TCP_TCP_NODELAY__failed:__s
push 0x456960
call fcn.004064e0
add esp, 0x10
mov eax, dword [edi + 0x64]
test eax, eax
je 0x412059
push eax
call fcn.0042e1a6
add esp, 4
lea ecx, [eax - 1]
cmp ecx, 0x270e
ja 0x412059
mov esi, dword [esp + 0x20]
push 4
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push 0x1006
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x14]
push eax
push 0x1005
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
jmp 0x41209d
mov esi, dword [esp + 0x20]
lea eax, [esp + 0x10]
push 4
push eax
push 0x1006
push 0xffff
push esi
mov dword [esp + 0x24], 0x2710
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [esp + 0x14]
push eax
push 0x1005
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test edi, edi
je 0x4121d9
push 0xffffffffffffffff
push dword [edi + 0xe4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi], 0
jne 0x41212a
mov eax, dword [edi + 0x42c]
mov ecx, dword [edi + 0x428]
sub ecx, eax
cmp ecx, 0x14
jl 0x41212a
push dword [0x456c8c]
add edi, 0x450
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov dword [esp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0x18]
mov edx, dword [edi + 0x1c]
mov ecx, dword [esp + 8]
push edi
mov ecx, dword [ecx + 8]
mov dword [edx + esi*4], ecx
inc dword [edi + 0x18]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0xc]
push dword [edi + 0xe4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xffffffffffffffff
push dword [eax + 8]
call esi
push 0xffffffffffffffff
push dword [edi + 0xe4]
call esi
cmp dword [edi], 0
je 0x4120b0
mov eax, dword [edi + 0x42c]
mov ecx, dword [edi + 0x428]
sub ecx, eax
cmp ecx, 0x14
jge 0x412184
mov eax, dword [edi + 0x428]
mov ecx, 0x14
cdq
idiv ecx
movups xmm0, xmmword [esp + 0x20]
lea eax, [edx + edx*4]
movups xmmword [edi + eax*8 + 0x108], xmm0
movups xmm0, xmmword [esp + 0x30]
movups xmmword [edi + eax*8 + 0x118], xmm0
movq xmm0, qword [esp + 0x40]
movq qword [edi + eax*8 + 0x128], xmm0
mov eax, dword [edi + 0x428]
inc eax
mov dword [edi + 0x428], eax
lea esi, [edi + 0x430]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x18], 0
je 0x4121c6
mov eax, dword [esi + 0x1c]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x18]
mov edx, 1
cmp eax, edx
jle 0x4121c2
nop
mov ecx, dword [esi + 0x1c]
mov eax, dword [ecx + edx*4]
mov dword [ecx + edx*4 - 4], eax
inc edx
mov eax, dword [esi + 0x18]
cmp edx, eax
jl 0x4121b0
dec eax
mov dword [esi + 0x18], eax
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [edi + 0xe4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x8c]
pop edi
pop esi
xor ecx, esp
call fcn.00423c62
mov esp, ebp
pop ebp
ret