Function at 0x407569
Capabilities:
Write file on windows

Disassembly:
push 0x4c
mov eax, 0x57856c
call fcn.0054d2bd
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], eax
call dword [sym.imp.GDI32.dll_GdiFlush]
lea eax, [ebp - 0x50]
push eax
push 0x18
pop edi
push edi
push esi
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
jne 0x4075c4
push str.Error_calling_GetObject__
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x30
push ebx
call fcn.0040fe74
add esp, 0x10
xor al, al
jmp 0x40785c
movzx ecx, word [ebp - 0x3e]
xor edx, edx
movzx eax, word [ebp - 0x40]
inc edx
imul ecx, eax
cmp ecx, edx
jne 0x4075da
mov edi, edx
jmp 0x407600
cmp ecx, 4
ja 0x4075e3
push 4
jmp 0x4075f3
cmp ecx, 8
ja 0x4075ec
push 8
jmp 0x4075f3
cmp ecx, 0x10
ja 0x4075f6
push 0x10
pop edi
jmp 0x407600
cmp edi, ecx
sbb edi, edi
and edi, 8
add edi, 0x18
mov eax, edx
mov ecx, edi
shl eax, cl
cmp edi, 0x10
sbb ecx, ecx
and ecx, eax
mov dword [ebp - 0x34], ecx
lea eax, [ecx*4 + 0x28]
push eax
push edx
call fcn.00560a96
pop ecx
mov esi, eax
pop ecx
mov dword [ebp - 0x54], esi
mov dword [esi], 0x28
xor ebx, ebx
mov eax, dword [ebp - 0x4c]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x4c]
mov dword [esi + 8], eax
xor eax, eax
mov edx, dword [ebp - 0x48]
inc eax
mov word [esi + 0xc], ax
mov eax, dword [ebp - 0x3e]
imul eax, dword [ebp - 0x40]
mov dword [ebp - 4], ebx
mov word [esi + 0xe], ax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x20], eax
cmp edi, 4
je 0x40766c
xor eax, eax
cmp edi, 8
sete al
mov dword [esi + 0x10], eax
jmp 0x407673
mov dword [esi + 0x10], 2
imul ecx, edi
push ebx
push esi
push ebx
add ecx, 0x1f
shr ecx, 3
and ecx, 0x1ffffffc
imul ecx, edx
mov dword [esi + 0x14], ecx
mov dword [esi + 0x24], ebx
movzx eax, word [esi + 8]
push eax
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x4076c2
push str.Error_calling_GetDIBits_1_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x30
push dword [ebp - 0x24]
call fcn.0040fe74
add esp, 0x10
jmp 0x407853
push dword [esi + 0x14]
call fcn.00560bfe
mov edi, eax
pop ecx
mov dword [ebp - 0x58], edi
xor eax, eax
inc eax
mov byte [ebp - 4], al
test edi, edi
jne 0x4076f1
push dword [esi + 0x14]
push str.Out_of_memory_allocating_bitmap___d_bytes_
push 0x30
push dword [ebp - 0x24]
call fcn.0040fe1f
jmp 0x407842
movzx eax, word [esi + 8]
push ebx
push esi
push edi
push eax
push ebx
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
call dword [sym.imp.GDI32.dll_GetDIBits]
test eax, eax
jne 0x407714
push str.Error_calling_GetDIBits_2_
jmp 0x407831
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x30]
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [ebp - 0x28], edx
cmp edx, 0xffffffff
jne 0x4077ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x407784
cmp dword [ebp - 0x2c], 8
jae 0x40777c
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc dword [ebp - 0x2c]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edx, eax
mov dword [ebp - 0x28], edx
cmp edx, 0xffffffff
je 0x407739
jmp 0x40777f
mov edx, dword [ebp - 0x28]
cmp edx, 0xffffffff
jne 0x4077ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040db42
push eax
push dword [ebp - 0x30]
push str.Error_creating_the_output_bitmap_file_n___s:_n_s_n_nPlease_ensure_the_path_exists_and_you_have_permission_to_write_it._n_nYou_can_select_a_different_output_path_for_the_bitmap_using_the_BitmapLocation_menu_item.
push 0x30
push dword [ebp - 0x24]
call fcn.0040fe1f
add esp, 0x18
jmp 0x40784c
mov ecx, dword [ebp - 0x34]
mov eax, 0x4d42
mov word [ebp - 0x20], ax
mov eax, dword [esi]
push ebx
lea ecx, [eax + ecx*4]
lea eax, [ecx + 0xe]
add ecx, 0xe
mov dword [ebp - 0x16], eax
mov eax, dword [esi + 0x14]
add eax, ecx
mov dword [ebp - 0x1e], eax
xor eax, eax
mov dword [ebp - 0x1a], eax
lea eax, [ebp - 0x38]
push eax
push 0xe
lea eax, [ebp - 0x20]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4077ef
push str.Error_during_WriteFile__
jmp 0x407831
push ebx
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x16]
add eax, 0xfffffff2
push eax
push esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4077e8
push ebx
lea eax, [ebp - 0x38]
push eax
push dword [esi + 0x14]
push edi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4077e8
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x407847
push str.Error_during_CloseHandle__
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x30
push dword [ebp - 0x24]
call fcn.0040fe74
add esp, 0x10
jmp 0x40784c
xor eax, eax
lea ebx, [eax + 1]
push edi
call fcn.00560aa1
pop ecx
push esi
call fcn.00560aa1
pop ecx
mov al, bl
call fcn.0054d26c
ret