Function at 0x405840
Capabilities:
Capture screenshot

Disassembly:
push 0xffffffffffffffff
push 0x43b7d8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0x40]
push edi
mov ecx, dword [esi + 0x20]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetClientRect]
mov edx, dword [esi + 0x20]
push edx
call dword [sym.imp.USER32.dll_GetDC]
push eax
call sub.MFC42.DLL_CDC::FromHandle
lea ecx, [esp + 0x34]
mov edi, eax
call fcn.0043a606
test edi, edi
mov dword [esp + 0x8c], 0
jne 0x40589b
xor eax, eax
jmp 0x40589e
mov eax, dword [edi + 4]
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push eax
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CDC::Attach
mov eax, dword [edi]
lea ecx, [esi + 0x80]
push ecx
mov ecx, edi
call dword [eax + 0x30]
push 1
mov ecx, edi
mov dword [esp + 0x2c], eax
call sub.MFC42.DLL_CDC::SetBkMode
mov eax, dword [esi + 0x68]
lea edx, [esp + 0x2c]
push edx
mov ecx, dword [eax - 8]
push ecx
push eax
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x2c]
mov ebp, dword [esp + 0x44]
sub eax, ecx
sub eax, ebp
cdq
sub eax, edx
mov ebp, eax
mov eax, dword [esi + 0x3d0]
sar ebp, 1
add ebp, 0x14
test eax, eax
je 0x405911
mov dword [esi + 0x3c8], 0x1e
jmp 0x40591b
mov dword [esi + 0x3c8], 0x32
mov edx, dword [edi]
mov ebx, dword [esi + 0x3c8]
push 0x86391e
mov ecx, edi
call dword [edx + 0x38]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x68]
mov edx, dword [edi]
mov ecx, dword [eax - 8]
push ecx
push eax
push ebx
push ebp
mov ecx, edi
call dword [edx + 0x64]
mov ecx, dword [esp + 0x18]
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 0x38]
mov eax, dword [esi + 0x3ac]
lea edx, [esp + 0x54]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [esi + 0x3a8]
test eax, eax
je 0x40596f
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x38]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esp + 0x4c]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x38]
sub ecx, eax
lea eax, [esp + 0x34]
push 0xcc0020
neg eax
sbb eax, eax
and eax, edx
mov edx, dword [esp + 0x60]
push edx
mov edx, dword [esp + 0x60]
push edx
push 0
push 0
push eax
mov eax, dword [esp + 0x74]
push eax
push ecx
mov ecx, dword [edi + 4]
push 0
push 0
push ecx
call dword [sym.imp.GDI32.dll_StretchBlt]
mov eax, dword [esi + 0x3b4]
lea edx, [esp + 0x54]
push edx
push 0x18
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [esi + 0x3b0]
test eax, eax
je 0x4059db
mov eax, dword [eax + 4]
mov ecx, dword [esp + 0x38]
push eax
push ecx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x5c]
lea eax, [esp + 0x34]
push 0xcc0020
neg eax
sbb eax, eax
push 0
and eax, ecx
push 0
push eax
mov eax, dword [esp + 0x68]
push edx
lea edx, [ebx - 0xa]
lea ecx, [ebp - 0x37]
push eax
mov eax, dword [edi + 4]
push edx
push ecx
push eax
mov dword [esp + 0x50], ecx
call dword [sym.imp.GDI32.dll_BitBlt]
mov edx, dword [esi + 0x3bc]
lea ecx, [esp + 0x54]
push ecx
push 0x18
push edx
call dword [sym.imp.GDI32.dll_GetObjectA]
lea eax, [esi + 0x3b8]
test eax, eax
je 0x405a3f
mov eax, dword [eax + 4]
push eax
mov eax, dword [esp + 0x3c]
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
mov edx, dword [edi]
lea eax, [esi + 0x88]
push eax
mov ecx, edi
call dword [edx + 0x30]
mov eax, dword [esi + 0x3d0]
test eax, eax
je 0x405a6e
mov dword [esi + 0x3cc], 0x14
jmp 0x405a78
mov dword [esi + 0x3cc], 0x1e
mov ecx, dword [esi + 0x3cc]
mov eax, dword [esi + 0x74]
add ebx, ecx
mov dword [esp + 0x18], 0
test eax, eax
jle 0x405b54
lea ecx, [ebp - 0x32]
lea edx, [ebp + 0xfa]
add ebp, 0xffffff9c
lea eax, [esi + 0x98]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
lea ebp, [ebx - 5]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x70]
mov edx, dword [esp + 0x1c]
add ecx, eax
add ebx, 0x28
push edi
push ecx
push ebx
push edx
mov ecx, esi
add ebp, 0x28
call fcn.00405c50
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push 9
push 0
push 0
push ebx
push eax
push 0
call sub.MFC42.DLL_CWnd::SetWindowPos
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov edx, dword [esp + 0x58]
push 0xcc0020
neg eax
sbb eax, eax
push 0
and eax, ecx
mov ecx, dword [esp + 0x64]
push 0
push eax
mov eax, dword [esp + 0x34]
push ecx
mov ecx, dword [edi + 4]
push edx
push ebp
push eax
push ecx
call dword [sym.imp.GDI32.dll_BitBlt]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
add ecx, 0xc
mov dword [esp + 0x10], ecx
mov ecx, dword [esi + 0x74]
inc eax
add edx, 0xc4
cmp eax, ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
jl 0x405ac0
mov eax, dword [esp + 0x28]
mov edx, dword [edi]
push eax
mov ecx, edi
call dword [edx + 0x30]
mov eax, dword [esi + 0x3d0]
test eax, eax
je 0x405c06
xor ecx, ecx
lea eax, [esi + 0x3c0]
mov dword [esp + 0x70], ecx
mov dword [esp + 0x6c], 0
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
test eax, eax
mov dword [esp + 0x80], ecx
je 0x405b9c
mov eax, dword [eax + 4]
mov edx, dword [esp + 0x38]
push eax
push edx
call sub.MFC42.DLL_CDC::SelectGdiObject
mov ecx, dword [esi + 0x3c4]
mov ebp, eax
lea eax, [esp + 0x6c]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esp + 0x38]
lea eax, [esp + 0x34]
mov edx, dword [esp + 0x74]
push 0xcc0020
neg eax
sbb eax, eax
push 0
and eax, ecx
mov ecx, dword [esp + 0x34]
push 0
push eax
mov eax, dword [esp + 0x80]
push edx
mov edx, dword [edi + 4]
add ebx, 0x14
push eax
push ebx
push ecx
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
test ebp, ebp
je 0x405bfc
mov ebp, dword [ebp + 4]
mov eax, dword [edi + 4]
push ebp
push eax
call sub.MFC42.DLL_CDC::SelectGdiObject
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CDC::DeleteDC
mov ecx, dword [edi + 4]
mov edx, dword [esi + 0x20]
push ecx
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [esp + 0x34]
mov dword [esp + 0x8c], 0xffffffff
call sub.MFC42.DLL_CDC::CDC
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x80
ret