Function at 0x420512
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push esi
push edi
push dword [ebp + 8]
call fcn.00420446
mov edi, eax
mov esi, dword [ebp + 0xc]
cmp dword [esi], 4
jne 0x4206f9
mov dword [ebp - 8], 0x810
cmp dword [edi + 0x20], 0
jne 0x420543
or dword [ebp - 8], 0
jmp 0x420553
cmp dword [edi + 0x20], 1
jne 0x42054f
or dword [ebp - 8], 2
jmp 0x420553
or dword [ebp - 8], 1
cmp dword [edi + 0x28], 0
jne 0x42055f
or dword [ebp - 8], 0
jmp 0x42056f
cmp dword [edi + 0x28], 1
jne 0x42056b
or dword [ebp - 8], 8
jmp 0x42056f
or dword [ebp - 8], 4
push dword [esi + 0x14]
push dword [esi + 0x18]
call fcn.0041faf0
mov dword [ebp - 0x20], eax
push eax
push dword [esi + 0x18]
call sub.GDI32.dll_SelectObject
mov dword [ebp - 0x28], eax
push 1
push dword [esi + 0x18]
call sub.GDI32.dll_SetBkMode
mov dword [ebp - 0x24], eax
push dword [esi + 0x14]
call sub.USER32.dll_GetWindowTextLengthA
mov dword [ebp - 0x18], eax
inc eax
mov dword [ebp - 0x1c], eax
push 4
push 0x1000
push dword [ebp - 0x1c]
push 0
call sub.KERNEL32.dll_VirtualAlloc
mov dword [ebp - 4], eax
push dword [ebp - 0x1c]
push dword [ebp - 4]
push dword [esi + 0x14]
call sub.USER32.dll_GetWindowTextA
lea eax, [esi + 0x1c]
push eax
lea eax, [ebp - 0x38]
push eax
call sub.USER32.dll_CopyRect
lea eax, [esi + 0x1c]
push eax
lea eax, [ebp - 0x48]
push eax
call sub.USER32.dll_CopyRect
mov eax, 0xffffffff
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
push dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x18]
push dword [ebp - 4]
push dword [esi + 0x18]
call sub.USER32.dll_DrawTextA
add eax, 2
mov dword [ebp - 0x14], eax
push 0xfffffffffffffffc
push 0xfffffffffffffffc
lea eax, [ebp - 0x48]
push eax
call sub.USER32.dll_InflateRect
cmp dword [edi + 0x1c], 0
je 0x420639
push 0x10
push 4
lea eax, [esi + 0x1c]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_DrawFrameControl
push dword [ebp - 0x10]
push dword [ebp - 0xc]
lea eax, [ebp - 0x38]
push eax
call sub.USER32.dll_InflateRect
push dword [ebp - 0x20]
lea eax, [ebp - 0x38]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_FillRect
test dword [esi + 0x10], 1
je 0x420686
cmp dword [edi + 0x1c], 0
je 0x420679
push 0x210
push 4
lea eax, [esi + 0x1c]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_DrawFrameControl
push dword [ebp - 0x20]
lea eax, [ebp - 0x38]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_FillRect
push 1
push 1
lea eax, [ebp - 0x38]
push eax
call sub.USER32.dll_OffsetRect
mov eax, dword [edi + 0x18]
cmp eax, dword [ebp - 0x14]
jbe 0x420696
sub eax, dword [ebp - 0x14]
shr eax, 1
add dword [ebp - 0x34], eax
push dword [ebp - 8]
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x18]
push dword [ebp - 4]
push dword [esi + 0x18]
call sub.USER32.dll_DrawTextA
test dword [esi + 0x10], 0x10
je 0x4206c9
test dword [esi + 0x10], 1
jne 0x4206c9
lea eax, [ebp - 0x48]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_DrawFocusRect
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.dll_VirtualFree
push dword [ebp - 0x24]
push dword [esi + 0x18]
call sub.GDI32.dll_SetBkMode
push dword [ebp - 0x28]
push dword [esi + 0x18]
call sub.GDI32.dll_SelectObject
push dword [esi + 0x14]
push dword [esi + 0x18]
call fcn.0041fb34
mov eax, 1
pop edi
pop esi
leave
ret 8