Function at 0x4d9980
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
sub esp, 0x2c
push ecx
push edi
lea edi, [esp + 8]
mov eax, 0xcccccccc
mov ecx, 0xb
rep stosd dword es:[edi], eax
pop edi
pop ecx
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x40], 0
jne 0x4d99af
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x30], 0x12c
jne 0x4d99d8
mov eax, dword [ebp - 0x30]
push dword [eax + 0x34]
call dword [sym.imp.GDI32.dll_CloseMetaFile]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x34]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4d9bcd
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x30], 0x12d
jne 0x4d9a01
mov eax, dword [ebp - 0x30]
push dword [eax + 0x34]
call dword [sym.imp.GDI32.dll_CloseEnhMetaFile]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x34]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x4d9bcd
mov eax, dword [ebp - 0x30]
cmp dword [eax + 0x30], 0x15e
je 0x4d9a2d
push 0
push str.kPictBMP__mFormat
push 0x97a
push str.FolderItemImpWin32.cpp
push 4
push 0x83
call fcn.00495150
add esp, 0x18
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x3c]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x1c]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4d9a54
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x40], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x24], 0xe
mov dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
movzx edx, word [eax + 0xe]
dec edx
cmp edx, 7
ja case.0x4d9a7b.3
jmp dword [edx*4 + 0x544884]
mov dword [ebp - 0x28], 8
jmp case.0x4d9a7b.3
mov dword [ebp - 0x28], 0x10
jmp case.0x4d9a7b.3
mov dword [ebp - 0x28], 0x40
jmp case.0x4d9a7b.3
mov dword [ebp - 0x28], 0x400
mov word [ebp - 0x14], 0x4d42
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
add edx, dword [eax]
add edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
add edx, dword [eax + 0x14]
mov dword [ebp - 0x12], edx
mov word [ebp - 0xe], 0
mov word [ebp - 0xc], 0
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x20]
add edx, dword [eax]
add edx, dword [ebp - 0x28]
mov dword [ebp - 0xa], edx
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x3c]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x44]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x3c]
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi + 0x48]
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x1c], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x30]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0
jne 0x4d9b35
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x40], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x2c], eax
je 0x4d9b4c
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x40], 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 - 0x2c], edx
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0
jne 0x4d9b81
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x40], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x2c], eax
je 0x4d9b98
mov eax, dword [ebp - 0x30]
mov byte [eax + 0x40], 0
mov al, 0
lea esp, [ebp - 4]
pop esi
pop ebp
ret
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 0x30]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x3c]
cmp edx, 0
je 0x4d9bcd
push 1
mov edx, edx
mov ecx, edx
mov esi, dword [ecx]
mov ecx, edx
call dword [esi]
mov eax, dword [ebp - 0x30]
mov al, byte [eax + 0x40]
lea esp, [ebp - 4]
pop esi
pop ebp
ret