Function at 0x401550
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0xf8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x90], rcx
mov qword [rbp + 0x98], rdx
mov dword [rbp + 0x54], 0
mov dword [rbp + 0x50], 0
mov dword [rbp + 0x4c], 0
mov dword [rbp + 0x24], 0
mov qword [rbp + 0x58], 0
mov r9d, 0
mov r8d, 0
mov edx, 0
lea rcx, str.DISPLAY
mov rax, qword [sym.imp.GDI32.dll_CreateDCA]
call rax
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x68]
mov edx, 0xc
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_GetDeviceCaps]
call rax
mov ebx, eax
mov rax, qword [rbp + 0x68]
mov edx, 0xe
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_GetDeviceCaps]
call rax
imul eax, ebx
mov dword [rbp + 0x48], eax
mov rax, qword [rbp + 0x68]
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_DeleteDC]
call rax
cmp dword [rbp + 0x48], 1
jg 0x401608
mov word [rbp + 0x66], 1
jmp 0x40162a
cmp dword [rbp + 0x48], 4
jg 0x401616
mov word [rbp + 0x66], 4
jmp 0x40162a
cmp dword [rbp + 0x48], 8
jg 0x401624
mov word [rbp + 0x66], 8
jmp 0x40162a
mov word [rbp + 0x66], 0x18
mov rax, rbp
mov r8, rax
mov edx, 0x20
mov rcx, qword [rbp + 0x90]
mov rax, qword [sym.imp.GDI32.dll_GetObjectA]
call rax
mov dword [rbp - 0x40], 0x28
mov eax, dword [rbp + 4]
mov dword [rbp - 0x3c], eax
mov eax, dword [rbp + 8]
neg eax
mov dword [rbp - 0x38], eax
mov word [rbp - 0x34], 1
movzx eax, word [rbp + 0x66]
mov word [rbp - 0x32], ax
mov dword [rbp - 0x30], 0
mov dword [rbp - 0x2c], 0
mov dword [rbp - 0x28], 0
mov dword [rbp - 0x24], 0
mov dword [rbp - 0x1c], 0
mov dword [rbp - 0x20], 0x100
mov edx, dword [rbp + 4]
movzx eax, word [rbp + 0x66]
imul eax, edx
add eax, 0x1f
and eax, 0xffffffe0
lea edx, [rax + 7]
test eax, eax
cmovs eax, edx
sar eax, 3
mov edx, eax
mov eax, dword [rbp + 8]
imul eax, edx
mov dword [rbp + 0x50], eax
mov edx, dword [rbp + 0x50]
mov eax, dword [rbp + 0x54]
add eax, edx
mov eax, eax
add rax, 0x28
mov rdx, rax
mov ecx, 0x42
mov rax, qword [sym.imp.KERNEL32.dll_GlobalAlloc]
call rax
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalLock]
call rax
mov qword [rbp + 0x38], rax
mov rax, qword [rbp + 0x38]
mov rdx, qword [rbp - 0x40]
mov qword [rax], rdx
mov rdx, qword [rbp - 0x38]
mov qword [rax + 8], rdx
mov rdx, qword [rbp - 0x30]
mov qword [rax + 0x10], rdx
mov rdx, qword [rbp - 0x28]
mov qword [rax + 0x18], rdx
mov rdx, qword [rbp - 0x20]
mov qword [rax + 0x20], rdx
mov ecx, 0xf
mov rax, qword [sym.imp.GDI32.dll_GetStockObject]
call rax
mov qword [rbp + 0x30], rax
cmp qword [rbp + 0x30], 0
je 0x401773
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_GetDC]
call rax
mov qword [rbp + 0x68], rax
mov rdx, qword [rbp + 0x30]
mov rax, qword [rbp + 0x68]
mov r8d, 0
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_SelectPalette]
call rax
mov qword [rbp + 0x58], rax
mov rax, qword [rbp + 0x68]
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_RealizePalette]
call rax
mov eax, dword [rbp + 0x54]
lea rdx, [rax + 0x28]
mov rax, qword [rbp + 0x38]
add rdx, rax
mov eax, dword [rbp + 8]
mov r8d, eax
mov rax, qword [rbp + 0x68]
mov dword [rsp + 0x30], 0
mov rcx, qword [rbp + 0x38]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rdx
mov r9d, r8d
mov r8d, 0
mov rdx, qword [rbp + 0x90]
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_GetDIBits]
call rax
cmp qword [rbp + 0x58], 0
je 0x401803
mov rdx, qword [rbp + 0x58]
mov rax, qword [rbp + 0x68]
mov r8d, 1
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_SelectPalette]
call rax
mov rax, qword [rbp + 0x68]
mov rcx, rax
mov rax, qword [sym.imp.GDI32.dll_RealizePalette]
call rax
mov rax, qword [rbp + 0x68]
mov rdx, rax
mov ecx, 0
mov rax, qword [sym.imp.USER32.dll_ReleaseDC]
call rax
mov rax, qword [rbp + 0x98]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 2
mov r9d, 0
mov r8d, 0
mov edx, 0x40000000
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0xffffffffffffffff
jne 0x401855
mov eax, 0
jmp 0x40190b
mov word [rbp - 0xe], 0x4d42
mov edx, dword [rbp + 0x54]
mov eax, dword [rbp + 0x50]
add eax, edx
add eax, 0x36
mov dword [rbp + 0x4c], eax
mov eax, dword [rbp + 0x4c]
mov dword [rbp - 0xc], eax
mov word [rbp - 8], 0
mov word [rbp - 6], 0
mov eax, dword [rbp + 0x54]
add eax, 0x36
mov dword [rbp - 4], eax
lea rdx, [rbp + 0x24]
lea rax, [rbp - 0xe]
mov rcx, qword [rbp + 0x28]
mov qword [rsp + 0x20], 0
mov r9, rdx
mov r8d, 0xe
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
lea rcx, [rbp + 0x24]
mov r8d, dword [rbp + 0x4c]
mov rdx, qword [rbp + 0x38]
mov rax, qword [rbp + 0x28]
mov qword [rsp + 0x20], 0
mov r9, rcx
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_WriteFile]
call rax
mov rax, qword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalUnlock]
call rax
mov rax, qword [rbp + 0x40]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GlobalFree]
call rax
mov rax, qword [rbp + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CloseHandle]
call rax
mov eax, 1
add rsp, 0xf8
pop rbx
pop rbp
ret