Function at 0x40c370
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x18
mov eax, dword [0x46b21c]
push ebx
push ebp
mov word [esp + 0x10], 0
lea ebx, [eax - 0xc]
mov dword [esp + 8], eax
push esi
mov esi, ecx
mov edx, dword [ebx]
push edi
cmp edx, 1
mov dword [esp + 0x14], esi
mov ecx, 0x400
jg 0x40c3a1
cmp dword [eax - 4], ecx
jge 0x40c3f9
mov ebp, dword [eax - 8]
cmp ebp, ecx
jle 0x40c3aa
mov ecx, ebp
push ecx
lea ecx, [esp + 0x14]
call fcn.00401ce0
test eax, eax
je 0x40c3fd
mov edi, dword [esp + 0x10]
lea ecx, [ebp + ebp + 2]
mov eax, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], ebp
mov eax, dword [0x46b220]
cmp ebx, eax
je 0x40c3f5
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c3f5
push ebx
call fcn.00459de2
add esp, 4
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edx, dword [esi + 0x2c]
push 0x400
push eax
push edx
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea ecx, [esp + 0x10]
call fcn.00401d40
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], eax
mov edx, dword [esp + 0x10]
mov word [edx + eax*2], 0
mov eax, dword [esi + 0x3c]
test eax, eax
je 0x40c51b
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov edx, dword [eax - 0xc]
lea ebx, [eax - 0xc]
cmp edx, 1
jg 0x40c455
mov edx, dword [eax - 4]
test edx, edx
jge 0x40c4b1
mov ebp, dword [eax - 8]
test ebp, ebp
jle 0x40c45e
mov ecx, ebp
push ecx
lea ecx, [esp + 0x14]
call fcn.00401ce0
test eax, eax
jne 0x40c470
xor ecx, ecx
jmp 0x40c4b3
mov edi, dword [esp + 0x10]
lea ecx, [ebp + ebp + 2]
mov eax, ecx
lea esi, [ebx + 0xc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
mov dword [ecx - 8], ebp
mov eax, dword [0x46b220]
cmp ebx, eax
je 0x40c4ad
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c4ad
push ebx
call fcn.00459de2
add esp, 4
mov eax, dword [esp + 0x10]
mov ecx, eax
mov edx, dword [esp + 0x14]
lea esi, [esp + 0x18]
push esi
lea esi, [esp + 0x1c]
mov eax, dword [edx + 0x3c]
push esi
lea esi, [esp + 0x20]
mov edx, dword [eax]
push esi
lea esi, [esp + 0x24]
push esi
push ecx
push eax
call dword [edx + 0x2c]
mov edx, dword [0x46b220]
mov esi, eax
mov eax, dword [esp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40c506
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c506
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00459de2
add esp, 4
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [esp + 0x10]
mov edx, dword [0x46b220]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40c54a
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40c54a
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.00459de2
add esp, 4
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret