Function at 0x404920
Capabilities:
Get graphical window text
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x20
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x10]
cmp word [edx], 0
je 0x404bc8
mov eax, edx
lea esi, cs:[esi]
add eax, 2
cmp word [eax], 0
jne 0x404940
sub eax, edx
sar eax, 1
mov dword [ebp - 0x14], eax
mov eax, dword [0x40b02c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetWindowTextLengthW]
lea esi, [eax + 1]
sub esp, 4
lea edx, [esi + esi]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edi, eax
test eax, eax
je 0x404a72
mov dword [esp + 8], esi
mov dword [esp + 4], eax
mov eax, dword [0x40b02c]
mov dword [esp], eax
call dword [sym.imp.user32.dll_GetWindowTextW]
lea eax, [ebp - 0x10]
sub esp, 0xc
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb0
mov eax, dword [0x40b02c]
mov dword [esp], eax
mov eax, dword [sym.imp.user32.dll_SendMessageW]
mov dword [ebp - 0x1c], eax
call eax
mov eax, dword [ebx + 0xc]
sub esp, 0x10
and eax, 5
cmp eax, 4
je 0x404ad0
cmp eax, 5
je 0x404a80
test eax, eax
mov eax, dword [ebx + 0x10]
je 0x404aa0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
lea eax, [edi + eax*2]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_StrStrIW]
sub esp, 8
mov esi, eax
mov eax, esi
sub eax, edi
sar eax, 1
mov dword [ebp - 0x10], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
test esi, esi
je 0x404b98
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov dword [esp + 4], 0xb1
add edx, eax
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [0x40b02c]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
mov eax, dword [ebx + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
lea eax, [edi + eax*2]
mov dword [esp], eax
call dword [sym.imp.shlwapi.dll_StrStrW]
sub esp, 8
mov esi, eax
jmp 0x404a15
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov dword [esp], edi
sub eax, ecx
lea eax, [edi + eax*2]
mov dword [esp + 4], eax
call dword [sym.imp.shlwapi.dll_StrRStrIW]
sub esp, 0xc
mov esi, eax
jmp 0x404a15
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x10]
mov eax, dword [ebp - 0x10]
sub eax, ecx
cmp word [edx], 0
lea ecx, [eax + eax]
je 0x404bd4
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x404af0
sub eax, edx
sar eax, 1
mov dword [ebp - 0x18], eax
lea esi, [edi + ecx - 2]
cmp esi, edi
jb 0x404b6b
mov dword [ebp + 8], ebx
mov ebx, edx
jmp 0x404b17
sub esi, 2
cmp esi, edi
jb 0x404b68
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 8], eax
call dword [sym.imp.shlwapi.dll_StrCmpNW]
sub esp, 0xc
test eax, eax
jne 0x404b10
mov ecx, esi
sub ecx, edi
sar ecx, 1
mov dword [ebp - 0x10], ecx
mov eax, dword fs:[0x18]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x404a4a
mov ebx, dword [ebp + 8]
mov eax, edi
neg eax
sar eax, 1
mov dword [ebp - 0x10], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov dword [esp + 0xc], 0x40
mov eax, dword [ebx + 0x10]
mov dword [esp + 4], 0x17b
mov dword [esp + 8], eax
mov eax, dword [0x40b028]
mov dword [esp], eax
call dbg.DIALOG_StringMsgBox
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
mov dword [ebp - 0x14], 0
jmp 0x404950
mov dword [ebp - 0x18], 0
jmp 0x404b00