Function at 0x100016c0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Create thread
Set socket configuration

Disassembly:
sub esp, 0x10
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 4]
push edi
push 1
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x100016e3
mov ecx, ebx
call fcn.10001e30
mov ebp, dword [esp + 0x24]
push ebp
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x100016fc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
lea ecx, [ebx + 0x1f0]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov edi, dword [esp + 0x28]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventW]
push 0
push 1
push 0
push 0
mov dword [ebx + 0x3f0], edi
call esi
push 0
push 1
push 0
push 0
mov dword [ebx + 8], eax
call esi
push 0
push 0
push 1
push 0
mov dword [ebx + 0x90], eax
call esi
push 0
push 0
push 1
push 0
mov dword [ebx + 0xc], eax
call esi
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x30]
test eax, eax
je 0x1000177e
mov ecx, dword [0x10009bb8]
push 0
push edi
push ebp
call fcn.10004de0
push eax
call fcn.10005400
add esp, 0x10
test eax, eax
je 0x10001919
jmp 0x10001836
push 6
push 1
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [ebx + 0x14], eax
jne 0x1000179d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
push edi
mov word [esp + 0x14], 2
call sub.WS2_32.dll_htons
mov word [esp + 0x12], ax
mov eax, dword [ebx + 0x3f4]
cmp eax, 2
je 0x100017e6
cmp eax, 3
je 0x100017e6
lea edx, [esp + 0x14]
push edx
push ebp
call fcn.10006960
add esp, 8
test eax, eax
je 0x100017e6
mov ecx, dword [ebx + 0x14]
lea eax, [esp + 0x10]
push 0x10
push eax
push ecx
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x10001854
cmp dword [ebx + 0x3f4], 1
je 0x100018e5
mov ecx, dword [0x10009bb8]
lea edx, [esp + 0x24]
push edx
push edi
push ebp
call fcn.10004de0
push eax
call fcn.10004df0
add esp, 0x10
cmp eax, 0xffffffff
mov dword [ebx + 0x14], eax
jne 0x1000187f
mov ecx, dword [0x10009bb8]
push 0
push edi
push ebp
call fcn.10004de0
push eax
call fcn.10005400
add esp, 0x10
test eax, eax
je 0x100018e5
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x10001844
mov dword [ecx], 2
mov dword [ebx + 0x8c], 2
mov dword [ebx + 0x1ec], eax
cmp dword [ebx + 0x8c], 2
jne 0x10001925
mov ebp, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push ebx
push 0x10002290
push 0
push 0
call ebp
mov dword [ebx + 0x20], eax
jmp 0x1000195a
mov edx, dword [esp + 0x24]
test edx, edx
je 0x100018e5
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x10001894
mov ecx, dword [edx + 8]
mov dword [eax], ecx
mov eax, dword [edx + 8]
lea edi, [edx + 0x13]
mov dword [ebx + 0x8c], eax
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xec]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [edx + 8], 1
jne 0x10001854
push 0
push 0
push ebx
push 0x10002230
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x1c], eax
jmp 0x10001854
cmp dword [ebx + 0x3f4], 3
jne 0x10001919
lea ecx, [esp + 0x14]
push ecx
push ebp
call fcn.10006960
add esp, 8
test eax, eax
je 0x10001919
mov eax, dword [ebx + 0x14]
lea edx, [esp + 0x10]
push 0x10
push edx
push eax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x10001854
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
mov edx, dword [ebx + 0x14]
lea ecx, [esp + 0x2c]
push 4
push ecx
push 1
push 6
push edx
mov dword [esp + 0x40], 1
call sub.WS2_32.dll_setsockopt
mov ebp, dword [sym.imp.KERNEL32.dll_CreateThread]
push 0
push 0
push ebx
push 0x10001a70
push 0
push 0
call ebp
mov dword [ebx + 0x18], eax
lea esi, [ebx + 0x24]
mov edi, 3
push 0
push 0
push ebx
push 0x10001990
push 0
push 0
call ebp
mov dword [esi], eax
add esi, 4
dec edi
jne 0x10001962
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 0x10