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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x57d54c]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x581728], eax
je 0x45c7c9
mov eax, 0x10dd
jmp 0x45ca47
cmp dword [0x581724], 0
je 0x45c7dc
call fcn.0045c6dd
jmp 0x45ca42
and dword [ebp - 0x2d8], 0
push ebx
push esi
push edi
mov edi, dword [0x58173c]
jmp 0x45c839
cmp dword [edi + 4], 0
mov ecx, dword [edi + 0x10]
je 0x45c810
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [edi + 0xc]
call fcn.00504dd0
mov eax, dword [edi + 0xc]
add esp, 0xc
jmp 0x45c832
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.0045c163
mov eax, dword [edi + 0x10]
mov ecx, dword [edi + 8]
mov dword [ecx], eax
mov edi, dword [edi]
test edi, edi
jne 0x45c7ee
mov edi, dword [0x581738]
jmp 0x45c91d
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 0x45c91b
mov esi, dword [0x58173c]
test esi, esi
je 0x45c91b
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x45c8bf
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x45c911
lea eax, [edx + 4]
cmp ecx, eax
jae 0x45c911
xor ebx, ebx
sub cl, dl
mov dl, byte [edx + ebx + 0x38]
mov al, dl
shr al, 3
cmp al, cl
je 0x45c8b4
mov edx, dword [esi + 0x10]
inc ebx
cmp ebx, 8
jb 0x45c89a
xor dl, dl
jmp 0x45c8b7
and dl, 7
movzx eax, dl
add eax, dword [esi + 0xc]
jmp 0x45c8f5
cmp ecx, dword [esi + 0xc]
jb 0x45c911
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x45c911
xor edx, edx
sub cl, byte [esi + 0xc]
mov ah, byte [ebx + edx + 0x38]
mov al, ah
and al, 7
cmp al, cl
je 0x45c8ed
inc edx
cmp edx, 8
jb 0x45c8d7
xor eax, eax
jmp 0x45c8f3
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 0x45c87e
mov edi, dword [edi]
test edi, edi
jne 0x45c848
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x58173c]
mov ebx, eax
test edi, edi
je 0x45c993
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 0x45c981
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x45c981
call fcn.0045c656
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push 0x18
push edi
call fcn.00502404
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x45c937
xor ebx, ebx
mov dword [0x58173c], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x45ca09
cmp dword [0x5816a0], ebx
jne 0x45ca09
mov ecx, dword [0x581734]
mov esi, 0x581734
jmp 0x45ca05
cmp dword [ecx], 0x52727464
jne 0x45ca00
lea edi, [ecx + 0x10000]
mov edx, ebx
lea eax, [ecx + 0x88]
cmp dword [eax], ebx
je 0x45c9da
cmp dword [eax], ecx
jb 0x45ca00
cmp dword [eax], edi
jae 0x45ca00
inc edx
add eax, 0x48
cmp edx, 0x38d
jb 0x45c9ce
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x58172c], ebx
jmp 0x45ca03
lea esi, [ecx + 4]
mov ecx, dword [esi]
test ecx, ecx
jne 0x45c9b8
call fcn.0045c36f
mov edi, dword [0x581738]
test edi, edi
je 0x45ca33
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.00502404
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x45ca18
pop edi
pop esi
mov dword [0x581738], ebx
mov dword [0x581728], ebx
pop ebx
mov eax, dword [0x581724]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00501e95
leave
ret