Function at 0x1002441
Capabilities:
Initialize winsock library
Set socket configuration
Terminate process

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x238
mov eax, dword [0x1004078]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
push ebx
inc edi
push esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x238], edi
call fcn.01002e9d
push 0x10041e0
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, 0xffffffff
jne 0x1002493
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x273b
call fcn.01002e5a
push 0x100
push 0x10040e0
call fcn.01002f93
cmp eax, 0xffffffff
jne 0x10024bb
push 0x2710
push 2
call fcn.01002de4
pop ecx
pop ecx
push edi
jmp 0x10029c8
and dword [0x100458c], 0
mov edi, 0x1001220
jmp 0x1002531
sub eax, 0x3f
je 0x100256f
sub eax, 0x22
je 0x100251e
dec eax
je 0x1002509
sub eax, 6
je 0x10024fd
sub eax, 0xa
je 0x10024f5
sub eax, 8
jne 0x1002531
mov dword [0x10040bc], 1
jmp 0x1002531
inc dword [0x10040b8]
jmp 0x1002531
mov dword [0x10040a4], 1
jmp 0x1002531
cmp dword [0x10040b0], 0
jne 0x1002584
mov dword [0x10040ac], 1
jmp 0x1002531
cmp dword [0x10040ac], 0
jne 0x1002584
mov dword [0x10040b0], 1
push edi
push ebx
push esi
call fcn.01002ea5
cmp eax, 0xffffffff
jne 0x10024c9
xor edx, edx
cmp dword [0x10040b0], edx
jne 0x100255a
cmp dword [0x10040ac], edx
jne 0x100255a
mov dword [0x10040b0], 1
mov eax, dword [0x1004080]
sub esi, eax
cmp esi, 2
lea ebx, [ebx + eax*4]
mov dword [ebp - 0x218], ebx
jge 0x1002594
push 0x2713
push 2
call fcn.01002de4
pop ecx
pop ecx
push 2
jmp 0x10029c8
push 0x2711
push 2
call fcn.01002de4
pop ecx
pop ecx
jmp 0x100256f
or dword [0x1004370], 0xffffffff
cmp esi, 2
jle 0x10025aa
mov dword [0x10040b4], 1
cmp dword [0x10040b4], edx
mov eax, 0x1001145
mov ecx, 0x100121c
jne 0x10025be
mov ecx, eax
cmp dword [0x10040b8], edx
je 0x10025cb
mov eax, 0x1001218
mov edi, dword [sym.imp.msvcrt.dll__snprintf]
push ecx
push eax
push 0x1001210
lea eax, [ebp - 0x14]
push 0x10
push eax
call edi
mov byte [ebp - 5], 0
lea ebx, [ebx + esi*4 - 4]
mov edx, dword [ebx]
add esp, 0x14
push edx
call fcn.010012dc
test eax, eax
je 0x1002825
mov byte [eax], 0
inc eax
cmp byte [eax], 0
mov dword [ebp - 0x220], eax
jne 0x1002614
mov dword [ebp - 0x220], 0x1001188
push 0x2e
push dword [ebx]
call dword [sym.imp.msvcrt.dll_strrchr]
test eax, eax
pop ecx
pop ecx
je 0x100263f
mov byte [eax], 0
inc eax
push eax
mov dword [ebp - 0x228], eax
call fcn.01001455
test eax, eax
jne 0x1002649
push 1
jmp 0x10029c8
mov dword [ebp - 0x228], 0x10040e0
and dword [ebp - 0x21c], 0
dec esi
test esi, esi
mov dword [ebp - 0x234], esi
jle 0x100280b
mov edx, dword [ebp - 0x218]
mov dword [ebp - 0x218], edx
mov esi, 0x200
jmp 0x1002678
mov edx, dword [ebp - 0x218]
push dword [edx]
call fcn.010012dc
test eax, eax
je 0x100273d
mov byte [eax], 0
inc eax
cmp byte [eax], 0
mov dword [ebp - 0x224], eax
jne 0x10026a0
mov dword [ebp - 0x224], 0x1001188
push 0x2e
push dword [edx]
call dword [sym.imp.msvcrt.dll_strrchr]
test eax, eax
pop ecx
pop ecx
je 0x10026fc
mov byte [eax], 0
inc eax
push eax
mov dword [ebp - 0x22c], eax
call fcn.01001455
test eax, eax
je 0x10027ec
push dword [ebp - 0x220]
lea eax, [ebp - 0x14]
push dword [ebx]
push dword [ebp - 0x224]
push eax
push dword [ebp - 0x22c]
mov eax, dword [ebp - 0x218]
push dword [eax]
lea eax, [ebp - 0x214]
push 0x10011f0
push esi
push eax
call edi
add esp, 0x24
jmp 0x1002728
push dword [ebp - 0x220]
lea eax, [ebp - 0x14]
push dword [ebx]
push dword [ebp - 0x224]
push eax
mov eax, dword [ebp - 0x218]
push dword [eax]
lea eax, [ebp - 0x214]
push 0x10011d8
push esi
push eax
call edi
add esp, 0x20
lea eax, [ebp - 0x214]
push eax
mov byte [ebp - 0x15], 0
call fcn.01001b7b
jmp 0x10027ec
cmp dword [0x1004370], 0xffffffff
jne 0x10027e4
push dword [ebp - 0x220]
lea eax, [ebp - 0x14]
push eax
push 0x10011cc
lea eax, [ebp - 0x214]
push esi
push eax
call edi
add esp, 0x14
mov byte [ebp - 0x15], 0
mov eax, dword [ebx]
push 0
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x228]
lea eax, [ebp - 0x230]
push 0x10040e0
push 0x202
push eax
call sub.MSWSOCK.dll_rcmd
cmp eax, 0xffffffff
mov dword [0x1004370], eax
je 0x1002638
push 4
lea ecx, [ebp - 0x238]
push ecx
push 8
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x10027d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2712
call fcn.01002e5a
call fcn.010014a6
test eax, eax
jl 0x1002638
mov edx, dword [ebp - 0x218]
push edx
push 1
call fcn.01001721
inc dword [ebp - 0x21c]
mov eax, dword [ebp - 0x21c]
add dword [ebp - 0x218], 4
cmp eax, dword [ebp - 0x234]
jl 0x1002672
mov eax, dword [0x1004370]
cmp eax, 0xffffffff
je 0x10029c2
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x10029c2
cmp dword [0x10040b4], 0
je 0x1002834
push edx
call fcn.01001bae
and dword [ebp - 0x21c], 0
dec esi
test esi, esi
mov dword [ebp - 0x234], esi
jle 0x10029c2
mov esi, 0x200
mov eax, dword [ebp - 0x218]
mov ecx, dword [ebp - 0x21c]
lea edx, [eax + ecx*4]
mov eax, dword [edx]
push eax
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x228], eax
call fcn.010012dc
test eax, eax
jne 0x10028b5
cmp dword [0x10040b8], 0
push dword [ebx]
lea eax, [ebp - 0x214]
push dword [ebp - 0x228]
je 0x10028ae
push 0x10011b8
push esi
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x214]
push eax
mov byte [ebp - 0x15], 0
call fcn.01001b7b
jmp 0x10029aa
push 0x10011ac
jmp 0x1002892
mov byte [eax], 0
inc eax
cmp byte [eax], 0
mov dword [ebp - 0x224], eax
jne 0x10028ce
mov dword [ebp - 0x224], 0x1001188
push 0x2e
push dword [edx]
call dword [sym.imp.msvcrt.dll_strrchr]
test eax, eax
pop ecx
pop ecx
je 0x10028f8
mov byte [eax], 0
inc eax
push eax
mov dword [ebp - 0x22c], eax
call fcn.01001455
test eax, eax
je 0x10029aa
jmp 0x1002902
mov dword [ebp - 0x22c], 0x10040e0
push dword [ebp - 0x224]
lea eax, [ebp - 0x14]
push eax
push 0x10011a0
lea eax, [ebp - 0x214]
push esi
push eax
call edi
mov eax, dword [ebp - 0x220]
add esp, 0x14
mov byte [ebp - 0x15], 0
mov eax, dword [eax]
push 0
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 0x22c]
lea eax, [ebp - 0x230]
push 0x10040e0
push 0x202
push eax
call sub.MSWSOCK.dll_rcmd
cmp eax, 0xffffffff
mov dword [0x1004370], eax
je 0x1002638
push 4
lea ecx, [ebp - 0x238]
push ecx
push 8
push 0xffff
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jge 0x100298f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x2712
call fcn.01002e5a
push ebx
push 1
call fcn.01001dbc
push dword [0x1004370]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [0x1004370], 0xffffffff
inc dword [ebp - 0x21c]
mov eax, dword [ebp - 0x21c]
cmp eax, dword [ebp - 0x234]
jl 0x100284f
push dword [0x10040a0]
call dword [sym.imp.msvcrt.dll_exit]
int3