Function at 0x47b7e0
Capabilities:
Delete file
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov eax, 0x1244
mov ebp, esp
push edi
push esi
push ebx
call fcn.00494110
mov esi, dword fs:[0x18]
sub esp, eax
lea ebx, [ebp - 0x1214]
mov dword [esp + 4], ebx
mov dword [esp], 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
lea eax, [ebp - 0x1110]
sub esp, 8
mov dword [esp], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4baaec
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
lea eax, [ebp - 0x1110]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_CreateMetaFileA]
sub esp, 4
mov dword [ebp - 0x1224], eax
mov edi, eax
mov eax, 0xe13
call fcn.00472290
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.CreateMetaFileA_NULL__error__ld_n
mov dword [esp + 8], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp], eax
call fcn.00472ba0
lea eax, [ebp - 0x1110]
mov dword [esp + 0x18], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [ebp - 0x122c], eax
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0xe17
call fcn.00472290
mov edx, dword [esi + 0x34]
xor eax, eax
cmp ebx, 0xffffffff
je 0x47c0f8
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.CreateFile_returned:__p__lu_n
mov edi, dword fs:[0x18]
call fcn.00472ba0
lea eax, [ebp - 0x1110]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x122c]
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0xe1c
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFile_failed:__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00472ba0
mov esi, dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [esp], ebx
mov dword [esp + 4], 0
call esi
sub esp, 8
mov dword [ebp - 0x1220], eax
mov eax, 0xe1f
call fcn.00472290
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], str.size___lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov edx, dword [sym.imp.gdi32.dll_MoveToEx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
mov dword [ebp - 0x1230], edx
call edx
sub esp, 0x10
mov dword [ebp - 0x1228], eax
mov eax, 0xe22
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.MoveToEx_error__ld._n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x1228]
mov dword [esp], ecx
call fcn.00472ba0
mov dword [esp + 8], 2
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_LineTo]
sub esp, 0xc
mov dword [ebp - 0x1228], eax
mov eax, 0xe24
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.LineTo_error__ld._n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x1228]
mov dword [esp], ecx
call fcn.00472ba0
lea ecx, [ebp - 0x121c]
mov dword [esp + 8], 1
mov dword [esp + 0xc], ecx
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
mov edx, dword [ebp - 0x1230]
call edx
sub esp, 0x10
mov dword [ebp - 0x1228], eax
mov eax, 0xe26
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.MoveToEx_error__ld._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x1228]
mov dword [esp], edx
call fcn.00472ba0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_Ellipse]
sub esp, 0x14
mov dword [ebp - 0x1228], eax
mov eax, 0xe28
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Ellipse_error__ld._n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x1228]
mov dword [esp], edx
call fcn.00472ba0
lea ecx, [ebp - 0x121c]
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
call dword [sym.imp.gdi32.dll_GetCurrentPositionEx]
sub esp, 8
mov dword [ebp - 0x1228], eax
mov eax, 0xe2b
call fcn.00472290
mov dword [esp + 4], str.GetCurrentPositionEx_succeeded_n
xor eax, eax
mov edx, dword [ebp - 0x1228]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00472ba0
mov dword [esp], ebx
mov dword [esp + 4], 0
call esi
sub esp, 8
mov dword [ebp - 0x1220], eax
mov eax, 0xe2e
call fcn.00472290
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], str.size___lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov ecx, dword [sym.imp.gdi32.dll_CloseMetaFile]
mov eax, dword [ebp - 0x1224]
mov dword [esp], eax
mov dword [ebp - 0x1234], ecx
call ecx
sub esp, 4
mov dword [ebp - 0x1228], eax
mov dword [esp], ebx
mov dword [esp + 4], 0
call esi
sub esp, 8
mov dword [ebp - 0x1220], eax
mov eax, 0xe32
call fcn.00472290
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], str.size___lu_n
cmp eax, 0x44
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov ecx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], ebx
mov dword [ebp - 0x1230], ecx
call ecx
lea ecx, [ebp - 0x1110]
sub esp, 4
mov dword [esp], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x40000000
mov eax, dword [ebp - 0x122c]
call eax
mov esi, dword [0x5b41f0]
sub esp, 0x1c
mov ebx, eax
call fcn.00492bc0
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test esi, esi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x47bcb0
mov dword [esp + 0xc], edx
mov dword [esp], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.CreateFile_returned:__p__lu_n
call fcn.00472ba0
call fcn.00492bc0
shr dword [eax + 0x10], 1
call fcn.00492bc0
mov esi, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test esi, esi
je 0x47bcf0
call fcn.00492bc0
mov dword [eax], 0x4b8dcc
mov dword [eax + 4], 0xe38
xor eax, eax
mov edx, dword [edi + 0x34]
cmp ebx, 0xffffffff
jne 0x47bc90
xor eax, eax
cmp edx, 0x20
sete al
jmp 0x47bc90
cmp ebx, 0xffffffff
je 0x47bd03
mov dword [esp], ebx
mov eax, dword [ebp - 0x1230]
call eax
sub esp, 4
lea eax, [ebp - 0x1110]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], eax
mov eax, dword [ebp - 0x122c]
call eax
sub esp, 0x1c
mov ebx, eax
mov eax, 0xe3d
call fcn.00472290
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x122c], ecx
mov dword [esp + 4], str.CreateFile_failed:__lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00472ba0
lea edx, [ebp - 0x100c]
mov dword [esp], ebx
lea eax, [ebp - 0x1220]
mov dword [esp + 4], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov edi, eax
mov eax, 0xe3f
call fcn.00472290
mov ecx, dword [ebp - 0x122c]
mov eax, dword [ecx + 0x34]
mov dword [esp], edi
mov dword [esp + 4], str.ReadFile_failed:__lu_n
mov dword [esp + 8], eax
call fcn.00472ba0
mov eax, 0xe40
call fcn.00472290
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], str.size___lu_n
cmp eax, 0x44
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov eax, 0xe41
call fcn.00472290
lea edx, [ebp - 0x100c]
mov dword [esp + 8], 0x44
mov dword [esp], edx
mov dword [esp + 4], 0x4c80a0
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.unexpected_file_content_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov dword [esp], ebx
mov eax, dword [ebp - 0x1230]
call eax
mov ecx, 0x44
mov edx, 0x4c80a0
sub esp, 4
mov dword [esp], str.mf_Graphics
mov edi, dword [ebp - 0x1228]
mov eax, edi
call fcn.00479240
test eax, eax
je 0x47beac
mov eax, dword [0x4975a8]
test eax, eax
jne 0x47c0e0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x4723c0
mov eax, dword [ebp - 0x1228]
mov dword [esp], 0
mov dword [esp + 4], eax
call dword [sym.imp.gdi32.dll_EnumMetaFile]
sub esp, 0x10
mov eax, dword [ebp - 0x1228]
mov ebx, dword [sym.imp.gdi32.dll_DeleteMetaFile]
mov edi, dword fs:[0x18]
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [ebp - 0x122c], eax
mov eax, 0xe4b
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.Could_not_delete_metafile:__lu_n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x122c]
mov dword [esp], edx
call fcn.00472ba0
mov eax, dword [ebp - 0x1228]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp], eax
call ebx
sub esp, 4
mov dword [ebp - 0x1228], eax
mov eax, 0xe4f
call fcn.00472290
mov dword [esp + 4], str.DeleteMetaFile_succeeded_n
xor eax, eax
mov edx, dword [ebp - 0x1228]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00472ba0
mov eax, 0xe50
call fcn.00472290
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 6
sete al
mov dword [esp], eax
call fcn.00472ba0
mov eax, dword [ebp - 0x1224]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp], eax
mov eax, dword [ebp - 0x1234]
call eax
mov dword [ebp - 0x1224], eax
sub esp, 4
mov eax, 0xe54
call fcn.00472290
mov edx, dword [ebp - 0x1224]
mov eax, dword [edi + 0x34]
test edx, edx
je 0x47c108
mov dword [esp + 8], edx
mov dword [esp + 0xc], eax
mov dword [esp], esi
mov dword [esp + 4], str.CloseMetaFile_returned__p___lu__n
mov esi, dword fs:[0x18]
call fcn.00472ba0
lea eax, [ebp - 0x1110]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov edi, eax
mov eax, 0xe58
call fcn.00472290
mov eax, dword [esi + 0x34]
mov dword [esp], edi
mov dword [esp + 4], str.Could_not_delete_file:__lu_n
mov dword [esp + 8], eax
call fcn.00472ba0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp], 0xdeadbeef
call ebx
sub esp, 4
mov ebx, eax
mov eax, 0xe5c
call fcn.00472290
xor eax, eax
test ebx, ebx
mov dword [esp + 4], str.DeleteMetaFile_succeeded_n
sete al
mov dword [esp], eax
call fcn.00472ba0
mov eax, 0xe5d
call fcn.00472290
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 6
sete al
mov dword [esp], eax
call fcn.00472ba0
mov dword [esi + 0x34], 0xdeadbeef
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0xdeadbeef
call dword [sym.imp.gdi32.dll_GetMetaFileBitsEx]
sub esp, 0xc
mov dword [ebp - 0x1220], eax
mov eax, 0xe61
call fcn.00472290
mov eax, dword [ebp - 0x1220]
mov dword [esp + 4], str.GetMetaFileBitsEx_returned__lu_n
test eax, eax
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00472ba0
mov eax, 0xe62
call fcn.00472290
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [esi + 0x34], 6
sete al
mov dword [esp], eax
call fcn.00472ba0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, str.mf_Graphics
mov eax, edi
call fcn.004793a0
jmp 0x47be82
xor eax, eax
cmp edx, 0x20
sete al
jmp 0x47b8de
xor ecx, ecx
cmp eax, 6
sete cl
mov esi, ecx
jmp 0x47bf9c