Function at 0x422ecf
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push esi
push edi
push dword [ebp + 8]
call fcn.00422e03
mov edi, eax
mov esi, dword [ebp + 0xc]
cmp dword [esi], 4
jne 0x4230b6
mov dword [ebp - 8], 0x810
cmp dword [edi + 0x20], 0
jne 0x422f00
or dword [ebp - 8], 0
jmp 0x422f10
cmp dword [edi + 0x20], 1
jne 0x422f0c
or dword [ebp - 8], 2
jmp 0x422f10
or dword [ebp - 8], 1
cmp dword [edi + 0x28], 0
jne 0x422f1c
or dword [ebp - 8], 0
jmp 0x422f2c
cmp dword [edi + 0x28], 1
jne 0x422f28
or dword [ebp - 8], 8
jmp 0x422f2c
or dword [ebp - 8], 4
push dword [esi + 0x14]
push dword [esi + 0x18]
call fcn.00422497
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 0x422ff6
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 0x423043
cmp dword [edi + 0x1c], 0
je 0x423036
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 0x423053
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 0x423086
test dword [esi + 0x10], 1
jne 0x423086
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.004224db
mov eax, 1
pop edi
pop esi
leave
ret 8