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

Disassembly:
sub esp, 0x12c
mov eax, dword [0x426990]
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 0x405d0d
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 0x405d25
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 0x405d71
mov ecx, esi
call fcn.00406000
jmp 0x405f7b
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x405ea5
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x405db4
mov ecx, dword [ebx + 0x5c]
test ecx, ecx
jne 0x405d90
push eax
jmp 0x405db1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, eax
mov eax, 0x10624dd3
mul edx
shr edx, 5
test dl, 1
jne 0x405dad
mov eax, dword [ebx + 0x5c]
push eax
jmp 0x405db1
mov ecx, dword [ebx + 0x4c]
push ecx
push edi
call ebp
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x405dc5
mov eax, dword [ebx + 0x88]
test eax, eax
je 0x405dd0
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x405dd0
push eax
push edi
call ebp
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x405de5
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x405de5
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 0x405e3b
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 0x405e31
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405e48
sub eax, edx
mov dword [esp + 0x10], eax
je 0x405f7b
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 0x405e82
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x405e86
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 0x405f70
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x405eb0
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 0x405f0a
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 0x405f00
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405f17
sub eax, edx
mov dword [esp + 0x10], eax
je 0x405f7b
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 0x405f52
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x405f56
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 0x405fc7
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 0x405fe1
push str.DeleteObject_bmp__ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x128]
mov eax, 1
call fcn.00408be3
add esp, 0x12c
ret 4