Function at 0x423052
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 [0x438ee0]
call fcn.0041e69c
pop ebx
mov dword [0x46e33c], eax
mov eax, dword [0x46db9c]
mov dword [ebp - 0x44], eax
mov eax, dword [0x42e494]
test eax, eax
je 0x423129
cmp eax, 0x1000
jle 0x423094
mov dword [0x42e494], 0x1000
jmp 0x4230a5
cmp eax, 0xff
jg 0x4230a5
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.0042d4e4
mov ecx, eax
mov dword [0x47a774], 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.0041e7da
add esp, 0xc
push 0x400000
push 0
push 0
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [0x47a778], eax
pop ecx
test eax, eax
jne 0x423129
push edx
push edx
push str.Heap_allocate_error._Using_default_heap
push dword [0x46447c]
call fcn.0040423a
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0x10
mov dword [0x47a778], eax
test byte [0x46d983], 2
je 0x42314c
push 0x400
push 0x42e458
push 0x46d4c8
push 0x46d4c4
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.0042d588
add esp, 0x10
cmp dword [ebp - 0x44], 0
mov word [ebp - 0x34], 2
je 0x42318a
push eax
push eax
push esi
push dword [ebp - 0x44]
call fcn.0040e3c0
add esp, 0x10
mov dword [ebp - 0x44], eax
cmp dword [0x46db9c], 0
je 0x42319c
cmp word [ebp - 0x34], 0x17
je 0x4231a2
jmp 0x42321a
cmp dword [ebp + 8], 0
je 0x42321a
push eax
push eax
push str.Try_to_bind_IPv6...
push dword [0x46447c]
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 0x4231fd
mov edx, dword [0x46447c]
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 0x42321a
push eax
push eax
push str.IPv6
push dword [0x46447c]
call fcn.0040423a
mov word [ebp - 0x34], 0x17
add esp, 0x10
jmp 0x423264
push esi
push esi
push str.Try_to_bind_IPv4...
push dword [0x46447c]
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 0x423264
push ebx
push ebx
push 0x44863a
push dword [0x46447c]
call fcn.0040423a
mov dword [ebp - 0x3c], 0
add esp, 0x10
jmp 0x4234e4
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, 0x46e220
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 0x423346
mov ecx, dword [0x46447c]
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.0040e453
test eax, eax
jne 0x423291
sub esp, 0xc
push esi
call fcn.0040bf04
mov eax, dword [ebp - 0x40]
add esp, 0x10
cmp dword [ebp - 0x44], 0
mov dword [eax*4 + 0x46d678], 0
jne 0x423480
cmp dword [ebp - 0x3c], 0
jne 0x423491
test ebx, ebx
je 0x423337
sub esp, 0xc
push ebx
call fcn.0040bf04
add esp, 0x10
mov dword [0x46d89c], 0
jmp 0x4234e4
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 + 0x46d678], esi
push eax
push eax
push 0x1c
push edi
push dword [ebp - 0x4c]
call fcn.0042d568
inc dword [ebp - 0x48]
add esp, 0x20
test byte [0x46d979], 0x10
je 0x42347a
cmp dword [0x46db9c], 0
je 0x42339d
cmp word [ebp - 0x34], 0x17
je 0x4233a3
jmp 0x4233e8
cmp dword [ebp + 8], 0
je 0x4233e8
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 0x4233f8
mov edx, dword [0x46447c]
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 0x423445
call fcn.0040e453
test eax, eax
jne 0x423413
jmp 0x4232b9
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 + 0x46d67c], ebx
lea eax, [ebp - 0x38]
push eax
push 0
push dword [ebp - 0x40]
push 0x421aba
push 0x8000
push 0x42e458
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop eax
pop edx
cmp dword [ebp - 0x44], 0
je 0x423491
inc dword [ebp - 0x3c]
add dword [ebp - 0x40], 0xa
cmp dword [ebp - 0x3c], 5
jne 0x42315c
cmp dword [ebp - 0x48], 0
je 0x4234dd
lea esi, [ebp - 0x38]
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push esi
push 0
push 0
push 0x421aba
push 0x8000
push 0x42e458
call ebx
cmp dword [0x47a52c], 0
pop edi
pop eax
je 0x4234dd
push eax
push eax
push esi
push 0
push 0
push 0x423c61
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