Function at 0x401220
Capabilities:
Get graphical window text

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x403b60
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x340
mov eax, dword [0x407040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x58
lea eax, [ebp - 0x340]
mov dword [ebp - 0x344], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [ebp - 0x220]
mov dword [ebp - 0x340], 0x58
mov dword [ebp - 0x324], eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x33c], 0
mov word [ebp - 0x220], ax
mov dword [ebp - 0x314], eax
lea eax, [ebp - 0x340]
push eax
mov dword [ebp - 0x320], 0x208
mov dword [ebp - 0x334], str.Text_Files__.txt_
mov dword [ebp - 0x328], 1
mov dword [ebp - 0x310], str.Save_File
mov dword [ebp - 0x30c], 0x1802
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
cmp eax, 1
jne 0x401666
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
xor eax, eax
mov dword [ebp - 0x224], 7
movups xmmword [ebp - 0x238], xmm0
mov word [ebp - 0x238], ax
mov dword [ebp - 4], eax
push dword [0x407610]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
test eax, eax
jle 0x401624
mov ecx, dword [ebp - 0x228]
lea esi, [eax + 1]
mov dword [ebp - 0x348], ecx
cmp esi, ecx
ja 0x401368
cmp dword [ebp - 0x224], 7
lea eax, [ebp - 0x238]
mov dword [ebp - 0x228], esi
cmova eax, dword [ebp - 0x238]
xor ecx, ecx
mov word [eax + esi*2], cx
jmp 0x4013dc
mov edi, dword [ebp - 0x224]
mov edx, esi
mov eax, edi
sub edx, ecx
sub eax, ecx
cmp edx, eax
ja 0x4013c1
cmp edi, 7
mov dword [ebp - 0x228], esi
lea eax, [ebp - 0x238]
cmova eax, dword [ebp - 0x238]
mov dword [ebp - 0x344], eax
lea edi, [eax + ecx*2]
test edx, edx
je 0x4013b0
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x348]
lea eax, [ecx + edx]
mov ecx, dword [ebp - 0x344]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x4013dc
push ecx
push edx
mov byte [ebp - 0x344], 0
lea ecx, [ebp - 0x238]
push dword [ebp - 0x344]
push edx
call fcn.00402770
cmp dword [ebp - 0x224], 7
lea eax, [ebp - 0x238]
push esi
cmova eax, dword [ebp - 0x238]
push eax
push dword [0x407610]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push 0xb0
lea eax, [ebp - 0x2e8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [ebp - 0x324]
lea ecx, [ebp - 0x280]
add esp, 0xc
mov dword [ebp - 0x2e8], 0x404458
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0x2e4]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x2e8]
mov dword [ebp - 0x344], 1
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t_____bool_]
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x2e8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x2e8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x2ec], eax
lea ecx, [ebp - 0x2e4]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
lea ecx, [ebp - 0x2e4]
mov dword [ebp - method.std::basic_filebuf_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_filebuf_wchar_t__struct_std::char_traits_wchar_t__.0
mov byte [ebp - 0x29c], 0
mov byte [ebp - 0x2a6], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Init_void_]
mov eax, dword [0x407618]
mov ecx, dword [0x40761c]
mov dword [ebp - 0x298], 0
mov dword [ebp - 0x2a4], eax
mov dword [ebp - 0x2a0], ecx
mov dword [ebp - 0x2ac], 0
push 0x40
push 2
push esi
mov byte [ebp - 4], 3
call dword [sym.imp.MSVCP140.dll_struct__iobuf____cdecl_std::_Fiopen_wchar_t_const___int__int_]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4015a4
lea ecx, [ebp - 0x2e4]
mov byte [ebp - 0x29c], 1
mov byte [ebp - 0x2a6], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Init_void_]
mov eax, dword [0x407618]
mov ecx, dword [0x40761c]
mov dword [ebp - 0x2a4], eax
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x2a0], ecx
lea ecx, [ebp - 0x2e4]
push eax
mov dword [ebp - 0x298], esi
mov dword [ebp - 0x2ac], 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::locale___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::getloc_void_]
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.00402670
mov esi, eax
mov ecx, esi
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::codecvt_base::always_noconv_void_const]
test al, al
je 0x401573
mov dword [ebp - 0x2ac], 0
jmp 0x401585
lea ecx, [ebp - 0x2e4]
mov dword [ebp - 0x2ac], esi
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::_Init_void_]
mov ecx, dword [ebp - 0x348]
test ecx, ecx
je 0x4015bd
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test eax, eax
je 0x4015bd
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
jmp 0x4015bd
mov eax, dword [ebp - 0x2e8]
lea ecx, [ebp - 0x2e8]
push 0
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::setstate_int__bool_]
mov byte [ebp - 4], 5
cmp dword [ebp - 0x298], 0
je 0x401619
cmp dword [ebp - 0x224], 7
lea edx, [ebp - 0x238]
push dword [ebp - 0x228]
cmova edx, dword [ebp - 0x238]
lea ecx, [ebp - 0x2e8]
call fcn.00402a50
add esp, 4
lea ecx, [ebp - 0x2e4]
call fcn.004025e0
test eax, eax
jne 0x401619
push eax
mov eax, dword [ebp - 0x2e8]
lea ecx, [ebp - 0x2e8]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::setstate_int__bool_]
lea ecx, [ebp - 0x2e8]
call fcn.00401690
mov ecx, dword [ebp - 0x224]
cmp ecx, 7
jbe 0x401666
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40165c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40165c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00402dca
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00402d8c
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret