Function at 0x411c80
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 [0x452004]
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 0x412069
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 0x412069
push dword [esp + 0x38]
call dword [sym.imp.WS2_32.dll_ntohl]
mov edx, eax
mov ecx, edi
call fcn.0040ffe0
test eax, eax
jne 0x411d56
cmp word [esp + 0x34], 2
mov byte [esp + 0x58], al
jne 0x411d16
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 [0x454bb0], edi
push eax
push str.accept_new_connection
push str._s:__s_is_not_allowed_to_connect
push 0x454940
call fcn.00406360
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.00422702
mov esp, ebp
pop ebp
ret
push 0
push 1
push dword [esp + 0x28]
mov dword [0x454bb0], 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 0x411dbf
mov dword [0x454bb0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00431e66
add esp, 4
push eax
push str.accept_new_connection
push str._s:_getsockname___failed:__s
push 0x454940
call fcn.00406360
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 0x411e0a
mov dword [0x454bb0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00431e66
add esp, 4
push eax
push str.accept_new_connection
push str._s:_setsockopt_SOL_SOCKET_SO_KEEPALIVE__failed:__s
push 0x454940
call fcn.00406360
add esp, 0x10
test edi, edi
je 0x411ee9
mov eax, dword [edi + 0x94]
test eax, eax
je 0x411e94
mov ecx, 0x44dccc
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x411e41
test dl, dl
je 0x411e3d
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x411e41
add eax, 2
add ecx, 2
test dl, dl
jne 0x411e21
xor eax, eax
jmp 0x411e46
sbb eax, eax
or eax, 1
test eax, eax
jne 0x411e94
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 0x411e94
mov dword [0x454bb0], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00431e66
add esp, 4
push eax
push str.accept_new_connection
push str._s:_setsockopt_IPPROTO_TCP_TCP_NODELAY__failed:__s
push 0x454940
call fcn.00406360
add esp, 0x10
mov eax, dword [edi + 0x64]
test eax, eax
je 0x411ee9
push eax
call fcn.0042caf6
add esp, 4
lea ecx, [eax - 1]
cmp ecx, 0x270e
ja 0x411ee9
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 0x411f2d
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 0x412069
push 0xffffffffffffffff
push dword [edi + 0xe4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp dword [edi], 0
jne 0x411fba
mov eax, dword [edi + 0x42c]
mov ecx, dword [edi + 0x428]
sub ecx, eax
cmp ecx, 0x14
jl 0x411fba
push dword [0x454c6c]
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 0x411f40
mov eax, dword [edi + 0x42c]
mov ecx, dword [edi + 0x428]
sub ecx, eax
cmp ecx, 0x14
jge 0x412014
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 0x412056
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 0x412052
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 0x412040
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.00422702
mov esp, ebp
pop ebp
ret