Function at 0x1001c52
Capabilities:
Create thread
Set socket configuration

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x1003018]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x110], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0x10c], eax
mov eax, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x20]
mov dword [ebp - 0x118], eax
xor eax, eax
push eax
push eax
push eax
push eax
mov dword [ebp - 0x108], 1
call esi
xor ecx, ecx
cmp eax, ecx
mov dword [0x1003038], eax
jne 0x1001cc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x3f3
call fcn.010016b2
jmp 0x1001f43
push ecx
push ecx
push 1
push ecx
call esi
test eax, eax
mov dword [0x1003030], eax
je 0x1001cac
push 0x100
lea eax, [ebp - 0x104]
push eax
mov dword [0x1003200], ebx
call fcn.01002107
cmp eax, 0xffffffff
jne 0x1001d03
push 0x3e8
push 2
call fcn.01001f58
pop ecx
pop ecx
push 2
jmp 0x1001f45
mov eax, dword [edi]
xor ecx, ecx
mov esi, edi
jmp 0x1001d20
lea edx, [eax + 1]
mov bl, byte [eax]
inc eax
test bl, bl
jne 0x1001d0e
sub eax, edx
add esi, 4
lea ecx, [ecx + eax + 1]
mov eax, dword [esi]
test eax, eax
jne 0x1001d0b
push ecx
call dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x114], ebx
jne 0x1001d42
push 0x3e9
jmp 0x1001f3a
cmp dword [edi], 0
mov eax, edi
je 0x1001d70
mov edx, dword [eax]
mov esi, ebx
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x1001d4d
jmp 0x1001d5a
inc ebx
cmp byte [ebx], 0
jne 0x1001d59
add eax, 4
cmp dword [eax], 0
je 0x1001d70
mov byte [ebx], 0x20
inc ebx
cmp dword [eax], 0
jne 0x1001d49
push 0x10011f4
push dword [ebp - 0x118]
call dword [sym.imp.WS2_32.dll_getservbyname]
test eax, eax
jne 0x1001da5
push dword [ebp - 0x118]
push dword [0x1003200]
push 0x3ea
push 2
call fcn.01001f58
add esp, 0x10
jmp 0x1001cfc
mov ecx, dword [ebp + 0x18]
sub ecx, 0
je 0x1001dfa
dec ecx
je 0x1001dd4
push dword [0x1003200]
push 0x3eb
push 2
call fcn.01001f58
mov ecx, dword [ebp - 4]
add esp, 0xc
pop edi
pop esi
pop ebx
call fcn.010021a2
leave
ret 0x1c
movzx eax, word [eax + 8]
push 0x1003008
push dword [ebp - 0x114]
push 0
push dword [ebp - 0x10c]
push eax
lea eax, [ebp - 0x110]
push eax
call sub.MSWSOCK.dll_rexec
jmp 0x1001e2e
mov ecx, dword [ebp - 0x10c]
test ecx, ecx
jne 0x1001e0a
lea ecx, [ebp - 0x104]
movzx eax, word [eax + 8]
push 0x1003008
push dword [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x104]
push ecx
push eax
lea eax, [ebp - 0x110]
push eax
call sub.MSWSOCK.dll_rcmd
cmp eax, 0xffffffff
mov dword [0x1003004], eax
jne 0x1001e52
push dword [0x1003200]
push 0x3ec
push 2
call fcn.01001f58
add esp, 0xc
jmp 0x1001f43
cmp dword [0x1003008], 0xffffffff
jne 0x1001e68
push dword [0x1003200]
push 0x3ed
jmp 0x1001e43
test byte [ebp + 0x1c], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, 0xffff
je 0x1001ec8
push 4
lea ecx, [ebp - 0x108]
push ecx
push 1
push edi
push eax
call esi
test eax, eax
jge 0x1001ea1
call ebx
call ebx
push eax
push 0x10011d8
call sub.MSWSOCK.dll_s_perror
push 4
lea eax, [ebp - 0x108]
push eax
push 1
push edi
push dword [0x1003008]
call esi
test eax, eax
jge 0x1001ec8
call ebx
call ebx
push eax
push 0x10011b8
call sub.MSWSOCK.dll_s_perror
push 4
lea eax, [ebp - 0x108]
push eax
push 8
push edi
push dword [0x1003004]
call esi
test eax, eax
jge 0x1001eef
call ebx
call ebx
push eax
push 0x1001194
call sub.MSWSOCK.dll_s_perror
push 4
lea eax, [ebp - 0x108]
push eax
push 8
push edi
push dword [0x1003008]
call esi
test eax, eax
jge 0x1001f16
call ebx
call ebx
push eax
push 0x1001170
call sub.MSWSOCK.dll_s_perror
push 0x10031fc
xor esi, esi
push esi
push esi
push 0x100198f
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
mov dword [0x1003034], eax
jne 0x1001f4a
push 0x3ee
push 2
call fcn.01001f58
pop ecx
pop ecx
push 1
call fcn.01001589
push dword [ebp + 0x18]
call fcn.01001752
int3