Function at 0x407827
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
cmp dword [ebp + 4], ebx
je 0x407ad2
call fcn.00407d82
test al, al
jne 0x407847
mov byte [esp + 0x34], 1
cmp dword [ebp + 0x64], ebx
push esi
push edi
mov dword [esp + 0x14], ebx
jle 0x407a79
push dword [esp + 0x14]
lea ecx, [ebp + 0x58]
call fcn.0041e860
mov esi, eax
mov ecx, ebp
push dword [esi + 0xc]
call fcn.0040710f
mov ebx, eax
xor edi, edi
cmp ebx, edi
je 0x407a66
mov eax, dword [ebx + 0x50]
cmp eax, edi
je 0x407a66
mov ecx, dword [ebx + 8]
cmp ecx, 3
je 0x40794e
cmp ecx, 4
je 0x40794e
cmp ecx, 5
jne 0x40790f
push eax
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov edi, eax
inc edi
push edi
call fcn.00424dd9
test eax, eax
pop ecx
mov dword [esp + 0x10], eax
jne 0x4078c9
mov ecx, 0x47e924
call fcn.0041cd1e
push eax
call fcn.0041d881
pop ecx
cmp edi, 1
jne 0x4078d7
mov eax, dword [esp + 0x10]
and byte [eax], 0
jmp 0x4078e5
push edi
push dword [esp + 0x14]
push dword [ebx + 0x50]
call dword [sym.imp.USER32.dll_GetWindowTextA]
push dword [esp + 0x10]
lea ecx, [esi + 0x10]
call fcn.0041bf12
push dword [esp + 0x10]
call fcn.00424fc3
push dword [esp + 0x14]
mov dword [esi + 0x1c], eax
call fcn.00424dce
pop ecx
xor edi, edi
pop ecx
jmp 0x40798f
cmp ecx, 7
je 0x407919
cmp ecx, 8
jne 0x40798f
xor edx, edx
cmp ecx, 7
setne dl
dec edx
push edi
and edx, 0x41
push edi
add edx, 0x147
push edx
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
lea ecx, [esp + 0x18]
push 0xa
push ecx
push eax
mov dword [esi + 0x1c], eax
call fcn.00427836
add esp, 0xc
lea eax, [esp + 0x18]
jmp 0x407986
push edi
push edi
push 0xf0
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 1
pop ecx
cmp eax, ecx
je 0x40796d
cmp eax, 2
je 0x40796d
mov dword [esi + 0x1c], edi
jmp 0x407970
mov dword [esi + 0x1c], ecx
lea eax, [esp + 0x28]
push 0xa
push eax
push dword [esi + 0x1c]
call fcn.004278e9
add esp, 0xc
lea eax, [esp + 0x28]
push eax
lea ecx, [esi + 0x10]
call fcn.0041bf12
push 0x58
call fcn.00424dd9
cmp eax, edi
pop ecx
je 0x4079a4
mov ecx, eax
call fcn.00407add
mov edi, eax
test edi, edi
jne 0x4079b9
mov ecx, 0x47e924
call fcn.0041cd1e
push eax
call fcn.0041d881
pop ecx
push esi
mov ecx, edi
call fcn.0041bf80
or dword [edi + 0x10], 0xffffffff
lea ebx, [esi + 0x10]
push ebx
lea ecx, [edi + 0x48]
mov dword [edi + 0xc], 1
call fcn.0041bf80
mov eax, dword [esi + 0x1c]
test esi, esi
mov dword [edi + 0x54], eax
je 0x4079f7
mov ecx, ebx
call fcn.0041befb
mov ecx, esi
call fcn.0041befb
push esi
call fcn.00424dce
pop ecx
and dword [esp + 0x10], 0
cmp dword [0x47e4dc], 0
jle 0x407a57
push dword [esp + 0x10]
mov esi, 0x47e4d0
mov ecx, esi
call fcn.0041e860
mov ebx, eax
push 1
push edi
mov ecx, ebx
call fcn.0041c176
test al, al
jne 0x407a37
inc dword [esp + 0x10]
mov eax, dword [esp + 0x10]
cmp eax, dword [0x47e4dc]
jl 0x407a05
jmp 0x407a5c
test ebx, ebx
je 0x407a49
mov ecx, ebx
call fcn.00407b11
push ebx
call fcn.00424dce
pop ecx
push edi
mov ecx, esi
push dword [esp + 0x14]
call fcn.0041e907
jmp 0x407a66
mov esi, 0x47e4d0
push 0xffffffffffffffff
push edi
mov ecx, esi
call fcn.0041e87a
inc dword [esp + 0x14]
mov eax, dword [esp + 0x14]
cmp eax, dword [ebp + 0x64]
jl 0x407856
xor ebx, ebx
lea ecx, [ebp + 0x58]
call fcn.0041e921
cmp dword [0x47e110], ebp
jne 0x407a8f
mov dword [0x47e110], ebx
mov esi, dword [sym.imp.USER32.dll_GetDlgItem]
push ebx
push 1
push dword [ebp + 4]
call esi
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call edi
push ebx
push 2
push dword [ebp + 4]
call esi
push eax
call edi
push ebx
push 3
push dword [ebp + 4]
call esi
push eax
call edi
cmp byte [esp + 0x3c], 0
pop edi
mov dword [0x47df60], ebp
pop esi
je 0x407ad2
push ebx
call fcn.00407b45
pop ecx
push 1
pop eax
pop ebp
pop ebx
add esp, 0x28
ret 4