Function at 0x4058e0
Capabilities:
Enumerate threads

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x493024]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
push str.USER32
mov dword [ebp - 0x4c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp dword [edi + 0x14], 8
mov ebx, eax
mov eax, edi
jb 0x405916
mov eax, dword [edi]
push 1
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x405b31
test ebx, ebx
je 0x405b2c
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._msg_hook_proc_ov_12
push eax
call edi
mov dword [ebp - 0x58], eax
test eax, eax
jne 0x40596e
push str.GetProcAddress_msg_hook_proc_ov_failed
push 0x494aa8
call fcn.00401490
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422b7f
mov esp, ebp
pop ebp
ret
push str.SetWindowsHookExA
push ebx
call edi
mov edi, eax
mov dword [ebp - 0x50], edi
test esi, esi
jne 0x405a56
push esi
push 4
mov dword [ebp - 0x44], 0xffffffff
mov dword [ebp - 0x48], 0xffffffff
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405a56
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0x1c
push eax
push ebx
call sub.KERNEL32.dll_Thread32First
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405a50
mov eax, dword [ebp - 0x38]
test esi, esi
mov ecx, dword [ebp - 0x4c]
cmove esi, eax
cmp dword [ebp - 0x34], ecx
jne 0x405a3e
push eax
push 1
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x405a38
lea eax, [ebp - 0xc]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push edi
movups xmmword [ebp - 0x24], xmm0
movups xmmword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_GetThreadTimes]
test eax, eax
je 0x405a2d
mov edx, dword [ebp - 0x20]
xor ecx, ecx
or ecx, dword [ebp - 0x24]
mov eax, ecx
or eax, edx
je 0x405a2d
cmp edx, dword [ebp - 0x48]
ja 0x405a2d
jb 0x405a24
cmp ecx, dword [ebp - 0x44]
jae 0x405a2d
mov esi, dword [ebp - 0x38]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x48], edx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
jmp 0x405a3e
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x40]
push eax
push ebx
call sub.KERNEL32.dll_Thread32Next
test eax, eax
jne 0x4059c3
push ebx
call edi
mov edi, dword [ebp - 0x50]
push esi
push str.__thread:
push dword [ebp - 0x4c]
push str.pid:
push str.hook
push 0x494aa8
call fcn.00401100
add esp, 8
push eax
call fcn.00401100
add esp, 8
mov ecx, eax
call fcn.00402b40
push eax
call fcn.00401100
add esp, 8
mov ecx, eax
call fcn.00402b40
push esi
push dword [ebp - 0x54]
push dword [ebp - 0x58]
push 3
call edi
mov ebx, eax
test ebx, ebx
jne 0x405ada
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.SetWindowsHookEx_failed:
push 0x494aa8
call fcn.00401490
add esp, 8
mov ecx, eax
call fcn.00402b40
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422b7f
mov esp, ebp
pop ebp
ret
xor edi, edi
cmp dword [section..data], edi
jle 0x405b19
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push str.PostThreadMessage_to_hook_window
push 0x494aa8
call fcn.00401490
add esp, 8
push ebx
push 0
push 0x5b0
push esi
call dword [sym.imp.USER32.dll_PostThreadMessageW]
inc edi
cmp edi, dword [section..data]
jl 0x405ae4
pop edi
pop esi
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422b7f
mov esp, ebp
pop ebp
ret
lea esi, [edi + 0x10]
jmp 0x405b61
push str.LoadLibrary_failed:
push 0x494aa8
call fcn.00401490
add esp, 8
mov ecx, edi
cmp dword [edi + 0x14], 8
jb 0x405b4d
mov ecx, dword [edi]
push dword [edi + 0x10]
lea esi, [edi + 0x10]
push ecx
push eax
call fcn.00401830
add esp, 0xc
test ebx, ebx
jne 0x405b87
push str.USER32_module_not_found:
push 0x494aa8
call fcn.00401490
add esp, 8
cmp dword [edi + 0x14], 8
jb 0x405b7b
mov edi, dword [edi]
push dword [esi]
push edi
push eax
call fcn.00401830
add esp, 0xc
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422b7f
mov esp, ebp
pop ebp
ret