Function at 0x4073e0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x4c
mov eax, dword [0x5d9000]
xor eax, esp
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x50]
push ebx
push ebp
push esi
push edi
push 0
push 0
push 0
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x70]
push str.DISPLAY
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], 0
call dword [sym.imp.GDI32.dll_CreateDCW]
mov esi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebp, eax
push 0xe
push ebp
call esi
push 0xc
push ebp
mov edi, eax
call esi
push ebp
imul edi, eax
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, 1
cmp edi, eax
jg 0x407456
mov ebx, eax
movzx ecx, bx
shl eax, cl
shl eax, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4074b0
cmp edi, 4
jg 0x407472
mov ebx, 4
movzx ecx, bx
shl eax, cl
shl eax, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4074b0
cmp edi, 8
jg 0x40748e
mov ebx, 8
movzx ecx, bx
shl eax, cl
shl eax, 2
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
jmp 0x4074b0
cmp edi, 0x10
jg 0x40749a
mov ebx, 0x10
jmp 0x4074a9
xor ebx, ebx
cmp edi, 0x18
setg bl
lea ebx, [ebx*8 + 0x18]
movzx eax, bx
mov dword [esp + 0x10], eax
lea eax, [esp + 0x2c]
push eax
push 0x18
push dword [esp + 0x20]
call dword [sym.imp.GDI32.dll_GetObjectW]
mov esi, dword [esp + 0x30]
mov eax, esi
imul eax, dword [esp + 0x10]
mov edi, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
imul eax, edi
lea eax, [ecx + eax*4]
mov dword [esp + 0x20], eax
add eax, 0x28
push eax
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, 1
mov dword [esp + 0x10], eax
push 0xf
mov dword [eax], 0x28
mov dword [eax + 4], esi
mov dword [eax + 8], edi
mov word [eax + 0xc], cx
mov word [eax + 0xe], bx
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 0
mov dword [eax + 0x20], 0
mov dword [eax + 0x24], 0
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, dword [sym.imp.GDI32.dll_SelectPalette]
mov esi, eax
test esi, esi
je 0x407577
push 0
call dword [sym.imp.USER32.dll_GetDC]
push 0
mov ebp, eax
push esi
push ebp
call edi
push ebp
mov esi, eax
call dword [sym.imp.GDI32.dll_RealizePalette]
jmp 0x407579
xor esi, esi
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
push 0
push eax
lea ecx, [eax + 0x28]
add ecx, ebx
push ecx
push dword [esp + 0x40]
push 0
push dword [esp + 0x2c]
push ebp
call dword [sym.imp.GDI32.dll_GetDIBits]
test esi, esi
je 0x4075b5
push 1
push esi
push ebp
call edi
push ebp
call dword [sym.imp.GDI32.dll_RealizePalette]
push ebp
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x407639
mov edi, dword [esp + 0x20]
mov eax, 0x4d42
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
add edi, 0x36
mov word [esp + 0x44], ax
xor eax, eax
mov dword [esp + 0x4a], eax
lea eax, [ebx + 0x36]
push 0
mov dword [esp + 0x52], eax
lea eax, [esp + 0x28]
push eax
push 0xe
lea eax, [esp + 0x50]
mov dword [esp + 0x52], edi
push eax
push ebp
call esi
push 0
lea eax, [esp + 0x28]
push eax
push edi
push dword [esp + 0x1c]
push ebp
call esi
mov esi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x54]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00554301
add esp, 0x4c
ret 8