Function at 0x401260
Capabilities:
Create tcp socket
Create thread
Execute command
Get hostname
Initialize winsock library
Resolve dns
Start tcp server

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405751
mov eax, dword fs:[0]
push eax
sub esp, 0x66c
mov eax, dword [0x409008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x63c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4012d7
push 0x4036a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Init_Windows_Socket_Failed::
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
push eax
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
or eax, 0xffffffff
jmp 0x401acf
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x658], eax
cmp eax, 0xffffffff
jne 0x401300
push 0x4036a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.Create_Socket_Failed::
jmp 0x4012b3
push 0x104
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
push str.127.0.0.1
lea eax, [ebp - 0x110]
push 0xff
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
add esp, 0xc
mov edx, 0x406334
push 0x4036a0
call fcn.004033c0
lea edx, [ebp - 0x110]
mov ecx, eax
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
mov esi, dword [sym.imp.WS2_32.dll_inet_addr]
mov eax, 2
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x110]
push eax
call esi
mov edi, dword [sym.imp.WS2_32.dll_htons]
mov dword [ebp - 0x420], eax
mov eax, dword [0x40941c]
add eax, 0x4e20
push eax
call edi
mov word [ebp - 0x422], ax
xorps xmm0, xmm0
push 0x10
lea eax, [ebp - 0x424]
movq qword [ebp - 0x41c], xmm0
push eax
push dword [ebp - 0x658]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x40141b
inc dword [0x40941c]
mov eax, 2
mov word [ebp - 0x424], ax
lea eax, [ebp - 0x110]
push eax
call esi
mov dword [ebp - 0x420], eax
mov eax, dword [0x40941c]
add eax, 0x4e20
push eax
call edi
mov word [ebp - 0x422], ax
xorps xmm0, xmm0
push 0x10
lea eax, [ebp - 0x424]
movq qword [ebp - 0x41c], xmm0
push eax
push dword [ebp - 0x658]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x4013c2
mov eax, dword [0x40941c]
mov edx, 0x406348
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
add eax, 0x4e20
push 0x4036a0
push eax
call fcn.004033c0
lea edx, [ebp - 0x110]
mov ecx, eax
call fcn.004033c0
mov edx, str._Port:
mov ecx, eax
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
mov edi, dword [ebp - 0x658]
push 0xa
push edi
call dword [sym.imp.WS2_32.dll_listen]
push 0x4036a0
test eax, eax
je 0x40148c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.listen_Socket_Failed::
jmp 0x4012b3
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, 0x406364
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push 0xff
lea eax, [ebp - 0x210]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
xorps xmm0, xmm0
mov dword [ebp - 0x45c], 0
movups xmmword [ebp - 0x46c], xmm0
add esp, 0xc
mov dword [ebp - 0x458], 0xf
movups xmmword [ebp - 0x454], xmm0
mov byte [ebp - 0x46c], 0
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x440], 0xf
mov byte [ebp - 0x454], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x42c], 0
push 5
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x46c]
push str.admin
mov dword [ebp - 0x43c], 0xfff1
call fcn.00403130
push 0x12
push str.hi_This_is_Server_
lea ecx, [ebp - 0x454]
call fcn.00403130
mov esi, dword [0x409434]
lea eax, [ebp - 0x46c]
mov dword [ebp - 0x434], 0xa0
push eax
cmp esi, dword [0x409438]
je 0x4015d7
mov ecx, esi
mov dword [ebp - 0x650], esi
call fcn.00402ec0
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 1
push eax
lea ecx, [esi + 0x18]
call fcn.00402ec0
mov eax, dword [ebp - 0x43c]
mov dword [esi + 0x30], eax
mov eax, dword [ebp - 0x438]
mov dword [esi + 0x34], eax
mov eax, dword [ebp - 0x434]
mov dword [esi + 0x38], eax
mov eax, dword [ebp - 0x430]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x42c]
mov dword [esi + 0x40], eax
mov byte [ebp - 4], 0
add dword [0x409434], 0x44
jmp 0x4015f0
push esi
mov ecx, 0x409430
call fcn.00404340
nop dword [eax]
nop word [eax + eax]
lea eax, [ebp - 0x428]
mov dword [ebp - 0x428], 0x10
push eax
lea eax, [ebp - 0x64c]
push eax
push edi
call dword [sym.imp.WS2_32.dll_accept]
mov ecx, dword [0x40944c]
mov esi, eax
mov dword [ebp - 0x650], esi
cmp ecx, dword [0x409450]
je 0x401630
mov dword [ecx], esi
add dword [0x40944c], 4
jmp 0x40163d
lea eax, [ebp - 0x650]
push eax
push ecx
call fcn.00403e20
push 0x4036a0
cmp esi, 0xffffffff
je 0x401a0e
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push 0x4036a0
push dword [ebp - 0x64a]
push dword [ebp - 0x648]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, 0x4063ac
mov esi, eax
call fcn.004033c0
mov edx, esi
mov ecx, eax
call fcn.004033c0
mov edx, 0x4063a8
mov ecx, eax
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_short_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
mov eax, dword [0x409424]
cmp eax, dword [0x409428]
jne 0x401973
xor eax, eax
mov dword [ebp - 0x660], eax
nop
push eax
lea eax, [ebp - 0x210]
push 0x4063b8
push eax
call fcn.004036d0
xorps xmm0, xmm0
mov dword [ebp - 0x668], 0
lea edi, [ebp - 0x210]
mov dword [ebp - 0x664], 0
add esp, 0xc
lea ecx, [edi + 1]
movups xmmword [ebp - 0x678], xmm0
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x401700
sub edi, ecx
cmp edi, 0x7fffffff
ja 0x401aef
mov dword [ebp - 0x664], 0xf
cmp edi, 0x10
jae 0x40175d
push edi
lea eax, [ebp - 0x210]
mov dword [ebp - 0x668], edi
push eax
lea eax, [ebp - 0x678]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov byte [ebp + edi - 0x678], 0
mov ecx, dword [ebp - 0x664]
mov edi, dword [ebp - 0x668]
mov edx, dword [ebp - 0x678]
jmp 0x401810
mov esi, edi
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x40177f
mov esi, accept
mov ecx, accept
mov dword [ebp - 0x654], esi
add ecx, 0x23
jmp 0x4017a5
cmp esi, 0x16
mov eax, 0x16
cmovb esi, eax
mov dword [ebp - 0x654], esi
lea eax, [esi + 1]
cmp eax, 0x1000
jb 0x4017c3
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401aea
push ecx
call fcn.00404a09
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x401a08
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4017da
test eax, eax
je 0x4017d2
push eax
call fcn.00404a09
add esp, 4
jmp 0x4017d4
xor eax, eax
mov dword [ebp - 0x654], esi
push edi
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x65c], eax
push ecx
push eax
mov dword [ebp - 0x678], eax
mov dword [ebp - 0x668], edi
mov dword [ebp - 0x664], esi
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [ebp - 0x65c]
mov ecx, dword [ebp - 0x654]
mov byte [edx + edi], 0
add esp, 0xc
xorps xmm0, xmm0
mov dword [ebp - 0x49c], 0
movups xmmword [ebp - 0x4ac], xmm0
mov dword [ebp - 0x498], 0xf
movups xmmword [ebp - 0x494], xmm0
mov byte [ebp - 0x4ac], 0
mov dword [ebp - 0x484], 0
mov dword [ebp - 0x480], 0xf
mov byte [ebp - 0x494], 0
mov dword [ebp - 0x478], 0
mov dword [ebp - 0x474], 0
mov dword [ebp - 0x470], 0
mov esi, dword [ebp - 0x660]
lea eax, [ebp - 0x678]
add esi, 0xf0
mov byte [ebp - 4], 3
cmp ecx, 0x10
mov dword [ebp - 0x47c], esi
push edi
cmovae eax, edx
lea ecx, [ebp - 0x4ac]
push eax
call fcn.00403130
push esi
lea eax, [ebp - 0x310]
push str.This_is_chat_channel__d
push eax
call fcn.004036d0
lea eax, [ebp - 0x310]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4018c5
sub eax, edx
lea ecx, [ebp - 0x494]
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.00403130
mov eax, dword [0x409428]
lea ecx, [ebp - 0x4ac]
push ecx
cmp eax, dword [0x40942c]
je 0x401908
mov edx, eax
call fcn.004045d0
add esp, 4
add dword [0x409428], 0x40
jmp 0x40190e
push eax
call fcn.00404120
lea ecx, [ebp - 0x4ac]
call fcn.00401f40
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x664]
cmp ecx, 0x10
jb 0x401957
mov edx, dword [ebp - 0x678]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40194d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401a08
push ecx
push edx
call fcn.004049d8
add esp, 8
mov eax, dword [ebp - 0x660]
inc eax
mov dword [ebp - 0x660], eax
cmp eax, 5
jl 0x4016c0
mov edi, dword [ebp - 0x658]
mov ecx, dword [0x409434]
mov eax, 0x78787879
sub ecx, dword [0x409430]
mov esi, dword [ebp - 0x650]
imul ecx
push 0
push 0
sar edx, 5
push esi
mov eax, edx
dec edx
push 0x401b90
shr eax, 0x1f
push 0
add eax, edx
push 0
mov dword [0x409420], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [0x409440]
mov dword [ebp - 0x650], eax
cmp ecx, dword [0x409444]
je 0x4019cf
mov dword [ecx], eax
add dword [0x409440], 4
jmp 0x4019dc
lea eax, [ebp - 0x650]
push eax
push ecx
call fcn.00403fa0
mov ecx, dword [0x409420]
mov eax, dword [0x40943c]
cmp dword [eax + ecx*4], 0
jne 0x4015f0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.Create_Thread_Failed_
push 0x4036a0
call fcn.004033c0
jmp 0x401a2d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.Accept_Failed::
push eax
call fcn.004033c0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
push edi
mov edi, dword [sym.imp.WS2_32.dll_closesocket]
call edi
push esi
call edi
mov eax, dword [0x409440]
xor esi, esi
mov ecx, dword [0x40943c]
sub eax, ecx
test eax, 0xfffffffc
jle 0x401a75
push dword [ecx + esi*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x409440]
inc esi
mov ecx, dword [0x40943c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jl 0x401a57
mov eax, dword [0x40944c]
xor esi, esi
mov ecx, dword [0x409448]
sub eax, ecx
test eax, 0xfffffffc
jle 0x401aaa
nop dword [eax + eax]
push dword [ecx + esi*4]
call edi
mov eax, dword [0x40944c]
inc esi
mov ecx, dword [0x409448]
sub eax, ecx
sar eax, 2
cmp esi, eax
jl 0x401a90
mov esi, dword [sym.imp.WS2_32.dll_WSACleanup]
call esi
call esi
push str.PAUSE
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
lea ecx, [ebp - 0x46c]
call fcn.00401b00
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004049ca
mov esp, ebp
pop ebp
ret
call fcn.00401110
call fcn.004011b0
int3