Function at 0x422eb0
Capabilities:
Create pipe
Create tcp socket
Create thread
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
push dword [0x438da4]
call fcn.0041e5ac
pop ebx
mov dword [0x46d340], eax
mov eax, dword [0x46cb9c]
mov dword [ebp - 0x44], eax
mov eax, dword [0x42e494]
test eax, eax
je 0x422f87
cmp eax, 0x1000
jle 0x422ef2
mov dword [0x42e494], 0x1000
jmp 0x422f03
cmp eax, 0xff
jg 0x422f03
mov dword [0x42e494], 0x100
imul eax, dword [0x42e494], 0x18
sub esp, 0xc
lea edx, [eax + 0x38]
add eax, 0x1850
push eax
mov dword [ebp - 0x38], edx
call fcn.0042d128
mov ecx, eax
mov dword [0x479774], eax
mov eax, dword [ebp - 0x38]
add eax, ecx
mov dword [ecx + 0xc], eax
lea edx, [eax + 0x800]
add eax, 0x1000
mov dword [ecx + 0x14], eax
mov eax, dword [0x42e494]
mov dword [ecx + 0x10], edx
mov dword [ecx + 8], eax
call fcn.0041e6ea
add esp, 0xc
push 0x400000
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x479778], eax
pop ecx
test eax, eax
jne 0x422f87
push edx
push edx
push str.Heap_allocate_error._Using_default_heap
push dword [0x46347c]
call fcn.0040423a
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0x10
mov dword [0x479778], eax
test byte [0x46c983], 2
je 0x422faa
push 0x400
push 0x42e458
push 0x46c4c8
push 0x46c4c4
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x40], 1
xor ebx, ebx
mov dword [ebp - 0x3c], 0
lea esi, [ebp - 0x34]
push eax
push 0x1c
push 0
push esi
call fcn.0042d1cc
add esp, 0x10
cmp dword [ebp - 0x44], 0
mov word [ebp - 0x34], 2
je 0x422fe8
push eax
push eax
push esi
push dword [ebp - 0x44]
call fcn.0040e32d
add esp, 0x10
mov dword [ebp - 0x44], eax
cmp dword [0x46cb9c], 0
je 0x422ffa
cmp word [ebp - 0x34], 0x17
je 0x423000
jmp 0x423078
cmp dword [ebp + 8], 0
je 0x423078
push eax
push eax
push str.Try_to_bind_IPv6...
push dword [0x46347c]
call fcn.0040423a
add esp, 0xc
push 0x11
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
pop eax
test esi, esi
jns 0x42305b
mov edx, dword [0x46347c]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x4c], edx
call edi
sub esp, 0xc
push eax
call fcn.004037a9
mov esi, eax
call edi
mov edx, dword [ebp - 0x4c]
push esi
push eax
push str.IPv6_socket_error__d__s
push edx
call fcn.0040423a
add esp, 0x20
jmp 0x423078
push eax
push eax
push str.IPv6
push dword [0x46347c]
call fcn.0040423a
mov word [ebp - 0x34], 0x17
add esp, 0x10
jmp 0x4230c2
push esi
push esi
push str.Try_to_bind_IPv4...
push dword [0x46347c]
call fcn.0040423a
add esp, 0xc
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
pop edi
cmp eax, 0xffffffff
jne 0x4230c2
push ebx
push ebx
push 0x4475fa
push dword [0x46347c]
call fcn.0040423a
mov dword [ebp - 0x3c], 0
add esp, 0x10
jmp 0x423342
sub esp, 0xc
push 4
push 0x42e4a4
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
imul eax, dword [ebp - 0x3c], 0x1c
mov word [ebp - 0x32], 0x3500
add esp, 0xc
add eax, 0x46d220
mov dword [ebp - 0x4c], eax
mov edx, 0x1c
cmp word [ebp - 0x34], 2
lea edi, [ebp - 0x34]
mov eax, 0x10
cmovne eax, edx
push edx
push eax
push edi
push esi
call dword [sym.imp.WS2_32.dll_bind]
pop ecx
test eax, eax
je 0x4231a4
mov ecx, dword [0x46347c]
mov edx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x54], ecx
mov dword [ebp - 0x50], edx
call edx
sub esp, 0xc
push eax
call fcn.004037a9
mov edx, dword [ebp - 0x50]
mov edi, eax
call edx
mov ecx, dword [ebp - 0x54]
push edi
push eax
push str.Error._Could_not_bind_socket.___d__s
push ecx
call fcn.0040423a
add esp, 0x20
call fcn.0040e3c0
test eax, eax
jne 0x4230ef
sub esp, 0xc
push esi
call fcn.0040be6c
mov eax, dword [ebp - 0x40]
add esp, 0x10
cmp dword [ebp - 0x44], 0
mov dword [eax*4 + 0x46c678], 0
jne 0x4232de
cmp dword [ebp - 0x3c], 0
jne 0x4232ef
test ebx, ebx
je 0x423195
sub esp, 0xc
push ebx
call fcn.0040be6c
add esp, 0x10
mov dword [0x46c89c], 0
jmp 0x423342
sub esp, 0xc
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0xf0
push 4
push eax
push 4
push 0
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, dword [ebp - 0x40]
mov dword [eax*4 + 0x46c678], esi
push eax
push eax
push 0x1c
push edi
push dword [ebp - 0x4c]
call fcn.0042d1ac
inc dword [ebp - 0x48]
add esp, 0x20
test byte [0x46c979], 0x10
je 0x4232d8
cmp dword [0x46cb9c], 0
je 0x4231fb
cmp word [ebp - 0x34], 0x17
je 0x423201
jmp 0x423246
cmp dword [ebp + 8], 0
je 0x423246
push eax
push 6
push 1
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
pop eax
test ebx, ebx
jns 0x423256
mov edx, dword [0x46347c]
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x50], edx
call edi
sub esp, 0xc
push eax
call fcn.004037a9
mov ebx, eax
call edi
mov edx, dword [ebp - 0x50]
push ebx
push eax
push str.IPv6_socket_error__d__s
push edx
call fcn.0040423a
add esp, 0x20
push eax
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
pop eax
sub esp, 0xc
push 4
push 0x42e4a4
push 4
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
add esp, 0xc
cmp word [ebp - 0x34], 2
mov edx, 0x1c
mov eax, 0x10
push ecx
cmovne eax, edx
push eax
lea eax, [ebp - 0x34]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
pop edi
test eax, eax
je 0x4232a3
call fcn.0040e3c0
test eax, eax
jne 0x423271
jmp 0x423117
push eax
push eax
push 3
push ebx
call dword [sym.imp.WS2_32.dll_listen]
mov eax, dword [ebp - 0x40]
mov dword [eax*4 + 0x46c67c], ebx
lea eax, [ebp - 0x38]
push eax
push 0
push dword [ebp - 0x40]
push 0x421918
push 0x8000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop eax
pop edx
cmp dword [ebp - 0x44], 0
je 0x4232ef
inc dword [ebp - 0x3c]
add dword [ebp - 0x40], 0xa
cmp dword [ebp - 0x3c], 5
jne 0x422fba
cmp dword [ebp - 0x48], 0
je 0x42333b
lea esi, [ebp - 0x38]
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push esi
push 0
push 0
push 0x421918
push 0x8000
push 0x42e458
call ebx
cmp dword [0x47952c], 0
pop edi
pop eax
je 0x42333b
push eax
push eax
push esi
push 0
push 0
push 0x423abf
push 0x8000
push 0x42e458
call ebx
pop edx
pop ecx
mov dword [ebp - 0x3c], 1
mov eax, dword [ebp - 0x3c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret