Function at 0x479af0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov eax, dword [0x62dc50]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0xc], 0
push 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov esi, eax
push 0xe
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
imul esi, eax
mov dword [ebp - 0x7c], esi
cmp dword [ebp - 0x7c], 1
jg 0x479b48
mov ecx, 1
mov word [ebp - 0x34], cx
jmp 0x479b8a
cmp dword [ebp - 0x7c], 4
jg 0x479b59
mov edx, 4
mov word [ebp - 0x34], dx
jmp 0x479b8a
cmp dword [ebp - 0x7c], 8
jg 0x479b6a
mov eax, 8
mov word [ebp - 0x34], ax
jmp 0x479b8a
cmp dword [ebp - 0x7c], 0x18
jg 0x479b7b
mov ecx, 0x18
mov word [ebp - 0x34], cx
jmp 0x479b8a
cmp dword [ebp - 0x7c], 0x20
jg 0x479b8a
mov edx, 0x20
mov word [ebp - 0x34], dx
movzx eax, word [ebp - 0x34]
cmp eax, 8
jg 0x479ba4
movzx ecx, word [ebp - 0x34]
mov edx, 1
shl edx, cl
shl edx, 2
mov dword [ebp - 0x30], edx
lea eax, [ebp - 0x78]
push eax
push 0x18
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
call dword [sym.imp.GDI32.dll_GetObjectA]
mov dword [ebp - 0x60], 0x28
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x58], ecx
mov edx, 1
mov word [ebp - 0x54], dx
mov ax, word [ebp - 0x34]
mov word [ebp - 0x52], ax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
movzx ecx, word [ebp - 0x34]
mov eax, ecx
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 edx, dword [ebp - 0x30]
mov eax, dword [ebp - 4]
lea ecx, [eax + edx + 0x28]
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x24], eax
mov ecx, 0xa
lea esi, [ebp - 0x60]
mov edi, dword [ebp - 0x24]
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 0x479c86
push 0
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x24]
lea edx, [ecx + eax + 0x28]
push edx
mov eax, dword [ebp - 0x70]
push eax
push 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_GetDIBits]
cmp dword [ebp - 0xc], 0
je 0x479cd3
push 1
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x479cfa
jmp 0x479d77
mov edx, 0x4d42
mov word [ebp - 0x20], dx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x30]
lea edx, [ecx + eax + 0x36]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1e], eax
xor ecx, ecx
mov word [ebp - 0x1a], cx
xor edx, edx
mov word [ebp - 0x18], dx
mov eax, dword [ebp - 0x30]
add eax, 0x36
mov dword [ebp - 0x16], eax
push 0
lea ecx, [ebp - 0x80]
push ecx
push 0xe
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x80]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00587964
mov esp, ebp
pop ebp
ret