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

Disassembly:
sub esp, 0x12c
mov eax, dword [0x429990]
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 0x40816d
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 0x408185
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 0x4081d1
mov ecx, esi
call fcn.00408460
jmp 0x4083db
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x408305
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x408214
mov ecx, dword [ebx + 0x5c]
test ecx, ecx
jne 0x4081f0
push eax
jmp 0x408211
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, eax
mov eax, 0x10624dd3
mul edx
shr edx, 5
test dl, 1
jne 0x40820d
mov eax, dword [ebx + 0x5c]
push eax
jmp 0x408211
mov ecx, dword [ebx + 0x4c]
push ecx
push edi
call ebp
mov eax, dword [ebx + 0x7c]
test eax, eax
jne 0x408225
mov eax, dword [ebx + 0x88]
test eax, eax
je 0x408230
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x408230
push eax
push edi
call ebp
mov eax, dword [ebx + 0x80]
test eax, eax
je 0x408245
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x408245
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 0x40829b
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 0x408291
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082a8
sub eax, edx
mov dword [esp + 0x10], eax
je 0x4083db
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 0x4082e2
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x4082e6
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 0x4083d0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x408310
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 0x40836a
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 0x408360
lea eax, [ebx + 0x98]
mov dword [esp + 0x1c], eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408377
sub eax, edx
mov dword [esp + 0x10], eax
je 0x4083db
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 0x4083b2
push ebx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
mov edi, eax
jmp 0x4083b6
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 0x408427
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 0x408441
push str.DeleteObject_bmp__ERROR
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x128]
mov eax, 1
call fcn.0040b693
add esp, 0x12c
ret 4