Function at 0x10005d00
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push esi
push edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x80], 0
mov dword [ebp - 0xc], 0
push 0
push 0
push 0
push 0x100087d8
call dword [sym.imp.GDI32.dll_CreateDCA]
mov dword [ebp - 0x24], eax
push 0xc
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov esi, eax
push 0xe
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
imul esi, eax
mov dword [ebp - 0x7c], esi
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_DeleteDC]
cmp dword [ebp - 0x7c], 1
jg 0x10005d7a
mov word [ebp - 0x34], 1
jmp 0x10005d9c
cmp dword [ebp - 0x7c], 4
jg 0x10005d88
mov word [ebp - 0x34], 4
jmp 0x10005d9c
cmp dword [ebp - 0x7c], 8
jg 0x10005d96
mov word [ebp - 0x34], 8
jmp 0x10005d9c
mov word [ebp - 0x34], 0x18
lea eax, [ebp - 0x78]
push eax
push 0x18
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov dword [ebp - 0x60], 0x28
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x58], eax
mov word [ebp - 0x54], 1
mov cx, word [ebp - 0x34]
mov word [ebp - 0x52], cx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
movzx edx, word [ebp - 0x34]
mov eax, edx
imul eax, dword [ebp - 0x74]
add eax, 0x1f
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
shl eax, 2
imul eax, dword [ebp - 0x70]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax + 0x28]
push edx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
mov ecx, 0xa
lea esi, [ebp - 0x60]
mov edi, dword [ebp - 0x20]
rep movsd dword es:[edi], dword [esi]
push 0xf
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x10005e80
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x24], eax
push 0
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x20]
lea ecx, [eax + edx + 0x28]
push ecx
mov edx, dword [ebp - 0x70]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_GetDIBits]
cmp dword [ebp - 0xc], 0
je 0x10005ed1
push 1
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.GDI32.dll_SelectPalette]
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.GDI32.dll_RealizePalette]
mov edx, dword [ebp - 0x24]
push edx
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x10005efd
xor eax, eax
jmp 0x10005f88
mov word [ebp - 0x1c], 0x4d42
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x30]
lea eax, [edx + ecx + 0x36]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x1a], ecx
mov word [ebp - 0x16], 0
mov word [ebp - 0x14], 0
mov edx, dword [ebp - 0x30]
add edx, 0x36
mov dword [ebp - 0x12], edx
push 0
lea eax, [ebp - 0x80]
push eax
push 0xe
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x80]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.10004ad0
add esp, 4
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret