Function at 0x500580
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x24c
push esi
call sym.vidcap60.exe_XPTheme_GetDefault
test eax, eax
mov esi, dword [esp + 0x258]
je 0x5005b7
call sym.vidcap60.exe_XPTheme_GetDefault
cmp dword [eax], 0
je 0x5005b7
mov eax, dword [0x622254]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x5005b7
mov dword [esp + 0x14], 1
jmp 0x5005d5
push 0x200f
push 0xa
lea ecx, [esp + 0x264]
push ecx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.USER32.dll_DrawEdge]
push ebx
mov ebx, dword [esp + 0x258]
mov eax, dword [ebx + 0x18]
test eax, eax
push ebp
push edi
jg 0x5005ed
mov dword [ebx + 0x18], 1
mov eax, dword [ebx + 0x18]
cmp dword [ebx + 0x1c], eax
jle 0x5005f8
mov dword [ebx + 0x1c], eax
mov ecx, dword [esp + 0x268]
mov edx, dword [esp + 0x26c]
mov edi, dword [esp + 0x274]
mov eax, dword [esp + 0x270]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [ebx + 8]
test ecx, ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x3c], edx
mov edx, edi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x50], ecx
je 0x500651
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov edx, dword [ebx + 0x18]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebx + 0x1c]
cmp ecx, edx
mov ebp, eax
jge 0x5009b2
mov dword [esp + 0x14], edx
sub eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
imul dword [esp + 0x1c]
idiv ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
cmp eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
jge 0x50069d
mov dword [esp + 0x2c], eax
cmp eax, dword [esp + 0x38]
jle 0x5006a7
mov dword [esp + 0x38], eax
mov eax, dword [ebx]
push 0xf5
lea edx, [esp + 0x58]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov edi, eax
test edi, edi
je 0x5006c7
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x500709
mov ecx, dword [ebx + 0x18]
mov edx, dword [ebx + 0x1c]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], 0x64
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
imul dword [esp + 0x14]
idiv ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
push eax
lea ecx, [esp + edi*2 + 0x58]
push 0x5d611c
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
add edi, eax
lea edx, [esp + 0x48]
push edx
push edi
lea eax, [esp + 0x5c]
push eax
push esi
call dword [sym.imp.GDI32.dll_GetTextExtentPointW]
mov edx, dword [esp + 0x48]
mov eax, ebp
sub eax, edx
inc eax
cdq
sub eax, edx
sar eax, 1
cmp eax, 3
mov dword [esp + 0x10], eax
jge 0x50073a
mov dword [esp + 0x10], 3
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x34]
mov ecx, dword [ebx]
sub eax, edx
inc eax
cdq
sub eax, edx
sar eax, 1
push ecx
mov dword [esp + 0x38], eax
call dword [sym.imp.USER32.dll_IsWindowEnabled]
mov ebp, eax
mov eax, dword [esp + 0x20]
neg ebp
sbb ebp, ebp
inc ebp
test eax, eax
je 0x5009e4
mov eax, dword [0x622254]
mov edx, dword [eax + 0x24]
push 0
push 1
push edx
call dword [eax + 0x88]
test eax, eax
je 0x500799
mov ecx, dword [ebx]
mov edx, dword [0x622254]
lea eax, [esp + 0x268]
push eax
push esi
push ecx
call dword [edx + 0x104]
lea eax, [esp + 0x20]
push eax
mov eax, dword [0x622254]
mov ecx, dword [eax + 0x24]
push 0x96b
push 0
push 1
push esi
push ecx
call dword [eax + 0x90]
mov eax, dword [0x622254]
mov ecx, dword [eax + 0x24]
lea edx, [esp + 0x18]
push edx
push 0x96c
push 0
push 1
push esi
push ecx
call dword [eax + 0x90]
lea edx, [esp + 0x268]
push edx
mov eax, edx
push eax
mov eax, dword [0x622254]
mov ecx, dword [eax + 0x24]
push 0
push 1
push esi
push ecx
call dword [eax + 0x58]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x26c]
push eax
mov eax, dword [0x622254]
mov ecx, dword [eax + 0x24]
push 0
push 1
push esi
push ecx
call dword [eax + 0x60]
mov eax, dword [ebx + 0x1c]
test eax, eax
jle 0x50086b
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edi, edi
cmp eax, dword [esp + 0x268]
je 0x500831
add eax, dword [esp + 0x18]
mov dword [esp + 0x24], eax
add ecx, eax
lea edx, [esp + 0x268]
push edx
lea eax, [esp + 0x28]
push eax
mov eax, dword [0x622254]
push 0
push 3
mov dword [esp + 0x3c], ecx
mov ecx, dword [eax + 0x24]
push esi
push ecx
call dword [eax + 0x58]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
add eax, ecx
cmp eax, edx
mov dword [esp + 0x24], eax
jl 0x500820
push 1
push esi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [esp + 0x268]
mov ecx, dword [esp + 0x270]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x26c]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x274]
push 5
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], edx
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [esp + 0x26c]
mov ebx, dword [esp + 0x274]
dec eax
push 0x25
mov dword [esp + 0x270], eax
lea eax, [esp + 0x26c]
push eax
push edi
lea ecx, [esp + 0x60]
dec ebx
push ecx
mov dword [esp + 0x284], ebx
mov ebx, dword [sym.imp.USER32.dll_DrawTextW]
push esi
call ebx
mov edx, dword [esp + 0x274]
mov ecx, dword [esp + 0x26c]
mov eax, 2
add edx, eax
push 0x25
mov dword [esp + 0x278], edx
lea edx, [esp + 0x26c]
push edx
add ecx, eax
push edi
lea eax, [esp + 0x60]
push eax
push esi
mov dword [esp + 0x280], ecx
call ebx
mov edx, dword [esp + 0x268]
mov ecx, dword [esp + 0x270]
mov eax, dword [esp + 0x26c]
dec edx
dec ecx
mov dword [esp + 0x268], edx
mov edx, dword [esp + 0x274]
push 0x25
mov dword [esp + 0x274], ecx
dec eax
dec edx
lea ecx, [esp + 0x26c]
push ecx
mov dword [esp + 0x27c], edx
push edi
lea edx, [esp + 0x60]
push edx
push esi
mov dword [esp + 0x280], eax
call ebx
mov edx, dword [esp + 0x268]
mov ecx, dword [esp + 0x270]
mov eax, 2
add edx, eax
add ecx, eax
push 0x25
lea eax, [esp + 0x26c]
push eax
mov dword [esp + 0x278], ecx
push edi
lea ecx, [esp + 0x60]
push ecx
mov dword [esp + 0x278], edx
push esi
call ebx
test ebp, ebp
je 0x5009bb
push 0x11
jmp 0x5009bd
mov dword [esp + 0x1c], eax
jmp 0x50069d
push 8
call dword [sym.imp.USER32.dll_GetSysColor]
push eax
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
push 0x25
lea edx, [esp + 0x3c]
push edx
push edi
lea eax, [esp + 0x60]
push eax
push esi
call ebx
mov ecx, dword [esp + 0x14]
jmp 0x500a7b
push 2
push esi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ebx, dword [sym.imp.USER32.dll_GetSysColor]
push 0xd
mov dword [esp + 0x1c], eax
call ebx
push eax
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
test ebp, ebp
je 0x500a0b
push 0x11
jmp 0x500a0d
push 0xe
call ebx
push eax
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov ecx, dword [esp + 0x34]
push 0
push edi
lea edx, [esp + 0x5c]
push edx
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push eax
push 6
push ecx
push edx
push esi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
push 5
call ebx
push eax
push esi
call dword [sym.imp.GDI32.dll_SetBkColor]
test ebp, ebp
je 0x500a4b
push 0x11
jmp 0x500a4d
push 8
call ebx
push eax
push esi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov edx, dword [esp + 0x34]
push 0
push edi
lea eax, [esp + 0x5c]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x44]
push ecx
push 6
push edx
push eax
push esi
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov ecx, dword [esp + 0x18]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esp + 0x50]
test eax, eax
pop edi
pop ebp
pop ebx
je 0x500a96
push eax
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
pop esi
add esp, 0x24c
ret 0x18