Function at 0x40582e
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
push edi
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
cmp byte [eax + 0x3c], 0
jne 0x405853
cmp byte [eax + 0x3d], 0
je 0x405a04
test byte [0x41a980], 1
jne 0x40587d
or byte [0x41a980], 1
lea eax, [ebp - 1]
push eax
mov ecx, 0x41a988
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::allocator_char__const__]
push 0x405a0b
call fcn.0041386c
pop ecx
push 0x1f4
call ebx
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov esi, eax
lea eax, [ebp - 2]
push eax
push 0
lea eax, [esi + 1]
lea ecx, [ebp - 0x28]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_unsigned_int__char__class_std::allocator_char__const__]
test esi, esi
je 0x405943
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
push eax
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [ebp - 0x28]
push 0x41a988
push eax
call dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
pop ecx
test al, al
pop ecx
jne 0x405943
lea eax, [ebp - 0x28]
mov ecx, 0x41a988
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__]
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::length_void_const]
dec eax
lea ecx, [ebp - 0x28]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::resize_unsigned_int_]
push 0
lea eax, [ebp - 0x28]
sub esp, 0x10
mov esi, esp
push 0x4149c4
push eax
lea eax, [ebp - 0x38]
push str._r_n_
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0xc
push eax
push esi
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
mov edi, dword [ebp - 8]
add esp, 0xc
mov ecx, edi
call fcn.00405359
lea ecx, [ebp - 0x38]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x405946
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.00406a6f
call fcn.0041205e
mov esi, 0xea60
cmp eax, esi
jb 0x4059ed
cmp byte [edi + 0x3c], 0
jne 0x40596f
cmp byte [edi + 0x3d], 0
je 0x4059fb
call fcn.0041205e
cmp eax, esi
jb 0x405984
push 0x3e8
mov dword [ebp - 0xc], eax
call ebx
jmp 0x40595f
lea eax, [ebp - 0x18]
push 0xa
push eax
mov eax, dword [ebp - 0xc]
xor edx, edx
div esi
push eax
call dword [sym.imp.MSVCRT.dll__itoa]
add esp, 0xc
lea eax, [ebp - 3]
lea ecx, [ebp - 0x58]
push 0
sub esp, 0x10
mov esi, esp
push str._minutes__r_n
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_char_const___class_std::allocator_char__const__]
push eax
lea eax, [ebp - 0x48]
push str._r_n_User_has_been_idle_for
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_char_const___class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const__
add esp, 0xc
push eax
push esi
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
mov ecx, edi
call fcn.00405359
lea ecx, [ebp - 0x48]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x58]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
jmp 0x405840
lea ecx, [ebp - 0x28]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret