Function at 0x414440
Capabilities:
Create thread
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x443284]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, ecx
movzx ecx, word [esi + 0x1c]
push edi
push ecx
mov dword [esp + 0x1c], eax
mov word [esp + 0x30], 2
call sub.WS2_32.dll_htons
push 0
mov word [esp + 0x32], ax
call sub.WS2_32.dll_htonl
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea edx, [esp + 0x10]
push edx
push 1
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x28]
push 6
push eax
mov dword [esp + 0x20], 1
call edi
mov edx, dword [esi + 0x28]
push 4
lea ecx, [esp + 0x10]
push ecx
push 4
push 0xffff
push edx
call edi
mov ecx, dword [esi + 0x28]
push 0x10
lea eax, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x414619
mov edx, dword [esi + 0x28]
push 3
push edx
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x414619
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x28]
push 8
push eax
push ecx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x414619
mov edx, dword [esi + 0x3c]
mov eax, dword [esi + 0x38]
lea ecx, [esp + 0x28]
push ecx
push 0
push esi
push 0x414750
push 0
push 0
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x4c], eax
push 0xffffffffffffffff
xor ebx, ebx
push ebx
lea edx, [esp + 0x28]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, ebx
je 0x414638
sub eax, 1
jne 0x414546
mov dword [esi + 0xc], ebx
mov edx, dword [esi + 0x28]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x30]
push ecx
push edx
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
cmp edi, 0xffffffff
je 0x414619
push 0x18
call fcn.0041f09a
add esp, 4
cmp eax, ebx
je 0x414524
mov dword [eax], edi
mov ecx, dword [esp + 0x2c]
mov dword [eax + 4], ecx
mov edx, dword [esp + 0x30]
mov dword [eax + 8], edx
mov ecx, dword [esp + 0x34]
mov dword [eax + 0xc], ecx
mov edx, dword [esp + 0x38]
mov ecx, dword [ebp + 0xc]
mov dword [eax + 0x10], edx
lea edx, [esp + 0x10]
push edx
push ebx
push eax
mov dword [eax + 0x14], ecx
mov eax, dword [esp + 0x24]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
test ebx, ebx
je 0x414612
mov ecx, dword [esi + 0x50]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0xc
call fcn.0041f09a
mov dword [eax], ebx
mov dword [eax + 8], edi
mov edx, dword [esp + 0x14]
mov dword [eax + 4], edx
mov edi, dword [esi + 0x60]
mov ecx, dword [edi + 4]
add esp, 4
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push ecx
push edi
call fcn.004148e0
lea ecx, [esi + 0x5c]
mov ebx, eax
call fcn.00414920
mov dword [edi + 4], ebx
mov edx, dword [ebx + 4]
mov dword [edx], ebx
mov eax, dword [esi + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x414524
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 0xc], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0041f134
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [esp + 0x3c]
pop edi
mov dword [esi + 0xc], ebx
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0041f134
mov esp, ebp
pop ebp
ret 8