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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x578040]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x60b2c8], eax
je 0x41b555
mov eax, 0x10dd
jmp 0x41b7e2
cmp dword [0x60b17c], 0
je 0x41b568
call fcn.0041b469
jmp 0x41b7dd
and dword [ebp - 0x2d8], 0
push ebx
push esi
mov esi, dword [0x60b2dc]
push edi
jmp 0x41b5d5
cmp dword [esi + 4], 0
mov ecx, dword [esi + 0x10]
je 0x41b59c
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.0054d870
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x41b5ce
mov edx, dword [esi + 0xc]
mov ecx, dword [ecx + 0x44]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
add edx, 5
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0x40]
cmp edx, eax
jae 0x41b5cb
sub eax, edx
push eax
push 0xcc
push edx
call fcn.0054d6d0
add esp, 0xc
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x41b57a
mov edi, dword [0x60b2d8]
jmp 0x41b6b9
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 0x41b6b7
mov esi, dword [0x60b2dc]
test esi, esi
je 0x41b6b7
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x41b65b
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x41b6ad
lea eax, [edx + 4]
cmp ecx, eax
jae 0x41b6ad
xor ebx, ebx
sub cl, dl
mov dl, byte [edx + ebx + 0x38]
mov al, dl
shr al, 3
cmp al, cl
je 0x41b650
mov edx, dword [esi + 0x10]
inc ebx
cmp ebx, 8
jb 0x41b636
xor dl, dl
jmp 0x41b653
and dl, 7
movzx eax, dl
add eax, dword [esi + 0xc]
jmp 0x41b691
cmp ecx, dword [esi + 0xc]
jb 0x41b6ad
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x41b6ad
xor edx, edx
sub cl, byte [esi + 0xc]
mov ah, byte [ebx + edx + 0x38]
mov al, ah
and al, 7
cmp al, cl
je 0x41b689
inc edx
cmp edx, 8
jb 0x41b673
xor eax, eax
jmp 0x41b68f
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 0x41b61a
mov edi, dword [edi]
test edi, edi
jne 0x41b5e4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x60b2dc]
mov ebx, eax
test edi, edi
je 0x41b72f
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 0x41b71d
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x41b71d
call fcn.0041b3a4
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push 0x18
push edi
call fcn.0054b6bb
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x41b6d3
xor ebx, ebx
mov dword [0x60b2dc], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x41b7a4
cmp dword [0x607c8c], ebx
jne 0x41b7a4
mov ecx, dword [0x60b2d4]
mov esi, 0x60b2d4
jmp 0x41b7a0
cmp dword [ecx], 0x52727464
jne 0x41b7ee
lea edi, [ecx + 0x10000]
mov edx, ebx
lea eax, [ecx + 0x88]
cmp dword [eax], ebx
je 0x41b77a
cmp dword [eax], ecx
jb 0x41b7ee
cmp dword [eax], edi
jae 0x41b7ee
inc edx
add eax, 0x48
cmp edx, 0x38d
jb 0x41b76e
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x60b2cc], ebx
mov ecx, dword [esi]
test ecx, ecx
jne 0x41b754
call fcn.0041b0ed
mov edi, dword [0x60b2d8]
test edi, edi
je 0x41b7ce
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push 8
push edi
call fcn.0054b6bb
mov edi, esi
pop ecx
pop ecx
test esi, esi
jne 0x41b7b3
pop edi
pop esi
mov dword [0x60b2d8], ebx
mov dword [0x60b2c8], ebx
pop ebx
mov eax, dword [0x60b17c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0054b598
leave
ret
lea esi, [ecx + 4]
jmp 0x41b79e