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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x10094040]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1009722c], eax
je 0x10001bf0
mov eax, 0x10dd
jmp 0x10001e6d
cmp dword [0x10097228], 0
je 0x10001c03
call fcn.10001b04
jmp 0x10001e68
and dword [ebp - 0x2d8], 0
push ebx
push esi
push edi
mov edi, dword [0x10097240]
jmp 0x10001c60
cmp dword [edi + 4], 0
mov ecx, dword [edi + 0x10]
je 0x10001c37
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [edi + 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [edi + 0xc]
add esp, 0xc
jmp 0x10001c59
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.100014bf
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov edi, dword [edi]
test edi, edi
jne 0x10001c15
mov edi, dword [0x1009723c]
jmp 0x10001d44
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x2d4], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10001d42
mov esi, dword [0x10097240]
test esi, esi
je 0x10001d42
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x10001ce6
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x10001d38
lea eax, [edx + 4]
cmp ecx, eax
jae 0x10001d38
xor ebx, ebx
sub cl, dl
mov dl, byte [edx + ebx + 0x38]
mov al, dl
shr al, 3
cmp al, cl
je 0x10001cdb
mov edx, dword [esi + 0x10]
inc ebx
cmp ebx, 8
jb 0x10001cc1
xor dl, dl
jmp 0x10001cde
and dl, 7
movzx eax, dl
add eax, dword [esi + 0xc]
jmp 0x10001d1c
cmp ecx, dword [esi + 0xc]
jb 0x10001d38
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x10001d38
xor edx, edx
sub cl, byte [esi + 0xc]
mov ah, byte [ebx + edx + 0x38]
mov al, ah
and al, 7
cmp al, cl
je 0x10001d14
inc edx
cmp edx, 8
jb 0x10001cfe
xor eax, eax
jmp 0x10001d1a
movzx eax, ah
shr eax, 3
add eax, ebx
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x2d4]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 0x21c]
mov esi, dword [esi]
test esi, esi
jne 0x10001ca5
mov edi, dword [edi]
test edi, edi
jne 0x10001c6f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x10097240]
mov ebx, eax
test edi, edi
je 0x10001dba
lea eax, [ebp - 8]
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 ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10001da8
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x10001da8
call fcn.10001a3f
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push 0x18
push edi
call fcn.10073a3d
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x10001d5e
xor ebx, ebx
mov dword [0x10097240], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x10001e2f
cmp dword [0x1009719c], ebx
jne 0x10001e2f
mov ecx, dword [0x10097238]
mov esi, 0x10097238
jmp 0x10001e2b
cmp dword [ecx], 0x52727464
jne 0x10001e79
lea edi, [ecx + 0x10000]
mov edx, ebx
lea eax, [ecx + 0x88]
cmp dword [eax], ebx
je 0x10001e05
cmp dword [eax], ecx
jb 0x10001e79
cmp dword [eax], edi
jae 0x10001e79
inc edx
add eax, 0x48
cmp edx, 0x38d
jb 0x10001df9
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x10097230], ebx
mov ecx, dword [esi]
test ecx, ecx
jne 0x10001ddf
call fcn.1000177b
mov edi, dword [0x1009723c]
test edi, edi
je 0x10001e59
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.10073a3d
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x10001e3e
pop edi
pop esi
mov dword [0x1009723c], ebx
mov dword [0x1009722c], ebx
pop ebx
mov eax, dword [0x10097228]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100739ff
leave
ret
lea esi, [ecx + 4]
jmp 0x10001e29