Function at 0x10017ec0
Capabilities:
Resume thread

Disassembly:
sub esp, 0x2d8
mov eax, dword [0x10031708]
xor eax, esp
mov dword [esp + 0x2d4], eax
mov eax, dword [esp + 0x2dc]
push ebp
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 8], eax
je 0x10017eee
mov ecx, dword [0x10039258]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10039250], eax
je 0x10017f19
mov eax, 0x10dd
pop ebp
mov ecx, dword [esp + 0x2d4]
xor ecx, esp
call fcn.10019cd6
add esp, 0x2d8
ret 4
cmp dword [0x10039254], ebp
je 0x10017f2b
call fcn.10017e10
jmp 0x10018156
push ebx
push esi
mov esi, dword [0x10039260]
cmp esi, ebp
push edi
je 0x10017fe6
mov ebx, 0xd
cmp dword [esi + 4], ebp
mov eax, dword [esi + 0x10]
je 0x10017fa0
mov edi, dword [eax + 0x20]
mov edx, eax
movzx ecx, byte [edx + 0x17]
cmp edi, ecx
jge 0x10017f81
lea edx, [esp + 0x10]
push edx
push ebp
push eax
mov eax, dword [esi + 0xc]
add eax, edi
push eax
mov dword [esp + 0x20], ebp
call fcn.100188b0
cmp dword [esp + 0x10], ebp
jne 0x10017f81
mov ecx, dword [esi + 0x10]
mov edi, eax
sub edi, ecx
movzx ecx, byte [ecx + 0x17]
cmp edi, ecx
jl 0x10017f56
mov edx, dword [esi + 0x10]
movzx eax, byte [edx + 0x17]
cmp edi, eax
je 0x10017f9b
mov ecx, dword [esi + 8]
mov dword [0x10039254], ebx
mov dword [0x10039258], ecx
mov eax, dword [esi + 0xc]
jmp 0x10017fd7
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
add eax, dword [esi + 0xc]
mov byte [eax], 0xe9
lea edx, [eax + 5]
sub ecx, edx
add eax, 1
mov dword [eax], ecx
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 0x18]
add eax, 4
cmp eax, ecx
jae 0x10017fd4
sub ecx, eax
push ecx
push 0xcc
push eax
call fcn.10019d20
add esp, 0xc
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 8]
mov dword [edx], eax
mov esi, dword [esi]
cmp esi, ebp
jne 0x10017f41
mov edi, dword [0x1003925c]
cmp edi, ebp
je 0x10018095
mov ebp, dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov edx, dword [edi + 4]
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x20], 0x10001
call ebp
test eax, eax
je 0x10018089
mov esi, dword [0x10039260]
test esi, esi
je 0x10018089
mov eax, dword [esp + 0xd0]
cmp dword [esi + 4], 0
je 0x1001804a
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jb 0x10018083
lea edx, [ecx + 4]
cmp eax, edx
jae 0x10018083
sub eax, ecx
mov dword [esp + 0xd0], eax
add eax, dword [esi + 0xc]
jmp 0x1001806a
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jb 0x10018083
mov edx, dword [esi + 0x10]
movzx edx, byte [edx + 0x17]
add edx, ecx
cmp eax, edx
jae 0x10018083
sub eax, ecx
mov dword [esp + 0xd0], eax
add eax, dword [esi + 0x10]
mov ecx, dword [edi + 4]
mov dword [esp + 0xd0], eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov eax, dword [esp + 0xd0]
mov esi, dword [esi]
test esi, esi
jne 0x10018028
mov edi, dword [edi]
test edi, edi
jne 0x10018000
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x10039260]
cmp esi, ebp
mov ebx, eax
je 0x10018105
mov ebp, dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea ecx, [ecx]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x10]
push edx
movzx edx, byte [ecx + 0x17]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call fcn.10002cc0
mov ecx, dword [esi + 0x10]
movzx edx, byte [ecx + 0x17]
mov eax, dword [esi + 0xc]
push edx
push eax
push ebx
call ebp
cmp dword [esi + 4], 0
je 0x100180f2
mov eax, dword [esi + 0x10]
test eax, eax
je 0x100180f2
call fcn.10017c20
mov dword [esi + 0x10], 0
mov edi, dword [esi]
push esi
call fcn.1001a6af
add esp, 4
test edi, edi
mov esi, edi
jne 0x100180b0
xor ebp, ebp
mov dword [0x10039260], ebp
call fcn.100179d0
mov esi, dword [0x1003925c]
cmp esi, ebp
je 0x10018137
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esi + 4]
push ecx
call ebx
mov edi, dword [esi]
push esi
call fcn.1001a6af
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x10018120
mov eax, dword [esp + 0x14]
cmp eax, ebp
pop edi
pop esi
mov dword [0x1003925c], ebp
mov dword [0x10039250], ebp
pop ebx
je 0x10018156
mov edx, dword [0x10039258]
mov dword [eax], edx
mov ecx, dword [esp + 0x2d8]
mov eax, dword [0x10039254]
pop ebp
xor ecx, esp
call fcn.10019cd6
add esp, 0x2d8
ret 4