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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x57254c]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x576520], eax
je 0x4532a9
mov eax, 0x10dd
jmp 0x453527
cmp dword [0x57651c], 0
je 0x4532bc
call fcn.004531bd
jmp 0x453522
and dword [ebp - 0x2d8], 0
push ebx
push esi
push edi
mov edi, dword [0x576534]
jmp 0x453319
cmp dword [edi + 4], 0
mov ecx, dword [edi + 0x10]
je 0x4532f0
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [edi + 0xc]
call fcn.004fb890
mov eax, dword [edi + 0xc]
add esp, 0xc
jmp 0x453312
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.00452c43
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov edi, dword [edi]
test edi, edi
jne 0x4532ce
mov edi, dword [0x576530]
jmp 0x4533fd
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 0x4533fb
mov esi, dword [0x576534]
test esi, esi
je 0x4533fb
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x45339f
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x4533f1
lea eax, [edx + 4]
cmp ecx, eax
jae 0x4533f1
xor ebx, ebx
sub cl, dl
mov dl, byte [edx + ebx + 0x38]
mov al, dl
shr al, 3
cmp al, cl
je 0x453394
mov edx, dword [esi + 0x10]
inc ebx
cmp ebx, 8
jb 0x45337a
xor dl, dl
jmp 0x453397
and dl, 7
movzx eax, dl
add eax, dword [esi + 0xc]
jmp 0x4533d5
cmp ecx, dword [esi + 0xc]
jb 0x4533f1
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x4533f1
xor edx, edx
sub cl, byte [esi + 0xc]
mov ah, byte [ebx + edx + 0x38]
mov al, ah
and al, 7
cmp al, cl
je 0x4533cd
inc edx
cmp edx, 8
jb 0x4533b7
xor eax, eax
jmp 0x4533d3
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 0x45335e
mov edi, dword [edi]
test edi, edi
jne 0x453328
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x576534]
mov ebx, eax
test edi, edi
je 0x453473
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 0x453461
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x453461
call fcn.00453136
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push 0x18
push edi
call fcn.004f8ec4
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x453417
xor ebx, ebx
mov dword [0x576534], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x4534e9
cmp dword [0x57649c], ebx
jne 0x4534e9
mov ecx, dword [0x57652c]
mov esi, 0x57652c
jmp 0x4534e5
cmp dword [ecx], 0x52727464
jne 0x4534e0
lea edi, [ecx + 0x10000]
mov edx, ebx
lea eax, [ecx + 0x88]
cmp dword [eax], ebx
je 0x4534ba
cmp dword [eax], ecx
jb 0x4534e0
cmp dword [eax], edi
jae 0x4534e0
inc edx
add eax, 0x48
cmp edx, 0x38d
jb 0x4534ae
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x576524], ebx
jmp 0x4534e3
lea esi, [ecx + 4]
mov ecx, dword [esi]
test ecx, ecx
jne 0x453498
call fcn.00452e4f
mov edi, dword [0x576530]
test edi, edi
je 0x453513
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.004f8ec4
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x4534f8
pop edi
pop esi
mov dword [0x576530], ebx
mov dword [0x576520], ebx
pop ebx
mov eax, dword [0x57651c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004f8955
leave
ret