Function at 0x412239
Capabilities:
Get graphical window text

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
mov ebx, ecx
mov byte [ebp - 1], 1
push esi
xor esi, esi
mov dword [ebp - 0x24], esi
cmp dword [ebx + 0x28], esi
jbe 0x4124de
push edi
lea eax, [ebx + 0x24]
lea edi, [ebx + 0x34]
push esi
mov ecx, eax
call fcn.00405cbf
push esi
mov ecx, edi
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
call fcn.00405cbf
xor edi, edi
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
cmp dword [eax + 4], edi
jbe 0x4124ca
add eax, 0x20
mov dword [ebp - 0x38], eax
push edi
mov ecx, eax
call fcn.00411b10
movzx eax, word [eax]
mov dword [ebp - 0x30], eax
test ax, ax
je 0x4124b7
cmp eax, 0xd
je 0x4124b7
mov ecx, 0x1011
cmp ax, cx
je 0x4124b7
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
and dword [ebp - 0x10], 0
and dword [ebp - 0x14], 0
push ecx
mov esi, dword [eax]
lea ecx, [ebp - 0x10]
push ecx
push edi
push eax
mov ecx, dword [esi + 0x14]
call dword [0x417364]
call dword [esi + 0x14]
test eax, eax
jne 0x412499
mov ecx, dword [ebp - 0x18]
push edi
call fcn.00405cbf
mov eax, dword [eax]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
inc eax
xor ecx, ecx
push 2
pop edx
mov dword [ebp - 8], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00413c9e
mov esi, eax
mov dword [ebp - 0xc], esi
pop ecx
test esi, esi
je 0x412499
mov ecx, dword [ebp - 0x18]
push edi
call fcn.00405cbf
push dword [ebp - 8]
push esi
mov ecx, dword [eax]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [ebp - 0x18]
add eax, 0x10
push edi
mov ecx, eax
mov dword [ebp - 0x28], eax
call fcn.00405cbf
mov eax, dword [eax]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
inc eax
xor ecx, ecx
push 2
pop edx
mov dword [ebp - 0x2c], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00413c9e
mov esi, eax
mov dword [ebp - 8], esi
pop ecx
test esi, esi
je 0x412485
mov ecx, dword [ebp - 0x28]
push edi
call fcn.00405cbf
push dword [ebp - 0x2c]
push esi
mov ecx, dword [eax]
push dword [ecx + 4]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4123ba
test dx, dx
je 0x4123b6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4123ba
add eax, 4
add ecx, 4
test dx, dx
jne 0x412394
xor eax, eax
jmp 0x4123bf
sbb eax, eax
or eax, 1
test eax, eax
jne 0x412485
mov eax, dword [ebp - 0x14]
mov ecx, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4123f2
test dx, dx
je 0x4123ee
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4123f2
add eax, 4
add ecx, 4
test dx, dx
jne 0x4123cc
xor eax, eax
jmp 0x4123f7
sbb eax, eax
or eax, 1
test eax, eax
je 0x412485
push dword [ebp - 8]
mov eax, dword [ebp - 0x1c]
push dword [ebp - 0x30]
push dword [ebp - 0xc]
mov esi, dword [eax]
push edi
push eax
mov ecx, dword [esi + 0x20]
call dword [0x417364]
call dword [esi + 0x20]
mov esi, eax
test esi, esi
jns 0x412482
cmp byte [ebp - 1], 0
je 0x412482
push 0x415b5c
lea ecx, [ebp - 0x20]
call fcn.00403d89
push esi
push dword [ebp - 0xc]
lea eax, [ebp - 0x20]
push dword [ebp - 8]
push 0x23b
push eax
call fcn.00405c57
add esp, 0x14
lea eax, [ebp - 0x34]
push 0x226
push eax
call fcn.00407a69
mov esi, dword [ebp - 0x20]
push 0
push dword [eax]
push esi
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx - 0x10]
call fcn.0040c9e8
lea ecx, [esi - 0x10]
mov byte [ebp - 1], 0
call fcn.0040c9e8
mov esi, dword [ebp - 8]
push dword [ebp - 0xc]
call fcn.00413c70
pop ecx
test esi, esi
je 0x412499
push esi
call fcn.00413c70
pop ecx
cmp dword [ebp - 0x10], 0
je 0x4124a8
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
cmp dword [ebp - 0x14], 0
je 0x4124b7
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov eax, dword [ebp - 0x18]
inc edi
cmp edi, dword [eax + 4]
mov eax, dword [ebp - 0x38]
jb 0x412289
mov esi, dword [ebp - 0x24]
inc esi
lea eax, [ebx + 0x24]
lea edi, [ebx + 0x34]
mov dword [ebp - 0x24], esi
cmp esi, dword [ebx + 0x28]
jb 0x41225e
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10