Function at 0x5404a7
Capabilities:
Check for hardware breakpoints
Enumerate threads
Hijack thread execution
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [0x7b088c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x30c]
xor ebx, ebx
mov dword [ebp - 0x310], edi
mov byte [ebp - 0x2ed], bl
mov dword [ebp - 0x30c], ebx
mov eax, dword [edi + 4]
mov dword [ebp - 0x308], ebx
mov dword [ebp - 0x304], ebx
mov dword [ebp - 0x314], eax
mov dword [ebp - 0x2f4], eax
test eax, eax
jne 0x5405b3
push 0x64
call fcn.005412d8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov esi, eax
mov dword [ebp - 0x2f8], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push esi
push 4
mov dword [ebp - 0x2f4], eax
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x540831
lea eax, [ebp - 0x2ec]
mov dword [ebp - 0x2ec], 0x1c
push eax
push esi
call sub.KERNEL32.dll_Thread32First
test eax, eax
je 0x5405aa
mov edi, dword [ebp - 0x2f8]
cmp dword [ebp - 0x2e0], edi
jne 0x540593
mov eax, dword [ebp - 0x2f4]
cmp dword [ebp - 0x2e4], eax
je 0x540593
push dword [ebp - 0x2e4]
push ebx
push 0x1a
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov dword [ebp - 0x2f8], eax
test eax, eax
je 0x540593
lea eax, [ebp - 0x2f8]
push eax
lea ecx, [ebp - 0x30c]
call fcn.005421c2
lea eax, [ebp - 0x2ec]
push eax
push esi
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x540552
mov edi, dword [ebp - 0x310]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x5405cb
lea eax, [ebp - 0x2f4]
push eax
call fcn.005421c2
mov eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x314], eax
mov esi, dword [ebp - 0x308]
mov eax, ebx
mov ecx, dword [ebp - 0x30c]
sub esi, ecx
sar esi, 2
mov dword [ebp - 0x2f8], eax
mov dword [ebp - 0x31c], esi
test esi, esi
je 0x540807
mov eax, dword [ecx + eax*4]
push eax
mov dword [ebp - 0x2f4], eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push 0x2c8
lea eax, [ebp - 0x2cc]
push ebx
push eax
call fcn.00689b00
add esp, 0xc
mov dword [ebp - 0x2d0], 0x10010
lea eax, [ebp - 0x2d0]
push eax
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov eax, dword [ebp - 0x2b8]
xor edx, edx
inc edx
mov dword [ebp - 0x2fc], eax
and dword [ebp - 0x2fc], 0x10
mov ecx, eax
and ecx, edx
mov dword [ebp - 0x300], eax
and dword [ebp - 0x300], 0x40
mov edx, eax
and edx, 4
mov dword [ebp - 0x318], eax
cmp dword [edi + 0x10], 1
jne 0x5406d7
mov ecx, dword [edi]
cmp dword [ebp - 0x2cc], ecx
jne 0x540686
btr eax, 0
mov dword [ebp - 0x2cc], ebx
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2c8], ecx
jne 0x54069e
btr eax, 2
mov dword [ebp - 0x2c8], ebx
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2c4], ecx
jne 0x5406b6
btr eax, 4
mov dword [ebp - 0x2c4], ebx
mov dword [ebp - 0x2b8], eax
cmp dword [ebp - 0x2c0], ecx
jne 0x5407c3
btr eax, 6
mov dword [ebp - 0x2c0], ebx
mov dword [ebp - 0x2b8], eax
jmp 0x5407c3
test ecx, ecx
jne 0x5406e7
mov eax, dword [edi]
mov esi, ebx
mov dword [ebp - 0x2cc], eax
jmp 0x540727
test edx, edx
jne 0x5406fa
mov eax, dword [edi]
mov dword [ebp - 0x2c8], eax
xor eax, eax
inc eax
mov esi, eax
jmp 0x54072a
cmp dword [ebp - 0x2fc], 0
jne 0x54070f
mov eax, dword [edi]
mov dword [ebp - 0x2c4], eax
push 2
jmp 0x540726
cmp dword [ebp - 0x300], 0
jne 0x5407b4
mov eax, dword [edi]
mov dword [ebp - 0x2c0], eax
push 3
pop esi
xor eax, eax
inc eax
push 3
xor edx, edx
mov byte [ebp - 0x2ed], al
pop eax
xor ecx, ecx
mov dword [ebp - 0x2bc], ebx
inc edx
cmp dword [edi + 8], edx
push 2
cmovne eax, ecx
pop edx
cmp dword [edi + 8], edx
push 1
pop ecx
cmove eax, ecx
xor ebx, ebx
cmp dword [edi + 0xc], ecx
push 3
sete bl
cmp dword [edi + 0xc], edx
pop ecx
cmove ebx, ecx
cmp dword [edi + 0xc], ecx
lea ecx, [esi*4 + 0x10]
cmove ebx, edx
lea edi, [esi + esi]
lea edx, [esi*4 + 0x12]
shl eax, cl
push 3
pop esi
shl esi, cl
mov ecx, edx
not esi
shl ebx, cl
and esi, dword [ebp - 0x318]
or esi, eax
push 3
pop eax
shl eax, cl
not eax
and esi, eax
or esi, ebx
btr esi, edi
bts esi, edi
mov edi, dword [ebp - 0x310]
mov dword [ebp - 0x2b8], esi
xor ebx, ebx
mov esi, dword [ebp - 0x31c]
jmp 0x5407c3
mov al, byte [ebp - 0x2ed]
test al, al
setne byte [ebp - 0x2ed]
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10010
push eax
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
push dword [ebp - 0x2f4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [ebp - 0x2f8]
mov ecx, dword [ebp - 0x30c]
inc eax
mov dword [ebp - 0x2f8], eax
cmp eax, esi
jb 0x5405f2
cmp dword [ebp - 0x314], 0
jne 0x540828
test esi, esi
je 0x540828
push dword [ecx + ebx*4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x30c]
inc ebx
cmp ebx, esi
jb 0x540814
mov al, byte [ebp - 0x2ed]
mov byte [edi + 0x14], al
lea ecx, [ebp - 0x30c]
call fcn.005415e5
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00682c16
mov esp, ebp
pop ebp
ret 4