Function at 0x4051d0
Capabilities:
Get graphical window text
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x268
mov eax, dword [esp + 0x278]
push ebx
push ebp
mov ebx, dword [sym.imp.USER32.dll_CopyRect]
push esi
mov esi, dword [esp + 0x280]
push edi
mov dword [esp + 0x4c], ecx
lea edi, [esi + 0x1c]
lea ecx, [esp + 0x14]
push edi
push ecx
mov dword [eax], 1
call ebx
lea edx, [esp + 0x60]
push edi
push edx
call ebx
push 0x15
call dword [sym.imp.USER32.dll_GetSystemMetrics]
mov eax, dword [esi + 0x10]
xor ecx, ecx
mov edx, eax
and edx, 4
cmp dl, 4
mov edx, dword [esi + 0x18]
sete cl
mov dword [esp + 0x38], ecx
mov ecx, eax
and ecx, 1
mov dword [esp + 0x10], edx
dec cl
mov edx, dword [esp + 0x1c]
neg cl
sbb ecx, ecx
and eax, 0x10
inc ecx
xor ebx, ebx
mov edi, ecx
mov ecx, dword [0x46ba68]
push ecx
cmp al, 0x10
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x28]
sete bl
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x20]
sub edx, ecx
push edx
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00405920
mov ecx, dword [0x46ba68]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ecx
push ecx
mov ecx, dword [esp + 0x28]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x20]
sub edx, ecx
push edx
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00405920
mov esi, dword [sym.imp.USER32.dll_InflateRect]
push 0xfffffffffffffffe
lea eax, [esp + 0x18]
push 0xfffffffffffffffe
push eax
call esi
test edi, edi
jne 0x4052b1
test ebx, ebx
je 0x4052e5
mov ecx, dword [0x46ba68]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push ecx
push ecx
mov ecx, dword [esp + 0x28]
sub ecx, eax
push ecx
mov ecx, dword [esp + 0x20]
sub edx, ecx
push edx
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.00405920
push 0xfffffffffffffffe
lea eax, [esp + 0x18]
push 0xfffffffffffffffe
push eax
call esi
mov eax, dword [0x46ba64]
xor ecx, ecx
test edi, edi
sete cl
test ecx, ecx
je 0x40530f
cmp eax, 0xffffffff
jne 0x405302
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push 0x3fb33333
push eax
call fcn.004364f0
jmp 0x405327
cmp eax, 0xffffffff
jne 0x40531c
push 0xf
call dword [sym.imp.USER32.dll_GetSysColor]
push 0x3f666666
push eax
call fcn.00436280
add esp, 8
push 0x3fc00000
push eax
call fcn.004364f0
mov ecx, dword [0x46ba64]
push 0x3f333333
push ecx
mov ebx, eax
call fcn.00436280
xor ecx, ecx
xor edx, edx
mov esi, ebx
mov cl, bh
mov edi, eax
mov dl, ah
shr ebx, 0x10
shr eax, 0x10
and ebx, 0xff
and eax, 0xff
and esi, 0xff
and edi, 0xff
sub eax, ebx
mov dword [esp + 0x44], esi
sub edi, esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
and ecx, 0xff
and edx, 0xff
sub esi, eax
xor eax, eax
add esp, 0x10
sub edx, ecx
xor ebp, ebp
cmp esi, eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ebx
jle 0x40549b
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], eax
lea eax, [edi + edi]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
add edx, edx
mov dword [esp + 0x48], edx
lea edx, [eax + eax]
mov dword [esp + 0x28], edx
jmp 0x4053da
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x50], eax
lea eax, [edx + ebp]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x54], eax
add eax, 2
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x58], edx
cdq
idiv esi
add al, bl
xor ebx, ebx
mov bh, al
mov eax, dword [esp + 0x24]
cdq
idiv esi
add al, cl
mov bl, al
mov eax, dword [esp + 0x2c]
cdq
idiv esi
mov dl, byte [esp + 0x34]
shl ebx, 8
add al, dl
and eax, 0xff
or ebx, eax
mov eax, dword [esp + 0x10]
push ebx
push eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov edi, eax
cmp edi, 0xffffffff
je 0x405466
mov edx, dword [esp + 0x10]
push 0
push 0
lea ecx, [esp + 0x58]
push 0
push ecx
push 2
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_ExtTextOutW]
mov eax, dword [esp + 0x10]
push edi
push eax
call dword [sym.imp.GDI32.dll_SetBkColor]
mov ecx, dword [esp + 0x28]
mov ebx, dword [esp + 0x30]
mov edx, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
add ebx, ecx
mov ecx, dword [esp + 0x2c]
add ebp, 2
add edi, edx
add ecx, eax
cmp ebp, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], ecx
jl 0x4053d2
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x70]
push 0x104
push ecx
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esp + 0x10]
push 1
push ecx
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [0x46ba68]
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.GDI32.dll_SetTextColor]
push edx
push eax
call esi
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.USER32.dll_DrawTextW]
lea ecx, [esp + 0x14]
push 0x35
push ecx
lea edx, [esp + 0x78]
push 0xffffffffffffffff
push edx
push eax
call edi
test byte [esp + 0x38], 0x20
je 0x405517
mov ecx, dword [esp + 0x10]
push 0x808080
push ecx
call esi
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push 0x35
push edx
lea eax, [esp + 0x78]
push 0xffffffffffffffff
push eax
push ecx
call edi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
test eax, eax
pop ebx
je 0x405532
push eax
mov dword [esp + 4], 0
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, 1
add esp, 0x268
ret 0x10