Function at 0x404077
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 + 0x38], 0
jne 0x40409c
cmp byte [eax + 0x39], 0
je 0x40424d
test byte [0x415740], 1
jne 0x4040c6
or byte [0x415740], 1
lea eax, [ebp - 1]
push eax
mov ecx, 0x415748
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 0x404254
call fcn.0040fcba
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 0x40418c
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 0x415748
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 0x40418c
lea eax, [ebp - 0x28]
mov ecx, 0x415748
push eax
call dword [0x410264]
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 str.___r_n
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.00403a9a
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 0x40418f
mov edi, dword [ebp - 8]
mov ecx, edi
call fcn.00405142
call fcn.0040e898
mov esi, 0xea60
cmp eax, esi
jb 0x404236
cmp byte [edi + 0x38], 0
jne 0x4041b8
cmp byte [edi + 0x39], 0
je 0x404244
call fcn.0040e898
cmp eax, esi
jb 0x4041cd
push 0x3e8
mov dword [ebp - 0xc], eax
call ebx
jmp 0x4041a8
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.00403a9a
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 0x404089
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