Function at 0x405d90
Capabilities:
Get graphical window text
Print debug messages

Disassembly:
sub esp, 0x12c
mov eax, dword [0x40c060]
push ebx
push ebp
mov ebp, dword [sym.imp.GDI32.dll_SetBkMode]
push esi
push edi
mov edi, dword [esp + 0x140]
push 1
push edi
mov dword [esp + 0x140], eax
mov ebx, ecx
call ebp
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
sub eax, esi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
sub eax, edx
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov esi, eax
test esi, esi
jne 0x405dfd
push str.Create_MemDc_ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
jne 0x405e15
push str.Create_MemDc_ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.GDI32.dll_SaveDC]
push 1
push esi
mov dword [esp + 0x28], eax
call ebp
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x140]
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ebp, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push esi
mov dword [esp + 0x2c], eax
call ebp
mov eax, dword [ebx + 0x8c]
test eax, eax
jne 0x405e61
mov ecx, esi
call fcn.004060f0
jmp 0x40606b
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x405f95
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x405ea4
mov ecx, dword [ebx + 0x5c]
test ecx, ecx
jne 0x405e80
push eax
jmp 0x405ea1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, eax
mov eax, 0x10624dd3
mul edx
shr edx, 5
test dl, 1
jne 0x405e9d
mov eax, dword [ebx + 0x5c]
push eax
jmp 0x405ea1
mov ecx, dword [ebx + 0x4c]
push ecx
push edi
call ebp
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x405eb5
mov eax, dword [ebx + 0x88]
test eax, eax
je 0x405ec0
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x405ec0
push eax
push edi
call ebp
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x405ed5
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x405ed5
push eax
push edi
call ebp
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
push 0xcc0020
push 0
push 0
push edi
push edx
push eax
push 0
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov edx, dword [ebx + 8]
push 0x100
lea ecx, [esp + 0x3c]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x405f2b
lea eax, [esp + 0x38]
lea edx, [ebx + 0x98]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405f21
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405f38
sub eax, edx
mov dword [esp + 0x10], eax
je 0x40606b
mov edx, dword [ebx + 0x78]
mov ebp, dword [sym.imp.GDI32.dll_SetTextColor]
push edx
push esi
call ebp
mov ebx, dword [ebx + 0x298]
test ebx, ebx
mov dword [esp + 0x10], eax
je 0x405f72
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x405f76
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
push 0x25
lea eax, [esp + 0x2c]
push eax
push 0xffffffffffffffff
push ecx
push esi
call dword [sym.imp.USER32.dll_DrawTextA]
mov edx, dword [esp + 0x10]
push edx
jmp 0x406060
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x405fa0
push eax
push edi
call ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push 0xcc0020
push 0
push 0
push edi
push eax
push ecx
push 0
push 0
push esi
call dword [sym.imp.GDI32.dll_BitBlt]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, dword [ebx + 8]
push 0x100
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x405ffa
lea eax, [esp + 0x38]
lea edx, [ebx + 0x98]
mov ecx, eax
sub edx, ecx
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405ff0
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406007
sub eax, edx
mov dword [esp + 0x10], eax
je 0x40606b
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov ebp, dword [sym.imp.GDI32.dll_SetTextColor]
push eax
push esi
call ebp
mov ebx, dword [ebx + 0x298]
test ebx, ebx
mov dword [esp + 0x10], eax
je 0x406042
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x406046
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push 0x25
lea edx, [esp + 0x2c]
push edx
push 0xffffffffffffffff
push eax
push esi
call dword [sym.imp.USER32.dll_DrawTextA]
mov ecx, dword [esp + 0x10]
push ecx
push esi
call ebp
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x140]
push 0xcc0020
push 0
push 0
push esi
push edx
push eax
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
mov edx, dword [esp + 0x20]
push edx
push esi
call dword [sym.imp.GDI32.dll_RestoreDC]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
test eax, eax
pop edi
pop esi
pop ebp
pop ebx
jne 0x4060b7
push str.DeleteDC_hdcMem__ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
test eax, eax
jne 0x4060d1
push str.DeleteObject_bmp__ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x128]
mov eax, 1
call fcn.00406fae
add esp, 0x12c
ret 4