Function at 0x401000
Capabilities:
Check for time delay via gettickcount
Initialize winsock library

Disassembly:
sub esp, 0x1e4
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
push edi
call esi
push 0x3e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
call esi
sub eax, edi
cmp eax, 0x1f4
jb 0x40127b
xor ebx, ebx
xor ebp, ebp
mov dword [esp + 0x10], ebx
call fcn.00401290
mov esi, dword [esp + 0x1fc]
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
mov ecx, 0xa
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
mov eax, dword [esi]
mov edi, esi
test eax, eax
je 0x4010f8
mov eax, dword [edi]
push str._log
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x401091
mov ecx, dword [edi + 4]
push ecx
call fcn.004012d0
add esp, 4
test eax, eax
je 0x4010d0
mov ebx, dword [edi + 4]
add edi, 4
mov eax, dword [edi + 4]
add edi, 4
test eax, eax
jne 0x401066
test ebx, ebx
je 0x4010f8
push 0x404080
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [0x404640], eax
test eax, eax
jne 0x4010e9
push str.____ERROR:_open_logfile
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1e4
ret
push str.____ERROR:_Must_supply_logfile_name._r_n
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1e4
ret
push 0x16
push str._Start__r_n
call fcn.004021e0
add esp, 8
lea edx, [esp + 0x64]
push edx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0x401fb0
push 2
call dword [sym.imp.MSVCRT.dll_signal]
mov ebx, dword [esp + 0x200]
add esp, 8
cmp ebx, 2
jle 0x401216
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.MSVCRT.dll__stricmp]
push str._listen
push eax
call edi
add esp, 8
test eax, eax
jne 0x40116b
cmp ebx, 4
jl 0x40116b
mov ecx, dword [esi + 8]
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
push ecx
call edi
mov edx, dword [esi + 0xc]
mov ebp, eax
push edx
call edi
add esp, 8
mov dword [0x404644], 1
jmp 0x40121a
mov eax, dword [esi + 4]
push str._tran
push eax
call edi
add esp, 8
test eax, eax
jne 0x4011ba
cmp ebx, 5
jl 0x4011ba
mov ecx, dword [esi + 8]
mov edi, dword [sym.imp.MSVCRT.dll_atoi]
push ecx
call edi
mov edx, dword [esi + 0xc]
mov ebp, eax
push 0x28
lea eax, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
mov ecx, dword [esi + 0x10]
push ecx
call edi
add esp, 0x14
mov dword [esp + 0x10], eax
mov dword [0x404644], 2
jmp 0x401216
mov edx, dword [esi + 4]
push str._slave
push edx
call edi
add esp, 8
test eax, eax
jne 0x401216
cmp ebx, 6
jl 0x401216
mov eax, dword [esi + 8]
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
push 0x28
lea ecx, [esp + 0x40]
push eax
push ecx
call edi
mov edx, dword [esi + 0xc]
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
push edx
call ebx
mov ebp, eax
mov eax, dword [esi + 0x10]
push 0x28
lea ecx, [esp + 0x28]
push eax
push ecx
call edi
mov edx, dword [esi + 0x14]
push edx
call ebx
add esp, 0x20
mov dword [esp + 0x10], eax
mov dword [0x404644], 3
mov eax, dword [esp + 0x10]
mov ecx, dword [0x404644]
dec ecx
je 0x40125d
dec ecx
je 0x40124c
dec ecx
je 0x401236
mov eax, dword [esi]
push eax
call fcn.004012a0
add esp, 4
jmp 0x401267
lea ecx, [esp + 0x14]
push eax
push ecx
lea edx, [esp + 0x44]
push ebp
push edx
call fcn.004016a0
add esp, 0x10
jmp 0x401267
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call fcn.00401490
add esp, 0xc
jmp 0x401267
push eax
push ebp
call fcn.004012f0
add esp, 8
mov eax, dword [0x404644]
test eax, eax
je 0x401275
call fcn.00401fd0
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1e4
ret