Function at 0x407890
Capabilities:
Get graphical window text

Disassembly:
push 0xffffffffffffffff
push 0x4a96cb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x22c
push ebx
push ebp
mov ebp, dword [esp + 0x244]
push esi
push edi
mov esi, ecx
mov dword [esp + 0x18], ebp
mov eax, dword [esi + 0x24]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x244], edi
je 0x4078d0
push 1
jmp 0x4078fd
mov al, byte [esp + 0x254]
test al, 1
jne 0x4078fb
cmp dword [esi + 0x2c], edi
jne 0x4078fb
test al, 4
je 0x4078f0
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x30]
push 3
push edx
push eax
jmp 0x407905
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0x30]
push edi
push ecx
push edx
jmp 0x407905
push 2
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x30]
push eax
push ecx
mov ebx, dword [esp + 0x25c]
mov ecx, esi
push ebx
push ebp
call fcn.00407130
mov word [esp + 0x30], di
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x32]
rep stosd dword es:[edi], eax
mov eax, dword [esi + 4]
lea edx, [esp + 0x30]
push 0x104
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextW]
lea ecx, [esp + 0x30]
push ecx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jbe 0x407a7b
mov eax, dword [esi + 0x54]
mov ecx, 0x190
test eax, eax
je 0x407962
mov ecx, 0x3bc
mov eax, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push eax
push 0x10
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ecx
push 0
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_CreateFontW]
mov edi, eax
lea eax, [esp + 0x20]
push ebx
push eax
call dword [sym.imp.USER32.dll_CopyRect]
push edi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x30]
xor eax, eax
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
call edi
cmp eax, 0xffffffff
jne 0x4079c4
lea edx, [esp + 0x30]
push edx
call edi
lea ecx, [esp + 0x10]
lea edx, [esp + 0x30]
push ecx
push eax
push edx
push ebp
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
add eax, ecx
cdq
sub eax, edx
mov edx, dword [esp + 0x20]
mov ecx, eax
mov eax, dword [esp + 0x28]
add eax, edx
cdq
sub eax, edx
mov edi, eax
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
sar edi, 1
sar eax, 1
sub edi, eax
mov eax, dword [esp + 0x14]
cdq
sub eax, edx
sar ecx, 1
sar eax, 1
sub ecx, eax
mov al, byte [esp + 0x254]
test al, 1
mov ebx, ecx
je 0x407a1d
inc edi
inc ebx
push 1
push ebp
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x18], eax
push ecx
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
test byte [esp + 0x254], 4
je 0x407a43
push 0x22
jmp 0x407a45
push 2
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push edx
push eax
push ebx
push edi
lea ecx, [esp + 0x44]
push 0
push ecx
push 0
push 0
push ebp
call dword [sym.imp.USER32.dll_DrawStateW]
mov edx, dword [esp + 0x1c]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x18]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SetBkMode]
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x238
ret 0xc