Function at 0x42126a
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 [0x4333c4]
call fcn.0041c7f1
mov dword [0x4661bc], eax
mov eax, dword [0x4659bc]
pop ecx
mov dword [ebp - 0x3c], eax
mov eax, dword [0x42a494]
test eax, eax
je 0x421346
cmp eax, 0x1000
jle 0x4212aa
mov dword [0x42a494], 0x1000
cmp dword [0x42a494], 0xff
jg 0x4212c0
mov dword [0x42a494], 0x100
imul eax, dword [0x42a494], 0x18
sub esp, 0xc
lea edx, [eax + 0x38]
add eax, 0x1850
push eax
mov dword [ebp - 0x38], edx
call fcn.00428e70
mov edx, dword [ebp - 0x38]
mov dword [0x472c14], eax
add edx, eax
mov dword [eax + 0xc], edx
lea ecx, [edx + 0x800]
add edx, 0x1000
mov dword [eax + 0x14], edx
mov edx, dword [0x42a494]
mov dword [eax + 0x10], ecx
mov ecx, eax
mov dword [eax + 8], edx
call fcn.0041c926
add esp, 0xc
push 0x400000
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
test eax, eax
mov dword [0x472c18], eax
pop edx
jne 0x421346
push eax
push eax
push str.Heap_allocate_error._Using_default_heap
push dword [0x45c29c]
call fcn.0040418c
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0x10
mov dword [0x472c18], eax
test byte [0x4657a3], 2
je 0x421369
push 0x400
push 0x42a458
push 0x4652e8
push 0x4652e4
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x44], 0x465480
mov dword [ebp - 0x48], 0x4660a0
xor ebx, ebx
mov dword [ebp - 0x40], 0
push eax
lea eax, [ebp - 0x34]
push 0x1c
push 0
push eax
call fcn.00428f38
add esp, 0x10
cmp dword [ebp - 0x3c], 0
mov word [ebp - 0x34], 2
je 0x4213b1
push eax
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x3c]
call fcn.0040d440
add esp, 0x10
mov dword [ebp - 0x3c], eax
cmp dword [0x4659bc], 0
je 0x4213c4
cmp word [ebp - 0x34], 0x17
sete al
jmp 0x4213cb
cmp dword [ebp + 8], 0
setne al
test al, al
je 0x421440
push eax
push eax
push str.Try_to_bind_IPv6...
push dword [0x45c29c]
call fcn.0040418c
add esp, 0xc
push 0x11
push 2
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
pop eax
jns 0x421423
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
sub esp, 0xc
push eax
call fcn.0040376b
mov edi, eax
call esi
push edi
push eax
push str.IPv6_socket_error__d__s
push dword [0x45c29c]
call fcn.0040418c
add esp, 0x20
jmp 0x421440
push eax
push eax
push str.IPv6
push dword [0x45c29c]
call fcn.0040418c
mov word [ebp - 0x34], 0x17
add esp, 0x10
jmp 0x421485
push esi
push esi
push str.Try_to_bind_IPv4...
push dword [0x45c29c]
call fcn.0040418c
add esp, 0xc
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov esi, eax
pop edi
jne 0x421485
push ebx
push ebx
xor edi, edi
push 0x4417b5
push dword [0x45c29c]
call fcn.0040418c
add esp, 0x10
jmp 0x4216fa
sub esp, 0xc
push 4
push 0x42a4a4
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
imul eax, dword [ebp - 0x40], 9
mov word [ebp - 0x32], 0x3500
add esp, 0xc
mov dword [ebp - 0x50], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
mov dword [ebp - 0x54], eax
cmp word [ebp - 0x34], 2
mov edx, 0x1c
mov eax, 0x10
cmovne eax, edx
push edx
push eax
lea eax, [ebp - 0x34]
push eax
push esi
call dword [ebp - 0x54]
test eax, eax
pop ecx
je 0x42155c
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
sub esp, 0xc
push eax
call fcn.0040376b
mov dword [ebp - 0x58], eax
call edi
mov edx, dword [ebp - 0x58]
push edx
push eax
push str.Error._Could_not_bind_socket.___d__s
push dword [0x45c29c]
call fcn.0040418c
add esp, 0x20
call fcn.0040d4d3
test eax, eax
mov edi, eax
jne 0x4214b5
sub esp, 0xc
push esi
call fcn.0040aa80
add esp, 0x10
cmp dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x44]
mov dword [eax + 0x18], 0
jne 0x421694
cmp dword [ebp - 0x40], 0
jne 0x4216a9
test ebx, ebx
je 0x42154d
sub esp, 0xc
push ebx
call fcn.0040aa80
add esp, 0x10
mov dword [0x4656bc], 0
jmp 0x4216fa
lea eax, [ebp - 0x38]
sub esp, 0xc
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 - 0x44]
mov dword [eax + 0x18], esi
push eax
push eax
lea eax, [ebp - 0x34]
push 0x1c
push eax
push dword [ebp - 0x48]
call fcn.00428f18
inc dword [ebp - 0x4c]
add esp, 0x20
test byte [0x465799], 0x10
je 0x42168e
cmp dword [0x4659bc], 0
je 0x4215b3
cmp word [ebp - 0x34], 0x17
sete al
jmp 0x4215ba
cmp dword [ebp + 8], 0
setne al
test al, al
je 0x4215fc
push eax
push 6
push 1
push 0x17
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
test ebx, ebx
pop eax
jns 0x42160c
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call ebx
sub esp, 0xc
push eax
call fcn.0040376b
mov edi, eax
call ebx
push edi
push eax
push str.IPv6_socket_error__d__s
push dword [0x45c29c]
call fcn.0040418c
add esp, 0x20
push ecx
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
pop edi
mov ebx, eax
sub esp, 0xc
push 4
push 0x42a4a4
push 4
push 0xffff
push ebx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, dword [sym.imp.WS2_32.dll_bind]
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 edi
test eax, eax
pop edx
je 0x42165b
call fcn.0040d4d3
test eax, eax
jne 0x42162d
jmp 0x4214da
push eax
push eax
push 3
push ebx
call dword [sym.imp.WS2_32.dll_listen]
mov eax, dword [ebp - 0x44]
mov dword [eax + 0x1c], ebx
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x50]
push 0
inc eax
push eax
push 0x41fbe6
push 0x8000
push 0x42a458
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop eax
pop edx
cmp dword [ebp - 0x3c], 0
je 0x4216a9
inc dword [ebp - 0x40]
add dword [ebp - 0x44], 0x24
add dword [ebp - 0x48], 0x1c
cmp dword [ebp - 0x40], 5
jne 0x421380
cmp dword [ebp - 0x4c], 0
je 0x4216f5
lea esi, [ebp - 0x38]
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push esi
push 0
push 0
push 0x41fbe6
push 0x8000
push 0x42a458
call ebx
cmp dword [0x4729cc], 0
pop edi
pop eax
je 0x4216f5
push eax
push eax
push esi
push 0
push 0
push 0x421f10
push 0x8000
push 0x42a458
call ebx
pop edx
pop ecx
mov edi, 1
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret