Function at 0x10819f5
Capabilities:
Check if file exists
Delete file
Get file attributes
Write file on windows

Disassembly:
mov eax, 0x10f2602
call fcn.01003440
sub esp, 0x18
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ecx
push ebx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], ebx
call dword [sym.imp.mmcbase.DLL_public:_void___thiscall_mmcerror::SC::constructor_long_int_]
push 0x1081b90
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 1
call dword [sym.imp.mmcbase.DLL_public:_void___thiscall_mmcerror::SC::SetFunctionName_unsigned_short_int_const__]
mov esi, dword [ebp + 0x18]
or dword [esi], 0xffffffff
mov edi, dword [ebp + 0xc]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1081a6b
test al, 1
je 0x1081a6b
cmp byte [ebp + 0x14], bl
je 0x1081a58
push dword [edi]
mov ecx, dword [ebp - 0x10]
push dword [esi]
push ebx
call fcn.01081981
push 0x80070005
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_class_mmcerror::SC____thiscall_mmcerror::SC::operator_long_int_]
jmp 0x1081b3e
mov eax, dword [edi]
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x1081ac5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_class_mmcerror::SC____thiscall_mmcerror::SC::FromWin32_long_int_]
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_bool___thiscall_mmcerror::SC::IsError_void_const]
test al, al
jne 0x1081ab5
push 0x8000ffff
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_class_mmcerror::SC____thiscall_mmcerror::SC::operator_long_int_]
cmp byte [ebp + 0x14], bl
je 0x1081b3e
push dword [edi]
push ebx
push 1
jmp 0x1081b36
cmp byte [ebp + 0x10], bl
je 0x1081b3e
push ebx
lea ecx, [ebp + 0x18]
push ecx
push 2
lea ecx, [ebp + 0x10]
push ecx
push eax
mov dword [ebp + 0x10], 0xfeff
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1081aed
cmp dword [ebp + 0x18], 2
je 0x1081b3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_class_mmcerror::SC____thiscall_mmcerror::SC::FromWin32_long_int_]
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_bool___thiscall_mmcerror::SC::IsError_void_const]
test al, al
jne 0x1081b18
push 0x8000ffff
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_class_mmcerror::SC____thiscall_mmcerror::SC::operator_long_int_]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi], 0xffffffff
push dword [edi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp byte [ebp + 0x14], bl
je 0x1081b3e
push dword [edi]
push dword [esi]
push 2
mov ecx, dword [ebp - 0x10]
call fcn.01081981
lea ecx, [ebp - 0x24]
call dword [sym.imp.mmcbase.DLL_public:_bool___thiscall_mmcerror::SC::IsError_void_const]
test al, al
je 0x1081b5c
mov eax, dword [esi]
cmp eax, 0xffffffff
je 0x1081b5c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [esi], 0xffffffff
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.mmcbase.DLL_public:_void___thiscall_mmcerror::SC::constructor_class_mmcerror::SC_const__]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x14], 1
mov byte [ebp - 4], bl
call dword [sym.imp.mmcbase.DLL_public:_void___thiscall_mmcerror::SC::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x14