Function at 0x1002c095
Capabilities:
Hook routines via microsoft detours
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
mov eax, dword [0x1026e004]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x102a8c90], eax
je 0x1002c0c0
mov eax, 0x10dd
jmp 0x1002c33d
cmp dword [0x102a8c8c], 0
je 0x1002c0d3
call fcn.1002bfec
jmp 0x1002c338
push ebx
push esi
xor ebx, ebx
push edi
mov edi, dword [0x102a8ca4]
mov dword [ebp - 0x2d4], ebx
jmp 0x1002c130
mov ecx, dword [edi + 0x10]
cmp dword [edi + 4], ebx
je 0x1002c107
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [edi + 0xc]
call fcn.100e1b00
mov eax, dword [edi + 0xc]
add esp, 0xc
jmp 0x1002c129
mov esi, dword [edi + 0xc]
mov ecx, dword [ecx + 0x44]
lea eax, [esi + 5]
mov byte [esi], 0xe9
sub ecx, eax
mov dword [esi + 1], ecx
lea ecx, [esi + 5]
mov edx, dword [edi + 0x10]
mov edx, dword [edx + 0x40]
call fcn.1002ba0e
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov edi, dword [edi]
test edi, edi
jne 0x1002c0e6
mov edi, dword [0x102a8ca0]
test edi, edi
je 0x1002c225
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x1002c215
mov esi, dword [0x102a8ca4]
test esi, esi
je 0x1002c215
mov ecx, dword [ebp - 0x218]
cmp dword [esi + 4], 0
je 0x1002c1b9
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x1002c20b
lea eax, [edx + 4]
cmp ecx, eax
jae 0x1002c20b
xor ebx, ebx
sub cl, dl
mov dl, byte [edx + ebx + 0x38]
mov al, dl
shr al, 3
cmp al, cl
je 0x1002c1ae
mov edx, dword [esi + 0x10]
inc ebx
cmp ebx, 8
jb 0x1002c194
xor dl, dl
jmp 0x1002c1b1
and dl, 7
movzx eax, dl
add eax, dword [esi + 0xc]
jmp 0x1002c1ef
cmp ecx, dword [esi + 0xc]
jb 0x1002c20b
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x1002c20b
xor edx, edx
sub cl, byte [esi + 0xc]
mov ah, byte [ebx + edx + 0x38]
mov al, ah
and al, 7
cmp al, cl
je 0x1002c1e7
inc edx
cmp edx, 8
jb 0x1002c1d1
xor eax, eax
jmp 0x1002c1ed
movzx eax, ah
shr eax, 3
add eax, ebx
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x2d0]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 0x218]
mov esi, dword [esi]
test esi, esi
jne 0x1002c178
mov edi, dword [edi]
test edi, edi
jne 0x1002c142
mov ebx, dword [ebp - 0x2d4]
mov edi, dword [0x102a8ca4]
test edi, edi
je 0x1002c288
lea eax, [ebp - 0x2d4]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x1002c276
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x1002c276
call fcn.1002bee9
and dword [edi + 0x10], 0
xor ebx, ebx
inc ebx
mov esi, dword [edi]
push 0x18
push edi
call fcn.100e04ea
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x1002c22f
and dword [0x102a8ca4], 0
test ebx, ebx
je 0x1002c2fd
cmp dword [0x102a8460], 0
jne 0x1002c2fd
mov ecx, dword [0x102a8c9c]
mov esi, 0x102a8c9c
jmp 0x1002c2f9
cmp dword [ecx], 0x52727464
jne 0x1002c2f4
lea edi, [ecx + 0x10000]
xor edx, edx
lea eax, [ecx + 0x88]
cmp dword [eax], 0
je 0x1002c2cc
cmp dword [eax], ecx
jb 0x1002c2f4
cmp dword [eax], edi
jae 0x1002c2f4
inc edx
add eax, 0x48
cmp edx, 0x38d
jb 0x1002c2bf
mov eax, dword [ecx + 4]
push 0x8000
push 0
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
and dword [0x102a8c94], 0
jmp 0x1002c2f7
lea esi, [ecx + 4]
mov ecx, dword [esi]
test ecx, ecx
jne 0x1002c2a9
call fcn.1002bc91
mov edi, dword [0x102a8ca0]
test edi, edi
je 0x1002c327
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.100e04ea
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x1002c30c
and dword [0x102a8ca0], 0
and dword [0x102a8c90], 0
pop edi
pop esi
pop ebx
mov eax, dword [0x102a8c8c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100e04a9
leave
ret