Function at 0x4051c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push str.display
mov dword [esp + 0x28], edi
call dword [sym.imp.GDI32.dll_CreateDCA]
mov ebp, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
push 0xe
push ebx
mov dword [esp + 0x1c], ebx
call ebp
push 0xc
push ebx
mov esi, eax
call ebp
imul esi, eax
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp esi, 1
mov ebx, 1
jle 0x40520c
mov ebx, 4
mov esi, ebx
mov ebp, 1
and esi, 0xffff
lea eax, [esp + 0x34]
mov ecx, esi
push eax
shl ebp, cl
mov ecx, dword [esp + 0x7c]
push 0x18
push ecx
shl ebp, 2
call dword [sym.imp.GDI32.dll_GetObjectA]
mov edx, dword [esp + 0x38]
mov eax, esi
imul eax, edx
add eax, 0x1f
mov dword [esp + 0x50], edx
cdq
mov ecx, dword [esp + 0x3c]
and edx, 0x1f
add eax, edx
mov word [esp + 0x5a], bx
mov ebx, eax
mov dword [esp + 0x4c], 0x28
sar ebx, 5
imul ebx, ecx
shl ebx, 2
mov dword [esp + 0x54], ecx
mov word [esp + 0x58], 1
lea edx, [ebx + ebp + 0x28]
mov dword [esp + 0x5c], edi
push edx
push 0x42
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, 0xa
lea esi, [esp + 0x4c]
mov edi, eax
push 0xf
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x14], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov edi, eax
test edi, edi
je 0x4052dd
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
mov edi, eax
call dword [sym.imp.GDI32.dll_RealizePalette]
jmp 0x4052e5
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x78]
push 0
push eax
lea eax, [eax + ebp + 0x28]
push eax
push ecx
push 0
push edx
push esi
call dword [sym.imp.GDI32.dll_GetDIBits]
test edi, edi
je 0x405322
push 1
push edi
push esi
call dword [sym.imp.GDI32.dll_SelectPalette]
push esi
call dword [sym.imp.GDI32.dll_RealizePalette]
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, dword [esp + 0x7c]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x405352
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret 8
xor edi, edi
lea ecx, [esp + 0x1c]
lea ebx, [ebx + ebp + 0x36]
push edi
add ebp, 0x36
push ecx
lea edx, [esp + 0x2c]
push 0xe
mov dword [esp + 0x3a], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
push edx
push esi
mov word [esp + 0x38], 0x4d42
mov dword [esp + 0x3a], ebx
mov word [esp + 0x3e], di
mov word [esp + 0x40], di
call ebp
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push edi
push eax
push ebx
push ecx
push esi
call ebp
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret 8