Function at 0x100104e0
Capabilities:
Check for time delay via gettickcount
Create thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x10185180
push 0x10132540
mov eax, dword fs:[0]
push eax
sub esp, 0x9ac
mov eax, dword [0x10189710]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov esi, dword [ebp + 0x18]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x9b0], eax
mov dword [ebp - 0x9ac], ecx
mov dword [ebp - 0x9a8], edx
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x9b8], eax
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x99c], ecx
xor edi, edi
mov dword [ebp - 0x990], edi
push 0x850
push edi
lea edx, [ebp - 0x98c]
push edx
call fcn.1012e060
add esp, 0xc
mov dword [ebp - 0x9a0], 1
mov dword [ebp - 4], edi
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x128]
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x10010580
push 0x10157724
lea eax, [ebp - 0x128]
push eax
call fcn.101283f0
add esp, 8
cmp eax, edi
je 0x100105a5
mov byte [eax], 0
lea ecx, [esi - 0x2710]
cmp ecx, 0xc350
jbe 0x100105d5
mov eax, 0xcccccccd
mul esi
shr edx, 3
lea edx, [edx + edx*4]
add edx, edx
mov eax, esi
sub eax, edx
cmp eax, 2
mov dword [ebp - 0x994], 0x2710
jne 0x100105db
mov dword [ebp - 0x994], esi
lea ecx, [ebp - 0x128]
push ecx
lea edx, [ebp - 0x65c]
push edx
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
call esi
push ebx
lea eax, [ebp - 0x350]
push eax
call esi
push 0x1014d5e3
lea ecx, [ebp - 0x760]
push ecx
call esi
push 0x1014d5e3
lea edx, [ebp - 0x346]
push edx
call esi
mov ecx, 0x10153fb4
lea edx, [ebp - 0x558]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, di
jne 0x10010622
push 0x1014d5e3
lea eax, [ebp - 0x242]
push eax
call esi
mov dword [ebp - 0x764], edi
mov dword [ebp - 0x768], edi
mov dword [ebp - 0x988], edi
mov dword [ebp - 0x98c], edi
mov dword [ebp - 0x984], edi
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x990], ecx
mov edx, dword [ebp - 0x994]
mov dword [ebp - 0x974], edx
cmp dword [ebp - 0x9a8], edi
je 0x10010685
mov eax, dword [ebp - 0x9a8]
mov byte [eax], 0
mov eax, dword [ebp - 0x9ac]
cmp eax, edi
je 0x10010692
mov byte [eax], 0
mov eax, dword [ebp - 0x9b0]
cmp eax, edi
je 0x1001069f
mov byte [eax], 0
lea ecx, [ebp - 0x998]
push ecx
push 0
lea edx, [ebp - 0x990]
push edx
push 0x1000fd30
push 0
push 0
call fcn.101296b6
add esp, 0x18
mov edi, eax
mov dword [ebp - 0x9bc], edi
test edi, edi
jne 0x100106fd
mov eax, dword [ebp - 0x99c]
test eax, eax
je 0x100106dc
mov dword [eax], 1
mov eax, dword [ebp - 0x9b8]
test eax, eax
je 0x100106ec
mov dword [eax], 0
mov dword [ebp - 4], 0xfffffffe
mov eax, 1
jmp 0x10010b78
mov dword [ebp - 0x9b4], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x9a4], eax
cmp dword [0x101a8dac], 0
je 0x10010739
lea eax, [ebp - 0x128]
push eax
mov ecx, dword [ebp - 0x998]
push ecx
push str.NEWTHREAD__x_:_IsConnectionActive___for___s_
push 0
call fcn.1006ed90
add esp, 0x10
push ebx
call fcn.10128238
add esp, 4
movzx eax, ax
mov edx, 2
mov word [ebp - 0x138], dx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x136], ax
lea eax, [ebp - 0x128]
push eax
call sub.WS2_32.dll_inet_addr
mov dword [ebp - 0x134], eax
cmp eax, 0xffffffff
je 0x10010798
mov dword [ebp - 0x9b4], 1
mov eax, dword [ebp - 0x9ac]
test eax, eax
je 0x10010798
lea ecx, [ebp - 0x128]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
cmp dword [ebp - 0x98c], 0
jne 0x100107af
push 1
call esi
jmp 0x100107a0
mov eax, dword [ebp - 0x9b8]
test eax, eax
je 0x100107bb
mov dword [eax], edi
mov eax, dword [ebp - 0x99c]
test eax, eax
je 0x100107cb
mov dword [eax], 1
cmp dword [0x101a8dac], 0
je 0x100107e3
push str.WaitForSingleObjectEx...
push 0
call fcn.1006ed90
add esp, 8
cmp dword [0x101a8da8], 0
jne 0x100107fe
push 0
mov ebx, dword [ebp - 0x994]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
jmp 0x10010815
mov edx, dword [ebp - 0x994]
push edx
mov ebx, edi
call fcn.1000ed80
add esp, 4
mov ebx, dword [ebp - 0x994]
mov esi, eax
cmp dword [0x101a8dac], 0
je 0x10010850
cmp esi, 0x102
jne 0x10010830
push eax
push str.WaitForSingleObjectEx_Returned__WaitRes___d__WAIT_TIMEOUT__...
jmp 0x10010842
test esi, esi
jne 0x1001083c
push esi
push str.WaitForSingleObjectEx_Returned__WaitRes___d__WAIT_OBJECT_0__...
jmp 0x10010842
push esi
push str.WaitForSingleObjectEx_Returned__WaitRes___d__NON_WAIT_TIMEOUT__...
push 0
call fcn.1006ed90
add esp, 0xc
lea esp, [esp]
cmp esi, 0x102
jne 0x10010aa6
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x100108ad
cmp dword [eax], 1
jne 0x100108ad
cmp dword [ebp - 0x980], 0
je 0x100108ad
lea eax, [ebp - 0x99c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp eax, 1
jne 0x10010aa6
cmp dword [ebp - 0x99c], 0x103
jne 0x10010aa6
mov ecx, dword [ebp - 0x980]
mov dword [ecx], eax
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10010aa6
cmp dword [0x101a8dac], 0
je 0x100108cc
mov edx, dword [ebp - 0x768]
push edx
push str._Stage:__d._Wait_Timeout
push 0
call fcn.1006ed90
add esp, 0xc
mov eax, dword [ebp - 0x768]
cmp eax, 3
je 0x100109d1
cmp eax, 1
je 0x100109c7
inc dword [ebp - 0x9a0]
cmp dword [0x101a8da8], 0
jne 0x100108ff
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
jmp 0x10010916
mov eax, dword [ebp - 0x994]
push eax
mov ebx, edi
call fcn.1000ed80
add esp, 4
mov ebx, dword [ebp - 0x994]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x9a4]
cmp eax, 0x7148
jbe 0x10010850
push ebx
mov eax, dword [ebp - 0x998]
push eax
push eax
mov ecx, dword [ebp - 0x768]
push ecx
push str._TOX___Stage:__d._Terminating_Thread__0x_x_:__d___TO:__d
push 0
call fcn.1006ed90
add esp, 0x18
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp dword [0x101a8dac], 0
je 0x10010983
cmp eax, 1
mov eax, dword [ebp - 0x998]
push eax
push eax
jne 0x10010974
push str._TOX___ThreadTerm_Success__0x_x_:__d_
jmp 0x10010979
push str._TOX___ThreadTerm_Failure__0x_x_:__d_
push 0
call fcn.1006ed90
add esp, 0x10
mov eax, 0x10624dd3
mul ebx
shr edx, 6
imul edx, dword [ebp - 0x9a0]
push edx
push str.Unable_to_connect__Timed_Out_within__d_secs__
lea edx, [ebp - 0x760]
push edx
call fcn.10127dc0
add esp, 0xc
cmp dword [0x101a8dac], 0
je 0x10010aa6
lea eax, [ebp - 0x760]
push eax
push str._TOX___s
jmp 0x10010a9c
cmp eax, 3
je 0x100109d1
cmp eax, 1
jne 0x10010a0b
cmp dword [ebp - 0x980], 0
je 0x10010a0b
lea ecx, [ebp - 0x9a4]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp eax, 1
jne 0x10010a61
cmp dword [ebp - 0x9a4], 0x103
jne 0x10010a61
mov edx, dword [ebp - 0x980]
mov dword [edx], eax
push 0x14
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10010a61
cmp dword [0x101a8dac], 0
je 0x10010a2c
mov ecx, dword [ebp - 0x998]
push ecx
push ecx
push eax
push str._Stage:__d._Terminating_Thread__0x_x_:__d_
push 0
call fcn.1006ed90
add esp, 0x14
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
cmp dword [0x101a8dac], 0
je 0x10010a61
cmp eax, 1
mov eax, dword [ebp - 0x998]
push eax
push eax
jne 0x10010a52
push str._ThreadTerm_Success__0x_x_:__d_
jmp 0x10010a57
push str._ThreadTerm_Failure__0x_x_:__d_
push 0
call fcn.1006ed90
add esp, 0x10
mov eax, 0x10624dd3
mul ebx
shr edx, 6
imul edx, dword [ebp - 0x9a0]
push edx
push str.Unable_to_connect__Timed_Out_within__d_secs__
lea eax, [ebp - 0x760]
push eax
call fcn.10127dc0
add esp, 0xc
cmp dword [0x101a8dac], 0
je 0x10010aa6
lea ecx, [ebp - 0x760]
push ecx
push 0x1014d8cc
push 0
call fcn.1006ed90
add esp, 0xc
mov esi, dword [ebp + 0x28]
test esi, esi
je 0x10010ab2
cmp dword [esi], 1
je 0x10010ad3
cmp dword [ebp - 0x9b4], 0
jne 0x10010ad3
mov eax, dword [ebp - 0x9ac]
test eax, eax
je 0x10010ad3
lea edx, [ebp - 0x346]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x9bc]
push eax
call fcn.10082e10
test esi, esi
je 0x10010ae8
cmp dword [esi], 1
je 0x10010b30
mov eax, dword [ebp - 0x9b0]
test eax, eax
je 0x10010b09
cmp byte [ebp - 0x760], 0
je 0x10010b09
lea ecx, [ebp - 0x760]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 0x9a8]
test eax, eax
je 0x10010b30
cmp byte [ebp - 0x242], 0
je 0x10010b30
mov edx, dword [ebp + 0x1c]
push edx
lea ecx, [ebp - 0x242]
push ecx
push eax
call fcn.101287f0
add esp, 0xc
cmp dword [0x101a8dac], 0
je 0x10010b48
push str.Exiting_IsConnectionActive__...
push 0
call fcn.1006ed90
add esp, 8
mov eax, dword [ebp - 0x984]
mov dword [ebp - 4], 0xfffffffe
jmp 0x10010b78
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.10127db1
mov esp, ebp
pop ebp
ret