Function at 0x409f30
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 + 0x20], edi
mov dword [esp + 0x28], edi
call dword [sym.imp.GDI32.dll_CreateDCA]
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebp, eax
push 0xe
push ebp
call ebx
push 0xc
push ebp
mov esi, eax
call ebx
imul esi, eax
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp esi, 1
jg 0x409f79
mov ebx, 1
jmp 0x409fa7
cmp esi, 4
jg 0x409f85
mov ebx, 4
jmp 0x409fa7
cmp esi, 8
jg 0x409f91
mov ebx, 8
jmp 0x409fa7
cmp esi, 0x20
jg 0x409f9d
mov ebx, 0x18
jmp 0x409fb7
mov ebx, dword [esp + 0x78]
cmp bx, 8
ja 0x409fb7
mov eax, 1
mov cl, bl
shl eax, cl
shl eax, 2
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x78]
lea eax, [esp + 0x34]
push eax
push 0x18
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov ecx, dword [esp + 0x38]
mov eax, ebx
and eax, 0xffff
mov esi, dword [esp + 0x3c]
imul eax, ecx
add eax, 0x1f
mov word [esp + 0x5a], bx
cdq
and edx, 0x1f
mov dword [esp + 0x4c], 0x28
add eax, edx
mov edx, dword [esp + 0x10]
mov ebx, eax
mov dword [esp + 0x50], ecx
sar ebx, 5
imul ebx, esi
shl ebx, 2
mov dword [esp + 0x54], esi
mov word [esp + 0x58], 1
lea eax, [ebx + edx + 0x28]
mov dword [esp + 0x5c], edi
push eax
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 + 0x18], eax
call dword [sym.imp.GDI32.dll_GetStockObject]
mov esi, eax
test esi, esi
je 0x40a07d
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, eax
push 0
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebp
mov esi, eax
call dword [sym.imp.GDI32.dll_RealizePalette]
jmp 0x40a081
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
push 0
lea ecx, [eax + edi + 0x28]
push eax
mov eax, dword [esp + 0x80]
push ecx
push edx
push 0
push eax
push ebp
call dword [sym.imp.GDI32.dll_GetDIBits]
test esi, esi
je 0x40a0c5
push 1
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectPalette]
push ebp
call dword [sym.imp.GDI32.dll_RealizePalette]
push ebp
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, dword [esp + 0x7c]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a0f3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x64
ret
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
lea edx, [esp + 0x1c]
mov word [esp + 0x2a], ax
mov word [esp + 0x2c], ax
push eax
push edx
lea eax, [esp + 0x2c]
lea ebx, [ebx + edi + 0x36]
push 0xe
add edi, 0x36
push eax
push esi
mov word [esp + 0x38], 0x4d42
mov dword [esp + 0x3a], ebx
mov dword [esp + 0x42], edi
call ebp
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push 0
push ecx
push ebx
push edx
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