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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [ebp + 8]
mov edx, dword [esi + 0x10]
cmp word [edx], 0
je 0x4046f0
mov eax, edx
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x404500
sub eax, edx
sar eax, 1
mov dword [ebp - 0x2c], eax
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sym._GetWindowTextLengthW_4
lea edi, [eax + 1]
sub esp, 4
lea edx, [edi + edi]
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 ebx, eax
test eax, eax
je 0x404629
mov dword [esp + 4], eax
mov eax, dword [0x40a02c]
mov dword [esp + 8], edi
mov dword [esp], eax
call sym._GetWindowTextW_12
lea eax, [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 0xc], eax
mov eax, dword [0x40a02c]
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb0
mov dword [esp], eax
call sym._SendMessageW_16
mov eax, dword [esi + 0xc]
sub esp, 0x10
and eax, 5
cmp eax, 4
je 0x404680
cmp eax, 5
je 0x404660
test eax, eax
je 0x404638
cmp eax, 1
jne 0x404629
mov eax, dword [esi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
lea eax, [ebx + eax*2]
mov dword [esp], eax
call sym._StrStrIW_8
sub esp, 8
mov edi, eax
mov dword [esp + 8], ebx
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 edi, edi
je 0x404723
sub edi, ebx
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], 0xb1
mov edx, edi
sar edx, 1
add eax, edx
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov eax, dword [0x40a02c]
mov dword [esp], eax
call sym._SendMessageW_16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0x10]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x2c]
lea eax, [ebx + eax*2]
mov dword [esp + 4], eax
call sym._StrRStrIW_12
sub esp, 0xc
mov edi, eax
jmp 0x4045d2
mov eax, dword [esi + 0x10]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
lea eax, [ebx + eax*2]
mov dword [esp], eax
call sym._StrStrW_8
sub esp, 8
mov edi, eax
jmp 0x4045d2
mov eax, dword [esi + 0x10]
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x2c]
add edx, edx
cmp word [eax], 0
mov dword [ebp - 0x30], eax
je 0x40474c
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4046a0
sub eax, dword [ebp - 0x30]
lea edi, [ebx + edx - 2]
sar eax, 1
cmp ebx, edi
ja 0x4046ff
mov dword [ebp + 8], esi
mov esi, edi
mov edi, eax
jmp 0x4046c7
sub esi, 2
cmp ebx, esi
ja 0x4046fc
mov eax, dword [ebp - 0x30]
mov dword [esp + 8], edi
mov dword [esp], esi
mov dword [esp + 4], eax
call sym._StrCmpNW_12
sub esp, 0xc
test eax, eax
jne 0x4046c0
mov edi, esi
mov esi, dword [ebp + 8]
jmp 0x4045d2
mov dword [ebp - 0x2c], 0
jmp 0x404510
mov esi, dword [ebp + 8]
mov dword [esp + 8], ebx
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 [esi + 0x10]
mov dword [esp + 4], 0x17b
mov dword [esp + 8], eax
mov eax, dword [0x40a028]
mov dword [esp], eax
call dbg.DIALOG_StringMsgBox
jmp 0x404629
mov eax, dword [ebp - 0x30]
jmp 0x4046a9