Function at 0x40a680
Capabilities:
Capture screenshot

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x48
mov edi, dword [sym.imp.msvcrt.dll_malloc]
mov dword [esp], 0x428
call edi
mov dword [esp], 0x428
mov ebx, eax
call edi
mov dword [ebp - 0x18], eax
test esi, esi
je 0x40aadf
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov dword [esp + 4], 0x10
mov dword [esp], 0x10
call dword [sym.imp.gdi32.dll_CreateBitmap]
mov ecx, 1
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x24], eax
sub esp, 0x14
mov word [ebp - 0x2c], cx
mov eax, dword [sym.imp.gdi32.dll_CreateCompatibleDC]
mov dword [esp], 0
xor edi, edi
mov dword [ebp - 0x1c], eax
call eax
mov ecx, dword [ebp - 0x24]
sub esp, 4
mov dword [ebp - 0x10], eax
mov dword [esp], eax
mov eax, dword [sym.imp.gdi32.dll_SelectObject]
mov dword [esp + 4], ecx
mov dword [ebp - 0x30], eax
call eax
mov dword [ebp - 0x20], ebx
mov ebx, edi
mov dword [ebp - 0x28], eax
sub esp, 8
lea esi, [esi]
nop
mov esi, ebx
xor edi, edi
shl esi, 4
mov eax, esi
mov esi, edi
mov edi, eax
lea esi, [esi]
lea eax, [edi + esi]
mov dword [esp + 8], esi
add esi, 1
movzx eax, al
mov dword [esp + 4], ebx
imul eax, eax, 0x10101
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_SetPixelV]
sub esp, 0x10
cmp esi, 0x10
jne 0x40a740
add ebx, 1
cmp ebx, 0x10
jne 0x40a730
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov edx, dword [ebp - 0x30]
call edx
movzx edi, word [ebp - 0x2c]
mov eax, 1
mov dword [ebx], 0x28
sub esp, 8
mov dword [ebx + 4], 0x10
mov word [ebx + 0xe], di
mov dword [ebx + 8], 0x10
mov word [ebx + 0xc], ax
mov dword [ebx + 0x10], 0
mov dword [esp], 0
mov edi, dword [ebp - 0x1c]
call edi
mov edx, dword [sym.imp.gdi32.dll_GetDIBits]
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0
mov esi, dword [ebp - 0x24]
mov dword [esp + 4], esi
mov dword [ebp - 0x20], eax
mov dword [esp], eax
mov dword [ebp - 0x34], edx
call edx
sub esp, 0x1c
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7aa
xor eax, eax
mov dword [esp + 4], str.GetDIBits_failed_to_get_the_DIB_attributes_n
mov edx, dword [ebx + 0x14]
test edx, edx
setne al
mov dword [esp], eax
call fcn.00401820
mov edx, dword [ebx + 0x14]
mov edi, dword [sym.imp.msvcrt.dll_calloc]
mov dword [esp + 4], edx
mov dword [ebp - 0x1c], edx
mov dword [esp], 1
call edi
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov dword [esp + 4], edx
mov dword [esp], 1
call edi
mov dword [ebp - 0x2c], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], ebx
mov edi, dword [ebp - 0x28]
mov dword [esp + 4], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0
mov ecx, dword [ebp - 0x20]
mov dword [esp], ecx
mov edx, dword [ebp - 0x34]
call edx
sub esp, 0x1c
mov edi, eax
call fcn.00492bc0
mov ecx, dword [ebp - 0x14]
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7b1
xor eax, eax
cmp edi, 0x10
sete al
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], str.got__d__bpp__d__n
call fcn.00401820
mov edi, dword [ebp - 0x18]
mov eax, dword [ebx]
mov dword [edi], eax
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov eax, dword [ebx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov dword [edi + 0x14], eax
mov eax, dword [ebx + 0x18]
mov dword [edi + 0x18], eax
mov eax, dword [ebx + 0x1c]
mov dword [edi + 0x1c], eax
mov eax, dword [ebx + 0x20]
mov dword [edi + 0x20], eax
mov eax, dword [ebx + 0x24]
mov dword [edi + 0x24], eax
mov dword [esp + 4], esi
mov ecx, dword [ebp - 0x10]
mov dword [esp], ecx
mov ecx, dword [ebp - 0x30]
call ecx
sub esp, 8
mov dword [ebp - 0x38], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edi
mov edi, dword [ebp - 0x2c]
mov dword [esp + 4], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov edx, dword [ebp - 0x34]
call edx
sub esp, 0x1c
mov edi, eax
call fcn.00492bc0
mov esi, dword [ebp - 0x14]
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7bb
xor eax, eax
cmp edi, 0x10
sete al
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], str.got__d__bpp__d__n
mov dword [esp], eax
call fcn.00401820
cmp esi, 8
ja 0x40aa19
movzx ecx, byte [ebp - 0x14]
mov edi, 1
shl edi, cl
mov esi, edi
xor edi, edi
mov dword [ebp - 0x1c], esi
mov esi, dword [ebp - 0x18]
jmp 0x40a9d3
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edi
add edi, 1
mov dword [esp + 4], str.color_table_entry__d_differs__bpp__d__n
mov dword [esp + 0xc], edx
mov dword [esp], eax
call fcn.00401820
cmp dword [ebp - 0x1c], edi
je 0x40aa19
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7c1
xor eax, eax
movzx ecx, byte [esi + edi*4 + 0x2a]
cmp byte [ebx + edi*4 + 0x2a], cl
jne 0x40a9b0
movzx edx, byte [esi + edi*4 + 0x29]
cmp byte [ebx + edi*4 + 0x29], dl
jne 0x40a9b0
movzx edx, byte [esi + edi*4 + 0x28]
cmp byte [ebx + edi*4 + 0x28], dl
jne 0x40a9b0
movzx eax, byte [esi + edi*4 + 0x2b]
cmp byte [ebx + edi*4 + 0x2b], al
sete al
movzx eax, al
jmp 0x40a9b0
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7c8
mov eax, dword [ebx + 0x14]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], str.bit_mismatch__bpp__d__n
test eax, eax
sete al
mov dword [esp + 8], ecx
movzx eax, al
mov dword [esp], eax
call fcn.00401820
mov eax, dword [ebp - 0x18]
cmp word [eax + 0xe], 8
jbe 0x40ab61
mov eax, dword [ebp - 0x2c]
mov edi, dword [sym.imp.msvcrt.dll_free]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call edi
mov edx, dword [sym.imp.gdi32.dll_DeleteDC]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x14], edx
call edx
mov eax, dword [ebp - 0x38]
sub esp, 4
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x10]
mov dword [esp], esi
mov eax, dword [ebp - 0x30]
call eax
sub esp, 8
mov dword [esp], esi
mov edx, dword [ebp - 0x14]
call edx
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_DeleteObject]
mov eax, dword [ebp - 0x18]
sub esp, 4
mov dword [esp], eax
call edi
mov dword [esp], ebx
call edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0
call dword [sym.imp.user32.dll_GetDC]
mov edx, dword [sym.imp.gdi32.dll_GetDeviceCaps]
sub esp, 4
mov esi, eax
mov dword [esp + 4], 0xc
mov dword [esp], eax
mov dword [ebp - 0x10], edx
call edx
sub esp, 8
mov edi, eax
mov dword [esp + 4], 0xe
mov dword [esp], esi
mov edx, dword [ebp - 0x10]
call edx
imul edi, eax
sub esp, 8
mov dword [ebp - 0x14], edi
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0x10
mov dword [esp], esi
call dword [sym.imp.gdi32.dll_CreateCompatibleBitmap]
sub esp, 0xc
mov dword [ebp - 0x24], eax
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.user32.dll_ReleaseDC]
mov word [ebp - 0x2c], di
sub esp, 8
jmp 0x40a6f3
mov dword [esp + 0x18], 1
mov eax, dword [ebp - 0x18]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [ebp - 0x34]
call eax
sub esp, 0x1c
mov edi, eax
mov eax, 0x7d1
call fcn.00401020
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], edi
mov dword [esp + 4], str.got__d__bpp__d__n
mov dword [esp + 0xc], eax
xor eax, eax
cmp edi, 1
sete al
mov dword [esp], eax
call fcn.00401820
movzx ecx, word [ebx + 0xe]
mov eax, 1
shl eax, cl
test eax, eax
je 0x40aa71
xor edi, edi
mov esi, 1
call fcn.00492bc0
mov dword [eax], 0x499014
mov dword [eax + 4], 0x7d4
mov eax, dword [ebp - 0x14]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x18]
movzx eax, word [eax + edi*2 + 0x28]
mov dword [esp + 8], edi
mov dword [esp + 4], str._d:_got__d__bpp__d__n
cmp eax, edi
mov dword [esp + 0xc], eax
sete al
add edi, 1
movzx eax, al
mov dword [esp], eax
call fcn.00401820
movzx ecx, word [ebx + 0xe]
mov eax, esi
shl eax, cl
cmp edi, eax
jb 0x40abe6
jmp 0x40aa71