Function at 0x406160
Capabilities:
Get graphical window text

Disassembly:
sub esp, 0x1a8
mov eax, dword [0x42f560]
xor eax, esp
mov dword [esp + 0x1a4], eax
push ebx
push ebp
mov ebp, dword [esp + 0x1b4]
push esi
mov esi, ecx
push edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x50], esi
mov edi, edx
test esi, esi
jne 0x4061b3
mov eax, dword [esp + 0x1c0]
mov ecx, dword [esp + 0x1c4]
mov edx, dword [0x435eec]
push eax
push edi
push ecx
push ebp
push edx
call dword [sym.imp.USER32.dll_CallWindowProcA]
jmp 0x406635
push ebp
mov dword [esp + 0x3c], 0
mov byte [esp + 0xac], 0
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
cmp ebx, 0x103
jle 0x4061fa
lea eax, [ebx + 0x10]
push eax
call fcn.00416def
add esp, 4
mov dword [esp + 0x38], eax
test eax, eax
je 0x4061fa
inc ebx
push ebx
mov ebx, eax
push ebx
push ebp
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov dword [esp + 0x4c], ebx
jmp 0x406219
push 0x100
lea ecx, [esp + 0xac]
push ecx
push ebp
call dword [sym.imp.USER32.dll_GetWindowTextA]
lea edx, [esp + 0xa8]
mov dword [esp + 0x4c], edx
push ebp
mov dword [esp + 0x1c], eax
call dword [sym.imp.USER32.dll_IsWindowEnabled]
mov byte [esp + 0x10], 0
test eax, eax
jne 0x40623b
test byte [esi + 0x74], 0x80
je 0x406237
xor bl, bl
jmp 0x406248
mov bl, 1
jmp 0x406248
xor bl, bl
test byte [esi + 0x19], 0xa
je 0x406248
mov byte [esp + 0x10], 1
lea eax, [esp + 0x1c]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetClientRect]
cmp dword [esp + 0x1c4], 0xf
jne 0x40626c
lea ecx, [esp + 0x68]
push ecx
push ebp
call dword [sym.imp.USER32.dll_BeginPaint]
mov edi, eax
cmp byte [esp + 0x10], 0
je 0x40627b
add esi, 0x9e
jmp 0x40627e
add esi, 0x39
movzx edx, byte [esi + 1]
mov eax, dword [esi + 7]
mov ecx, dword [esi + 0xb]
mov ebp, dword [esi + 2]
mov byte [esp + 0x13], dl
mov edx, dword [esi + 0x11]
mov dword [esp + 0x34], edx
mov edx, dword [esi + 0x19]
mov dword [esp + 0x54], eax
mov eax, dword [esi + 0x15]
mov dword [esp + 0x60], edx
mov edx, dword [esi + 0x22]
mov dword [esp + 0x5c], eax
mov eax, dword [esi + 0x1d]
mov dword [esp + 0x3c], edx
mov edx, dword [esi + 0x37]
mov dword [esp + 0x64], eax
mov al, byte [esi + 0x21]
mov dword [esp + 0x2c], edx
movzx edx, byte [esi + 0x3b]
mov byte [esp + 0x12], al
mov eax, dword [esi + 0x45]
mov dword [esp + 0x30], ecx
mov cl, byte [esi + 0x10]
mov dword [esp + 0x40], eax
mov eax, dword [esi + 0x3c]
mov byte [esp + 0x11], dl
mov edx, dword [esi + 0x40]
mov dword [esp + 0x58], ebp
mov byte [esp + 0x10], cl
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
test bl, bl
je 0x406304
push 0x11
call dword [sym.imp.USER32.dll_GetSysColor]
mov cl, byte [esp + 0x10]
mov dword [esp + 0x48], eax
cmp dword [esp + 0x2c], 0
jne 0x40631b
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x40], edx
mov ebx, dword [esp + 0x50]
cmp byte [ebx + 0x21], 0
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x28]
je 0x406335
add eax, eax
sub eax, edx
mov dword [esp + 0x28], eax
cmp cl, 0x58
jne 0x406387
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_GetParent]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
mov cl, byte [esp + 0x10]
test ebp, ebp
je 0x4063dd
cmp byte [esp + 0x13], 0x42
jne 0x4063c3
mov ecx, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x2c]
push ebp
sub eax, edx
push eax
mov eax, dword [esp + 0x2c]
sub ecx, eax
push ecx
push edx
push eax
mov eax, edi
call fcn.00404f50
add esp, 0x1c
jmp 0x4063d9
cmp cl, 0x4e
jne 0x406351
test ebp, ebp
jne 0x406359
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.USER32.dll_GetParent]
push ebx
push edi
push 0x135
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x406508
push eax
lea edx, [esp + 0x20]
push edx
push edi
call dword [sym.imp.USER32.dll_FillRect]
jmp 0x406508
push 3
push 0
push 0
push 0
push 0
push ebp
push 0
push 0
push edi
call dword [sym.imp.USER32.dll_DrawIconEx]
mov cl, byte [esp + 0x10]
cmp cl, 0x52
je 0x4063f0
cmp cl, 0x46
je 0x4063f0
cmp cl, 0x4f
jne 0x406508
mov edx, dword [esp + 0x34]
cmp edx, 0xffffffff
jne 0x406404
xor eax, eax
mov ecx, 7
xor edx, edx
jmp 0x406417
cmp byte [ebx + 0x21], 0
mov ecx, 6
lea eax, [ecx - 4]
je 0x406417
mov eax, 1
push edx
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreatePen]
lea edx, [esp + 0x5c]
push edx
mov ebp, eax
call dword [sym.imp.GDI32.dll_CreateBrushIndirect]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push ebp
push edi
mov dword [esp + 0x20], eax
call ebx
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x18]
push eax
push edi
call ebx
cmp dword [esp + 0x5c], 1
mov dword [esp + 0x30], eax
jne 0x40647e
cmp dword [esp + 0x58], 0
jne 0x40647e
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_GetParent]
mov edx, dword [esp + 0x14]
push edx
push edi
push 0x135
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40647e
push eax
push edi
call ebx
mov al, byte [esp + 0x10]
cmp al, 0x52
jne 0x4064a3
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push ecx
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_Rectangle]
jmp 0x4064e8
cmp al, 0x46
jne 0x4064c9
push 0x10
push 4
lea ecx, [esp + 0x24]
push ecx
push edi
call dword [sym.imp.USER32.dll_DrawFrameControl]
push 5
push 0xf
lea edx, [esp + 0x24]
push edx
push edi
call dword [sym.imp.USER32.dll_DrawEdge]
jmp 0x4064e8
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push 0x12
push 0x12
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_RoundRect]
mov ecx, dword [esp + 0x34]
push ecx
push edi
call ebx
mov edx, dword [esp + 0x30]
push edx
push edi
call ebx
mov ebx, dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
call ebx
mov eax, dword [esp + 0x18]
push eax
call ebx
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x406548
cmp byte [esp + 0x12], 0x42
jne 0x40652e
movzx ecx, word [esi + 0x33]
movzx edx, word [esi + 0x2f]
push ecx
push edx
push eax
mov eax, edi
call fcn.00404c30
add esp, 0xc
jmp 0x406548
mov ecx, dword [esi + 0x2f]
push 3
push 0
push 0
push 0
push 0
push eax
mov eax, dword [esi + 0x33]
push eax
push ecx
push edi
call dword [sym.imp.USER32.dll_DrawIconEx]
cmp dword [esp + 0x40], 0
je 0x406608
mov ebx, dword [sym.imp.GDI32.dll_SetBkMode]
push 1
push edi
call ebx
mov edx, dword [esp + 0x48]
push edx
push edi
mov ebp, eax
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x44]
push eax
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esi + 0x51]
mov edx, dword [esi + 0x55]
mov dword [esp + 0x44], eax
xor eax, eax
test byte [esp + 0x11], 0x40
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
jne 0x40659c
mov eax, 0x20
mov ecx, dword [esp + 0x50]
mov ecx, dword [ecx + 1]
test ecx, 0x2000
je 0x4065b1
and eax, 0xffffffdf
or eax, 0x10
mov edx, ecx
and edx, 0x300
cmp edx, 0x300
jne 0x4065c4
or eax, 1
and ecx, 0xc00
cmp ecx, 0xc00
jne 0x4065d5
or eax, 4
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x2c]
push eax
lea eax, [esp + 0x20]
push eax
push ecx
push edx
push edi
call dword [sym.imp.USER32.dll_DrawTextA]
push ebp
push edi
call ebx
mov eax, dword [esp + 0x3c]
push eax
push edi
call dword [sym.imp.GDI32.dll_SetTextColor]
mov ecx, dword [esp + 0x44]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
cmp dword [esp + 0x1c4], 0xf
jne 0x406622
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x68]
push edx
push eax
call dword [sym.imp.USER32.dll_EndPaint]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x406633
push eax
call fcn.00416ce5
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x1b4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00416a72
add esp, 0x1a8
ret