Function at 0x10001fe0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1000d17b
mov eax, dword fs:[0]
push eax
sub esp, 0x48
push ebx
push esi
push edi
mov eax, dword [0x10012020]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebx + 0x74]
mov dword [esp + 0x10], ebx
test eax, eax
jne 0x1000205b
push 0x206c
call fcn.10004ab8
add esp, 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x60], 0
test eax, eax
je 0x10002048
movzx ecx, word [ebx + 0x40]
mov edx, dword [ebx + 0x48]
push ecx
push ebx
push edx
push eax
call fcn.10003b30
jmp 0x1000204a
xor eax, eax
mov dword [ebx + 0x74], eax
mov eax, dword [eax + 0xc]
test eax, eax
je 0x1000205b
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
cmp dword [ebx + 0x14], 0
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x64]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
jne 0x1000215c
push 0xffffffffffffffff
push 0
lea edx, [esp + 0x30]
push edx
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x1000215c
cmp eax, 0x102
je 0x10002152
cmp eax, 1
jne 0x10002152
xor eax, eax
lea esi, [esp + 0x14]
mov edi, ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call fcn.100022e0
test eax, eax
je 0x10002152
mov eax, dword [esp + 0x14]
sub eax, 0x18
je 0x10002141
dec eax
jne 0x10002141
mov esi, dword [esp + 0x1c]
mov ebx, dword [ebx + 0x74]
mov ecx, 8
lea edi, [esp + 0x34]
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x38]
push eax
call fcn.10004020
call fcn.10002660
cmp dword [esp + 0x40], 0
mov esi, dword [esp + 0x4c]
je 0x10002130
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xc8
lea ebx, [esi + 0x4c]
call edi
test ebx, ebx
je 0x1000211f
mov ecx, dword [esp + 0x10]
push ecx
call fcn.10002360
push 0xc8
call edi
lea edx, [esi + 0xc]
push edx
push ebx
call fcn.100024c0
test esi, esi
je 0x1000213d
push esi
call fcn.1000493d
add esp, 4
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10002152
push eax
call fcn.1000493d
add esp, 4
cmp dword [ebx + 0x14], 0
je 0x10002073
mov esi, dword [ebx + 0x74]
test esi, esi
je 0x100021dd
mov dword [esi], vtable.CThreadWatchListen.0
call fcn.10001550
mov edi, dword [esi + 0x48]
test edi, edi
je 0x100021bb
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x10002191
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 4], 0xffffffff
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [edi]
test eax, eax
je 0x100021a4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
mov eax, dword [esi + 0x48]
test eax, eax
je 0x100021b4
push eax
call fcn.100047e8
add esp, 4
mov dword [esi + 0x48], 0
lea eax, [esi + 0x2050]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
call fcn.10001490
push esi
call fcn.100047e8
add esp, 4
mov dword [ebx + 0x74], 0
cmp dword [ebx + 0x6c], 0
je 0x10002241
or edi, 0xffffffff
mov ecx, dword [ebx + 0x68]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
mov ecx, dword [eax + 0xc]
mov esi, dword [eax + 0x10]
mov dword [esp + 0x14], edx
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebx + 0x68]
mov dword [esp + 0x24], eax
mov eax, dword [ecx]
mov dword [esp + 0x20], edx
cmp eax, ecx
je 0x1000222e
mov ecx, dword [eax + 4]
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push eax
mov dword [ecx + 4], edx
call fcn.100047e8
add esp, 4
add dword [ebx + 0x6c], edi
test esi, esi
je 0x1000223b
push esi
call fcn.1000493d
add esp, 4
cmp dword [ebx + 0x6c], 0
jne 0x100021e6
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret