Function at 0x1001af2
Capabilities:
Create thread
Initialize winsock library
Set socket configuration

Disassembly:
sub esp, 0x198
and dword [esp], 0
push ebx
push ebp
mov ebp, dword [esp + 0x1a4]
cmp ebp, 1
push esi
push edi
jl 0x1001d53
mov edi, dword [esp + 0x1b0]
mov eax, dword [edi]
add edi, 4
dec ebp
cmp ebp, 1
mov dword [esp + 0x10], eax
jl 0x1001d53
mov ebx, 0x100
mov eax, dword [edi]
mov cl, byte [eax]
cmp cl, 0x2d
je 0x1001b42
cmp cl, 0x2f
jne 0x1001bf4
mov cl, byte [eax + 1]
cmp cl, 0x61
je 0x1001b7c
cmp cl, 0x69
je 0x1001b67
cmp cl, 0x70
jne 0x1001d02
mov dword [0x1003020], 1
jmp 0x1001beb
add eax, 3
push eax
call dword [sym.imp.msvcrt.dll_atoi]
imul eax, eax, 0x3c
pop ecx
mov dword [section..data], eax
jmp 0x1001beb
lea esi, [eax + 3]
jmp 0x1001b82
inc esi
cmp byte [esi], 0x20
je 0x1001b81
jmp 0x1001bba
cmp byte [esi], 0x20
jne 0x1001bbe
and byte [esi], 0
push 0
push eax
inc esi
call fcn.0100215b
mov ecx, dword [0x1003038]
mov dword [ecx*4 + 0x1003160], eax
inc ecx
cmp ecx, ebx
mov dword [0x1003038], ecx
jae 0x1001beb
jmp 0x1001bb5
inc esi
cmp byte [esi], 0x20
je 0x1001bb4
mov eax, esi
jmp 0x1001bbf
inc esi
cmp byte [esi], 0
jne 0x1001b89
cmp dword [0x1003038], ebx
jae 0x1001beb
cmp eax, esi
je 0x1001beb
push 0
push eax
call fcn.0100215b
mov ecx, dword [0x1003038]
inc dword [0x1003038]
mov dword [ecx*4 + 0x1003160], eax
add edi, 4
dec ebp
jmp 0x1001b30
cmp ebp, 1
jl 0x1001d53
push dword [edi]
mov esi, dword [sym.imp.WSOCK32.dll_inet_addr]
call esi
add edi, 4
dec ebp
mov dword [0x1003030], eax
xor ebx, ebx
jmp 0x1001c38
cmp dword [0x1003024], 0x40
jae 0x1001c3c
push dword [edi]
call esi
mov ecx, dword [0x1003024]
inc dword [0x1003024]
add edi, 4
mov dword [ecx*4 + 0x1003060], eax
dec ebp
cmp ebp, ebx
jg 0x1001c14
lea eax, [esp + 0x18]
push eax
push 0x101
call dword [sym.imp.WSOCK32.dll_WSAStartup]
cmp eax, ebx
je 0x1001c58
push eax
push 0x1001390
jmp 0x1001c81
lea eax, [esp + 0x14]
push eax
push ebx
push ebx
push 0x1001a05
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
mov dword [0x1003028], eax
jne 0x1001c8e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1001374
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
jmp 0x1001d6e
xor edi, edi
inc edi
cmp dword [0x100302c], edi
je 0x1001ce1
mov esi, dword [sym.imp.msvcrt.dll_printf]
call dword [sym.imp.msvcrt.dll__getch]
cmp al, 0x44
je 0x1001cbe
cmp al, 0x51
je 0x1001cdb
cmp al, 0x64
je 0x1001cbe
cmp al, 0x71
je 0x1001cdb
push 0x1001340
call esi
jmp 0x1001cd0
call fcn.0100158f
cmp eax, ebx
je 0x1001cd1
push eax
push 0x1001324
call esi
pop ecx
pop ecx
cmp dword [0x100302c], edi
jne 0x1001c9f
jmp 0x1001ce1
mov dword [0x100302c], edi
push 0x2710
push dword [0x1003028]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [0x1003028]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1001d71
mov esi, dword [sym.imp.msvcrt.dll__stricmp]
push 0x1001320
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
je 0x1001d53
push 0x100131c
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
je 0x1001d53
push 0x1001318
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
je 0x1001d53
push 0x1001314
push dword [edi]
call esi
test eax, eax
pop ecx
pop ecx
je 0x1001d53
push dword [edi]
push 0x1001300
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
mov esi, dword [sym.imp.msvcrt.dll_printf]
push 0x10012f4
call esi
push dword [esp + 0x14]
push 0x1001280
call esi
add esp, 0xc
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x198
ret