Function at 0x405570
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x110c
call fcn.00474d40
mov eax, dword [0x48913c]
push ebx
push esi
push edi
mov dword [esp + 0x1114], eax
xor eax, eax
mov ecx, 0x400
lea edi, [esp + 0x110]
rep stosd dword es:[edi], eax
mov ecx, dword [0x4897c0]
push 0x1000
lea eax, [esp + 0x114]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov edx, dword [0x489938]
mov esi, 1
inc edx
cmp edx, esi
mov dword [esp + 0xc], esi
jbe 0x4057b3
mov ebx, dword [sym.imp.USER32.dll_EnableWindow]
jmp 0x4055e0
mov esi, dword [esp + 0xc]
lea ecx, [ecx]
mov eax, dword [esi*8 + 0x489938]
test eax, eax
lea edi, [esi*8 + 0x489938]
jne 0x40571b
mov eax, dword [esi*8 + 0x48993c]
mov dword [0x4910a4], eax
call section._TEXT
test eax, eax
jne 0x4056fe
mov ecx, dword [0x48992c]
push eax
push ecx
call ebx
mov edx, dword [0x489830]
push 0
push edx
call ebx
mov eax, dword [0x4899a0]
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
push 0x6e
push 0
push 0x406
push eax
call esi
mov ecx, dword [0x4899a0]
push 0
push 0xa
push 0x402
push ecx
call esi
lea edx, [esp + 0x10]
push 0x401a14
push edx
call fcn.00474c6e
mov ecx, dword [0x4897c0]
add esp, 8
push 0x1000
lea eax, [esp + 0x114]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea eax, [esp + 0x10]
mov ecx, eax
nop
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x405680
lea edi, [esp + 0x110]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405693
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [0x4897c0]
lea edx, [esp + 0x110]
push edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.USER32.dll_SetWindowTextA]
call fcn.0047d17b
call fcn.00403050
mov ecx, dword [0x48992c]
push 1
push ecx
call ebx
mov edx, dword [0x489830]
push 1
push edx
call ebx
mov eax, dword [esp + 0xc]
mov eax, dword [eax*8 + 0x48993c]
push eax
push eax
lea ecx, [esp + 0x18]
push 0x4019d8
push ecx
call fcn.00474c6e
add esp, 0x10
jmp 0x40576c
mov edx, dword [esi*8 + 0x48993c]
push eax
push edx
lea eax, [esp + 0x18]
push 0x4019b4
push eax
call fcn.00474c6e
add esp, 0x10
jmp 0x40576c
xor ecx, ecx
mov cx, word [esi*8 + 0x48993c]
lea esi, [esi*8 + 0x48993c]
xor edx, edx
mov dx, word [edi]
push ecx
push edx
call fcn.004027d0
mov ecx, dword [edi]
add esp, 8
test eax, eax
lea edx, [esp + 0x10]
jne 0x405759
mov eax, dword [esi]
push eax
push ecx
push 0x401990
push edx
call fcn.00474c6e
add esp, 0x10
jmp 0x40576c
push eax
mov eax, dword [esi]
push eax
push ecx
push 0x401970
push edx
call fcn.00474c6e
add esp, 0x14
lea eax, [esp + 0x10]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405772
lea edi, [esp + 0x110]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x405783
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x489938]
inc eax
inc ecx
cmp eax, ecx
mov dword [esp + 0xc], eax
jb 0x4055d9
mov eax, dword [0x4897c0]
lea edx, [esp + 0x110]
push edx
push eax
call dword [sym.imp.USER32.dll_SetWindowTextA]
mov ecx, dword [esp + 0x1114]
xor eax, eax
call fcn.00474d28
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret