Function at 0x405cb0
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x42c
push ebx
push ebp
push esi
push edi
push 0
push str.5B3838F5_0C81_46D9_A4C0_6EA28CA3E942
call dword [sym.imp.USER32.dll_FindWindowW]
mov ebp, eax
test ebp, ebp
je 0x405e29
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x3d]
mov byte [esp + 0x3c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x3c]
push 0x400
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x18], cl
lea ecx, [esp + 0x18]
call fcn.004046d0
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x18]
push ebx
call fcn.00404b70
test al, al
je 0x405d4c
mov edi, dword [esp + 0x18]
mov ecx, ebx
mov edx, ecx
lea esi, [esp + 0x3c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call fcn.00404b50
mov eax, dword [0x40c24c]
push 1
push eax
lea eax, [esp + 0x1b]
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x1f], 0x5f
call fcn.00404650
mov cl, byte [esp + 0x13]
mov edi, dword [esp + 0x1c]
xor ebx, ebx
mov esi, eax
mov byte [esp + 0x2c], cl
push ebx
lea ecx, [esp + 0x30]
inc esi
call fcn.004046d0
sub edi, esi
lea edx, [esp + 0x14]
push edi
push esi
push edx
lea ecx, [esp + 0x38]
call fcn.00404450
mov eax, dword [0x40c24c]
lea ecx, [esp + 0x2c]
push eax
push ebx
push ecx
lea ecx, [esp + 0x20]
call fcn.00404450
push 1
lea ecx, [esp + 0x30]
call fcn.004046d0
mov esi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea edx, [esp + 0x24]
push edx
push ebp
call esi
mov ecx, dword [esp + 0x444]
lea eax, [esp + 0x28]
push eax
push ecx
call esi
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
cmp edx, eax
je 0x405e63
push ebx
push str.5B3838F5_0C81_46D9_A4C0_6EA28CA3E942
push ebp
push ebx
call dword [sym.imp.USER32.dll_FindWindowExW]
mov ecx, dword [esp + 0x18]
mov ebp, eax
cmp ecx, ebx
je 0x405e15
mov al, byte [ecx - 1]
test al, al
je 0x405e0b
cmp al, 0xff
je 0x405e0b
dec al
mov byte [ecx - 1], al
jmp 0x405e15
dec ecx
push ecx
call fcn.00405f00
add esp, 4
cmp ebp, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
jne 0x405cd1
mov esi, dword [esp + 0x440]
mov al, byte [esp + 0x13]
xor edx, edx
xor edi, edi
mov byte [esi], al
or ecx, 0xffffffff
xor eax, eax
mov dword [esi + 4], edx
mov dword [esi + 8], edx
mov dword [esi + 0xc], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.00404990
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x42c
ret
mov esi, dword [esp + 0x440]
mov al, byte [esp + 0x14]
lea edx, [esp + 0x14]
mov byte [esi], al
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [0x40c24c]
push ecx
push ebx
push edx
mov ecx, esi
call fcn.00404450
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x405e56
mov al, byte [ecx - 1]
test al, al
je 0x405eb2
cmp al, 0xff
je 0x405eb2
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x42c
ret
dec ecx
push ecx
call fcn.00405f00
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x42c
ret