Function at 0x4021f0
Capabilities:
Enumerate threads

Disassembly:
sub esp, 0x58
mov eax, dword [0x435014]
xor eax, esp
mov dword [esp + 0x54], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x6c]
mov esi, edx
push str.USER32
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
cmp dword [edi + 0x14], 8
mov ebx, eax
mov eax, edi
jb 0x402223
mov eax, dword [edi]
push 1
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [esp + 0x24], eax
test eax, eax
je 0x40245e
test ebx, ebx
je 0x402488
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._msg_hook_proc_ov_12
push eax
call edi
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40227c
mov edx, str.GetProcAddress_msg_hook_proc_ov_failed
mov ecx, 0x436038
call fcn.00404770
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00407fd1
add esp, 0x58
ret
push str.SetWindowsHookExA
push ebx
call edi
mov edi, eax
mov dword [esp + 0x20], edi
test esi, esi
jne 0x40238a
push esi
push 4
or ebp, 0xffffffff
mov dword [esp + 0x20], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40238a
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32First]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x402383
mov eax, dword [esp + 0x30]
test esi, esi
mov ecx, dword [esp + 0x1c]
cmove esi, eax
cmp dword [esp + 0x34], ecx
jne 0x40236f
push eax
push 1
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov edi, eax
test edi, edi
je 0x402369
lea eax, [esp + 0x5c]
mov dword [esp + 0x44], 0
push eax
lea eax, [esp + 0x58]
mov dword [esp + 0x64], 0
push eax
lea eax, [esp + 0x54]
xorps xmm0, xmm0
push eax
lea eax, [esp + 0x50]
movq qword [esp + 0x64], xmm0
push eax
push edi
movups xmmword [esp + 0x5c], xmm0
call dword [sym.imp.KERNEL32.dll_GetThreadTimes]
test eax, eax
je 0x40235e
mov edx, dword [esp + 0x48]
xor ecx, ecx
or ecx, dword [esp + 0x44]
mov eax, ecx
or eax, edx
je 0x40235e
cmp edx, dword [esp + 0x18]
ja 0x40235e
jb 0x402354
cmp ecx, ebp
jae 0x40235e
mov esi, dword [esp + 0x30]
mov ebp, ecx
mov dword [esp + 0x18], edx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
jmp 0x40236f
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Thread32Next]
test eax, eax
jne 0x4022d3
push ebx
call edi
mov edi, dword [esp + 0x20]
mov edx, str.hook
mov ecx, 0x436038
call fcn.00404a10
mov edx, str.pid:
mov ecx, eax
call fcn.00404a10
push dword [esp + 0x1c]
mov ecx, eax
call fcn.00402830
mov edx, str.__thread:
mov ecx, eax
call fcn.00404a10
push esi
mov ecx, eax
call fcn.00402830
push esi
push dword [esp + 0x28]
push dword [esp + 0x1c]
push 3
call edi
mov dword [esp + 0x14], eax
test eax, eax
jne 0x40240d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, str.SetWindowsHookEx_failed:
mov ecx, 0x436038
mov esi, eax
call fcn.00404770
push esi
mov ecx, eax
call fcn.00402830
xor al, al
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00407fd1
add esp, 0x58
ret
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0x14
mov ebp, dword [sym.imp.USER32.dll_PostThreadMessageW]
nop
push 0x1f4
call ebx
mov edx, str.PostThreadMessage_to_hook_window
mov ecx, 0x436038
call fcn.00404770
push dword [esp + 0x14]
push 0
push 0x5b0
push esi
call ebp
sub edi, 1
jne 0x402420
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00407fd1
add esp, 0x58
ret
mov edx, str.LoadLibrary_failed:
mov ecx, 0x436038
call fcn.00404770
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x402477
mov edx, dword [edi]
push dword [edi + 0x10]
mov ecx, eax
call fcn.004059c0
add esp, 4
test ebx, ebx
jne 0x4024af
mov edx, str.USER32_module_not_found:
mov ecx, 0x436038
call fcn.00404770
cmp dword [edi + 0x14], 8
mov ecx, dword [edi + 0x10]
jb 0x4024a2
mov edi, dword [edi]
push ecx
mov edx, edi
mov ecx, eax
call fcn.004059c0
add esp, 4
mov ecx, dword [esp + 0x64]
xor al, al
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00407fd1
add esp, 0x58
ret