Function at 0x40b7a3
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push esi
push edi
push dword [ebp + 8]
call fcn.0040b6d7
mov edi, eax
mov esi, dword [ebp + 0xc]
cmp dword [esi], 4
jne 0x40b98b
mov dword [ebp - 8], 0x810
cmp dword [edi + 0x20], 0
jne 0x40b7d4
or dword [ebp - 8], 0
jmp 0x40b7e4
cmp dword [edi + 0x20], 1
jne 0x40b7e0
or dword [ebp - 8], 2
jmp 0x40b7e4
or dword [ebp - 8], 1
cmp dword [edi + 0x28], 0
jne 0x40b7f0
or dword [ebp - 8], 0
jmp 0x40b800
cmp dword [edi + 0x28], 1
jne 0x40b7fc
or dword [ebp - 8], 8
jmp 0x40b800
or dword [ebp - 8], 4
push dword [esi + 0x14]
push dword [esi + 0x18]
call fcn.0040b127
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 0x40b8ca
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 0x40b917
cmp dword [edi + 0x1c], 0
je 0x40b90a
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 0x40b927
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 0x40b95a
test dword [esi + 0x10], 1
jne 0x40b95a
lea eax, [ebp - 0x48]
push eax
push dword [esi + 0x18]
call sub.USER32.dll_DrawFocusRect
push 0x4000
push dword [ebp - 0x1c]
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.0040b16a
mov eax, 1
pop edi
pop esi
leave
ret 8