Function at 0x4220a0
Capabilities:
Create tcp socket
Receive data
Receive data on socket
Set socket configuration
Start tcp server

Disassembly:
sub esp, 0x664
push ebx
push ebp
push esi
push edi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
xor eax, eax
mov dword [esp + 0x24], eax
push 0x7f000001
mov dword [esp + 0x2c], eax
mov word [esp + 0x28], 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call dword [sym.imp.WS2_32.dll_htonl]
push 0x1f91
mov dword [esp + 0x2c], eax
call dword [sym.imp.WS2_32.dll_htons]
lea ecx, [esp + 0x24]
push 0x10
push ecx
push esi
mov word [esp + 0x32], ax
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x422114
pop edi
pop esi
pop ebp
mov byte [0x45ad50], 0
pop ebx
add esp, 0x664
ret
push 3
push esi
call dword [sym.imp.WS2_32.dll_listen]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
mov edi, eax
push 8
push edi
push esi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov al, byte [0x45ad50]
mov ebp, 1
test al, al
mov dword [esp + 0x174], esi
mov dword [esp + 0x74], edi
mov dword [esp + 0x10], ebp
je 0x4224f0
test ebp, ebp
je 0x4224f0
push 0
push 0x64
lea edx, [esp + 0x7c]
push 0
push edx
push ebp
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
je 0x4224f0
cmp eax, 0x102
je 0x4224e3
cmp eax, ebp
mov dword [esp + 0x18], eax
jae 0x4224e3
lea esi, [esp + eax*4 + 0x74]
lea eax, [esp + eax*4 + 0x174]
lea ebx, [esp + ebp*4 + 0x74]
mov dword [esp + 0x14], eax
lea edi, [esp + ebp*4 + 0x174]
push 0
push 0
push 1
push esi
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
cmp eax, 0xffffffff
je 0x4224c0
cmp eax, 0x102
je 0x4224c0
mov ecx, dword [esp + 0x14]
mov eax, dword [esi]
lea edx, [esp + 0x38]
mov ebp, dword [ecx]
push edx
push eax
push ebp
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
mov al, byte [esp + 0x38]
test al, 1
je 0x4223d1
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x422221
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [edi - 4]
dec ecx
sub edi, 4
sub ebx, 4
mov dword [esp + 0x10], ecx
mov dword [eax], edx
mov ecx, dword [ebx]
mov dword [esi], ecx
jmp 0x4224ad
push 0
lea edx, [esp + 0x278]
push 0x400
push edx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x422481
mov eax, dword [esp + 0x278]
push eax
call dword [sym.imp.WS2_32.dll_ntohl]
add eax, 0xfffffbff
cmp eax, 0x19
ja case.0x42225b.1028
jmp dword [eax*4 + 0x422588]
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.004225f0
add esp, 8
jmp 0x4224c0
lea edx, [esp + 0x274]
push ebp
push edx
call fcn.00422660
add esp, 8
jmp 0x4224c0
lea eax, [esp + 0x274]
push ebp
push eax
call fcn.00422a60
add esp, 8
jmp 0x4224c0
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.00423410
add esp, 8
jmp 0x4224c0
lea edx, [esp + 0x274]
push ebp
push edx
call fcn.00422be0
add esp, 8
jmp 0x4224c0
lea eax, [esp + 0x274]
push ebp
push eax
call fcn.00422f90
add esp, 8
jmp 0x4224c0
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.00422ff0
add esp, 8
jmp 0x4224c0
lea edx, [esp + 0x274]
push ebp
push edx
call fcn.004230c0
add esp, 8
jmp 0x4224c0
lea eax, [esp + 0x274]
push ebp
push eax
call fcn.00423140
add esp, 8
jmp 0x4224c0
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.00423240
add esp, 8
jmp 0x4224c0
lea edx, [esp + 0x274]
push ebp
push edx
call fcn.004232c0
add esp, 8
jmp 0x4224c0
lea eax, [esp + 0x274]
push ebp
push eax
call fcn.00423340
add esp, 8
jmp 0x4224c0
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.004233c0
add esp, 8
jmp 0x4224c0
lea edx, [esp + 0x274]
push ebp
push edx
call fcn.00423570
add esp, 8
jmp 0x4224c0
lea eax, [esp + 0x274]
push ebp
push eax
call fcn.004231c0
add esp, 8
jmp 0x4224c0
lea ecx, [esp + 0x274]
push ebp
push ecx
call fcn.004235f0
add esp, 8
jmp 0x4224c0
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esi]
push edx
jmp 0x42248b
test al, 8
je 0x42247d
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x42251f
lea eax, [esp + 0x20]
lea ecx, [esp + 0x64]
push eax
push ecx
push ebp
mov dword [esp + 0x2c], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x422552
mov eax, dword [esp + 0x10]
cmp eax, 0x40
jl 0x422430
mov edx, dword [edi - 4]
sub edi, 4
dec eax
push edx
mov dword [esp + 0x14], eax
sub ebx, 4
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebx]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
lea ecx, [esp + 0x34]
push 4
push ecx
push 0x1001
push 0xffff
push ebp
mov dword [esp + 0x48], 0x19000
call dword [sym.imp.WS2_32.dll_setsockopt]
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 0x21
push eax
push ebp
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov edx, dword [esp + 0x1c]
mov dword [edi], ebp
mov dword [ebx], edx
mov edx, dword [esp + 0x10]
inc edx
add edi, 4
mov dword [esp + 0x10], edx
add ebx, 4
jmp 0x4224c0
test al, 0x20
je 0x4224c0
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esi]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
mov edx, dword [ebx - 4]
dec ecx
sub edi, 4
sub ebx, 4
mov dword [esp + 0x10], ecx
mov dword [esi], edx
mov ecx, dword [edi]
mov dword [eax], ecx
mov edx, dword [esp + 0x18]
sub eax, 4
dec edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edx
sub esi, 4
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ebp, 4
inc eax
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x10]
add esi, 4
cmp eax, ebp
mov dword [esp + 0x18], eax
jb 0x4221a4
mov al, byte [0x45ad50]
test al, al
jne 0x422150
xor esi, esi
test ebp, ebp
jle 0x422514
mov ecx, dword [esp + esi*4 + 0x174]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esp + esi*4 + 0x74]
push edx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
inc esi
cmp esi, ebp
jl 0x4224f6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x664
ret
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
jle 0x422514
mov eax, dword [esp + esi*4 + 0x174]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + esi*4 + 0x74]
push ecx
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
inc esi
cmp esi, edi
jl 0x422529
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x664
ret
mov edi, dword [esp + 0x10]
xor esi, esi
test edi, edi
jle 0x422514
mov edx, dword [esp + esi*4 + 0x174]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + esi*4 + 0x74]
push eax
call dword [sym.imp.WS2_32.dll_WSACloseEvent]
inc esi
cmp esi, edi
jl 0x42255c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x664
ret