Function at 0x4ef580
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x34
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 0xd
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
cmp byte [eax + 0x48], 0
jne 0x4ef5af
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x38], 0x12c
jne 0x4ef5d8
mov eax, dword [ebp - 0x38]
push dword [eax + 0x3c]
call dword [sym.imp.GDI32.dll_CloseMetaFile]
mov eax, dword [ebp - 0x38]
push dword [eax + 0x3c]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4ef81f
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x38], 0x12d
jne 0x4ef601
mov eax, dword [ebp - 0x38]
push dword [eax + 0x3c]
call dword [sym.imp.GDI32.dll_CloseEnhMetaFile]
mov eax, dword [ebp - 0x38]
push dword [eax + 0x3c]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4ef81f
mov eax, dword [ebp - 0x38]
cmp dword [eax + 0x38], 0x15e
je 0x4ef62d
push 0
push str.kPictBMP__mFormat
push 0x9fb
push str.FolderItemImpWin32.cpp
push 4
push 0x83
call fcn.004a4f70
add esp, 0x18
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0x44]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x20]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x4ef654
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x48], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], 0xe
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x28]
movzx edx, word [eax + 0xe]
dec edx
cmp edx, 7
ja case.0x4ef67b.3
jmp dword [edx*4 + 0x595be4]
mov dword [ebp - 0x30], 8
jmp case.0x4ef67b.3
mov dword [ebp - 0x30], 0x10
jmp case.0x4ef67b.3
mov dword [ebp - 0x30], 0x40
jmp case.0x4ef67b.3
mov dword [ebp - 0x30], 0x400
mov word [ebp - 0x14], 0x4d42
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
add edx, dword [eax]
add edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
add edx, dword [eax + 0x14]
mov dword [ebp - 0x12], edx
mov word [ebp - 0xe], 0
mov word [ebp - 0xc], 0
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
add edx, dword [eax]
add edx, dword [ebp - 0x30]
mov dword [ebp - 0xa], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0x44]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x48]
mov dword [ebp - 0x20], eax
fild dword [ebp - 0x20]
fmul qword [0x5f6960]
fnstcw word [ebp - 0x1a]
mov cx, word [ebp - 0x1a]
or word [ebp - 0x1a], 0xc00
fldcw word [ebp - 0x1a]
fistp dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov word [ebp - 0x1a], cx
fldcw word [ebp - 0x1a]
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x18], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0x44]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x4c]
mov dword [ebp - 0x20], eax
fild dword [ebp - 0x20]
fmul qword [0x5f6960]
fnstcw word [ebp - 0x1a]
mov cx, word [ebp - 0x1a]
or word [ebp - 0x1a], 0xc00
fldcw word [ebp - 0x1a]
fistp dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov word [ebp - 0x1a], cx
fldcw word [ebp - 0x1a]
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x34]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x38]
push dword [eax + 0x40]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0
jne 0x4ef787
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x48], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x34], eax
je 0x4ef79e
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x48], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov edx, dword [ebp - 0x12]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 0x34], edx
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x28]
mov eax, dword [ebp - 0x38]
push dword [eax + 0x40]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0
jne 0x4ef7d3
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x48], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x34], eax
je 0x4ef7ea
mov eax, dword [ebp - 0x38]
mov byte [eax + 0x48], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x38]
push dword [eax + 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x38]
mov edx, dword [eax + 0x44]
cmp edx, 0
je 0x4ef81f
push 1
mov edx, edx
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi]
mov eax, dword [ebp - 0x38]
mov al, byte [eax + 0x48]
lea esp, [ebp - 4]
pop esi
pop ebp
ret