Function at 0x40a160
Capabilities:
Capture screenshot

Disassembly:
sub esp, 0x4c
push esi
mov esi, ecx
cmp dword [esi + 0x2d8], 0
je 0x40a3e4
mov eax, dword [esi + 4]
push ebx
mov ebx, dword [esi + 0x2e8]
sub ebx, dword [esi + 0x2e0]
push ebp
mov ebp, dword [esi + 0x2ec]
sub ebp, dword [esi + 0x2e4]
push edi
push eax
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push edi
mov dword [esp + 0x20], edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push ebp
push ebx
push edi
mov dword [esp + 0x1c], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ecx, dword [esp + 0x1c]
push pe_nt_image_headers32
push pe_nt_image_headers32
push ecx
mov edi, eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x10]
push edx
push eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x24]
push ecx
push edi
call dword [sym.imp.GDI32.dll_SelectObject]
push 1
push edi
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [esi + 0x300]
xor eax, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov eax, pe_nt_image_headers32
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], eax
push edx
lea eax, [esp + 0x40]
push eax
push edi
call dword [sym.imp.USER32.dll_FillRect]
mov edx, dword [esp + 0x10]
xor eax, eax
push eax
push eax
push eax
lea ecx, [esp + 0x48]
push ecx
mov ecx, dword [esi + 0x2d8]
push edx
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x58], ebx
call fcn.0053aeb0
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x2e4]
mov edx, dword [esi + 0x2e0]
push 0xcc0020
push 0
push 0
push eax
push ebp
push ebx
push ecx
push edx
push edi
call dword [sym.imp.GDI32.dll_BitBlt]
xor ebx, ebx
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x30], ebx
call sub.gdiplus.dll_GdipCreateImageAttributes
mov ecx, dword [esp + 0x2c]
push ebx
push 0xff000000
push ebx
push ecx
mov dword [esp + 0x40], eax
call sub.gdiplus.dll_GdipSetImageAttributesWrapMode
cmp eax, ebx
je 0x40a2a3
mov dword [esp + 0x30], eax
lea edx, [esp + 0x14]
push edx
push edi
mov dword [esp + 0x1c], ebx
call sub.gdiplus.dll_GdipCreateFromHDC
mov ebp, dword [esi + 0x2dc]
mov edx, dword [ebp + 4]
lea ecx, [esp + 0x14]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x14]
push ecx
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x1c], ebx
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, ebx
je 0x40a2dd
mov dword [ebp + 8], eax
mov eax, dword [esi + 0x2dc]
mov edx, dword [eax + 4]
mov ebp, dword [esp + 0x14]
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ebx
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, ebx
je 0x40a308
mov ecx, dword [esp + 0x28]
mov dword [ecx + 8], eax
push ebx
push ebx
lea edx, [esp + 0x34]
push edx
mov edx, dword [esi + 0x2dc]
push 2
mov eax, pe_nt_image_headers32
push ebp
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x2c]
push eax
push ebx
push ebx
lea ecx, [esp + 0x6c]
push ecx
push edx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
call fcn.0040a090
mov ebx, dword [esi + 0x2f4]
mov edx, dword [esi + 0x2f0]
mov ebp, dword [esp + 0x10]
push 0xcc0020
mov ecx, ebx
sub ecx, dword [esi + 0x2e4]
mov eax, edx
sub eax, dword [esi + 0x2e0]
push ecx
push eax
push ebp
mov ebp, dword [esi + 0x2fc]
sub ebp, ecx
mov ecx, dword [esi + 0x2f8]
push ebp
sub ecx, eax
push ecx
push ebx
mov ebx, dword [sym.imp.GDI32.dll_BitBlt]
push edx
push edi
call ebx
push edi
mov ecx, esi
call fcn.00409c70
mov edx, dword [esp + 0x1c]
push 0xcc0020
push 0
push 0
push edi
push pe_nt_image_headers32
push pe_nt_image_headers32
push 0
push 0
push edx
call ebx
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
mov ecx, dword [esp + 0x10]
push ecx
call esi
mov edx, dword [esp + 0x24]
push edx
call esi
push edi
call esi
mov eax, dword [esp + 0x34]
push eax
call sub.gdiplus.dll_GdipDeleteGraphics
mov ecx, dword [esp + 0x2c]
push ecx
call sub.gdiplus.dll_GdipDisposeImageAttributes
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x4c
ret