Function at 0x4137ec
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe9c
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x4c], edx
mov dword [ebp - 0x48], eax
mov eax, 0x4c3684
call fcn.004afb5c
mov edx, 0x4c0ff1
lea eax, [ebp - 8]
call fcn.004b9ba0
inc dword [ebp - 0x28]
lea edx, [ebp - 8]
push edx
mov word [ebp - 0x34], 8
lea eax, [ebp - 4]
mov edx, dword [ebp - 0x4c]
call fcn.004b9ba0
inc dword [ebp - 0x28]
pop edx
call fcn.004b9de4
test al, al
je 0x413890
mov edx, 0x4c0ff2
lea eax, [ebp - 0x10]
call fcn.004b9ba0
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x50]
call fcn.004b9ba0
inc dword [ebp - 0x28]
pop edx
call fcn.004b9de4
test al, al
setne al
and eax, 1
push eax
dec dword [ebp - 0x28]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x28]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004b9d00
pop ecx
test ecx, ecx
jne 0x413894
xor eax, eax
jmp 0x413899
mov eax, 1
push eax
dec dword [ebp - 0x28]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x28]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004b9d00
pop ecx
test cl, cl
je 0x4138d0
xor eax, eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x413a6c
mov byte [ebp - 0x51], 0
call sub.USER32.DLL_GetDesktopWindow
mov dword [ebp - 0x58], eax
push 5
push dword [ebp - 0x58]
call sub.USER32.DLL_GetWindow
mov dword [ebp - 0x5c], eax
push 0x80
lea ecx, [ebp - 0xe4]
push ecx
push dword [ebp - 0x5c]
call sub.USER32.DLL_GetClassNameA
mov edx, 0x4c0ff3
lea eax, [ebp - 0x18]
call fcn.004b9ba0
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x18]
push ecx
mov word [ebp - 0x34], 0x14
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x4c]
call fcn.004b9ba0
inc dword [ebp - 0x28]
pop edx
call fcn.004b9de4
test al, al
jne 0x413946
lea eax, [ebp - 0xe4]
push eax
push dword [ebp - 0x4c]
call sub.KERNEL32.DLL_lstrcmpA
test eax, eax
je 0x413946
xor ecx, ecx
jmp 0x41394b
mov ecx, 1
push ecx
dec dword [ebp - 0x28]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x28]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004b9d00
pop ecx
test cl, cl
je 0x4139ff
mov edx, 0x4c0ff4
lea eax, [ebp - 0x20]
call fcn.004b9ba0
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x20]
push ecx
mov word [ebp - 0x34], 0x20
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x50]
call fcn.004b9ba0
inc dword [ebp - 0x28]
pop edx
call fcn.004b9de4
push eax
dec dword [ebp - 0x28]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004b9d00
dec dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004b9d00
pop eax
test al, al
je 0x4139cf
mov byte [ebp - 0x51], 1
jmp 0x413a16
push 0x80
lea ecx, [ebp - 0x164]
push ecx
push dword [ebp - 0x5c]
call sub.USER32.DLL_GetWindowTextA
push dword [ebp - 0x50]
lea eax, [ebp - 0x164]
push eax
call fcn.004af921
add esp, 8
test eax, eax
je 0x4139ff
mov byte [ebp - 0x51], 1
jmp 0x413a16
push 2
push dword [ebp - 0x5c]
call sub.USER32.DLL_GetWindow
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
jne 0x4138e9
cmp byte [ebp - 0x51], 0
je 0x413a60
cmp dword [ebp - 0x5c], 0
je 0x413a60
xor edx, edx
mov dword [ebp - 0x60], edx
lea ecx, [ebp - 0x60]
push ecx
push dword [ebp - 0x5c]
call sub.USER32.DLL_GetWindowThreadProcessId
cmp dword [ebp - 0x60], 0
je 0x413a60
push dword [ebp - 0x60]
push 1
push 0x1f0fff
call sub.KERNEL32.DLL_OpenProcess
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x413a60
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
jmp 0x413a6c
xor eax, eax
mov edx, dword [ebp - 0x44]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret