Function at 0x10009480
Capabilities:
Check if file exists
Get file attributes
Get file size
Read file on windows
Read file via mapping
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x10020046
push eax
mov eax, 0x1068
mov dword fs:[0], esp
call fcn.10018670
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1084]
push edi
push esi
call fcn.1000caa0
xor ebx, ebx
add esp, 4
sub eax, ebx
je 0x10009cfc
dec eax
je 0x100099f7
dec eax
jne 0x10009cfc
mov eax, dword [esp + 0x108c]
push ebx
push 0x80
push 3
push ebx
push 1
push Ordinal_1
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x100094f7
xor eax, eax
jmp 0x10009d01
xor ebx, ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [esp + 0x4c], ebx
push esi
call fcn.10018877
add esp, 4
lea ecx, [esp + 0x4c]
mov dword [esp + 0x14], eax
mov ebp, eax
push ebx
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10009549
mov eax, dword [esp + 0x4c]
test eax, eax
jbe 0x10009549
lea edx, [esp + 0x4c]
push 0
add ebp, eax
push edx
push esi
push ebp
push edi
add ebx, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10009529
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esp + 0x14]
xor ebp, ebp
push ebx
push edi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x58], ebp
call fcn.1000a070
lea eax, [esp + 0x58]
push 0x10030b98
lea ecx, [esp + 0x24]
push eax
push ecx
push ebx
push edi
call fcn.1000a1e0
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x10a8]
push edx
push eax
push esi
call fcn.10009d20
add esp, 0x28
test eax, eax
mov eax, dword [esp + 0x18]
jne 0x100095be
cmp eax, ebp
je 0x100095aa
push eax
call fcn.10014af4
add esp, 4
cmp edi, ebp
je 0x100095b7
push edi
call fcn.1001878e
add esp, 4
xor eax, eax
jmp 0x10009d01
cmp eax, ebp
je 0x100095cb
push eax
call fcn.10014af4
add esp, 4
cmp edi, ebp
je 0x100095d8
push edi
call fcn.1001878e
add esp, 4
mov cl, byte [esp + 0x13]
mov edi, esi
mov byte [esp + 0x38], cl
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x40], ebp
mov ebx, ecx
lea ecx, [esp + 0x3c]
push ebx
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], ebp
call fcn.1000ac10
test al, al
je 0x1000962a
mov edi, dword [esp + 0x3c]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], ebx
mov byte [eax + ebx], 0
mov edi, dword [0x100313e0]
mov ecx, dword [0x10030b7c]
mov dword [esp + 0x1080], ebp
mov al, 1
mov esi, dword [edi + 4]
cmp esi, ecx
je 0x1000966d
lea ecx, [esi + 0xc]
mov edi, esi
push ecx
lea ecx, [esp + 0x3c]
call fcn.10008ea0
test eax, eax
setl al
test al, al
je 0x10009662
mov esi, dword [esi]
jmp 0x10009665
mov esi, dword [esi + 8]
cmp esi, dword [0x10030b7c]
jne 0x10009646
mov cl, byte [0x100313e4]
test cl, cl
je 0x1000969d
lea edx, [esp + 0x13]
lea eax, [esp + 0x38]
push edx
push eax
push edi
lea ecx, [esp + 0x20]
push esi
push ecx
mov ecx, 0x100313dc
mov byte [esp + 0x27], 1
call fcn.1000ad30
push eax
jmp 0x10009736
test al, al
mov dword [esp + 0x1c], edi
je 0x100096ef
lea edx, [esp + 0x14]
mov ecx, 0x100313dc
push edx
call fcn.10010680
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
cmp ecx, edx
sete al
test al, al
je 0x100096e6
lea edx, [esp + 0x13]
lea eax, [esp + 0x38]
push edx
push eax
push edi
lea ecx, [esp + 0x20]
push esi
push ecx
mov ecx, 0x100313dc
mov byte [esp + 0x27], 1
call fcn.1000ad30
push eax
jmp 0x10009736
lea ecx, [esp + 0x1c]
call fcn.1000afb0
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x38]
push eax
lea ecx, [edx + 0xc]
call fcn.10008ea0
test eax, eax
jge 0x10009727
lea ecx, [esp + 0x13]
lea edx, [esp + 0x38]
push ecx
push edx
push edi
lea eax, [esp + 0x20]
push esi
push eax
mov ecx, 0x100313dc
mov byte [esp + 0x27], 1
call fcn.1000ad30
push eax
jmp 0x10009736
lea ecx, [esp + 0x13]
lea edx, [esp + 0x1c]
push ecx
mov byte [esp + 0x17], 0
push edx
lea ecx, [esp + 0x38]
call fcn.1000ef50
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x1080], 0xffffffff
cmp eax, ebp
je 0x1000976f
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x10009766
cmp al, 0xff
je 0x10009766
dec al
mov byte [ecx], al
jmp 0x1000976f
push ecx
call fcn.10014af4
add esp, 4
mov al, byte [esp + 0x13]
mov edi, dword [esp + 0x1088]
mov byte [esp + 0x20], al
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x3c], ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x40], ebp
mov ebx, ecx
lea ecx, [esp + 0x20]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
call fcn.1000afa0
cmp eax, ebx
jae 0x100097b4
call fcn.10014aff
mov edi, dword [esp + 0x24]
cmp edi, ebp
je 0x100097dc
mov al, byte [edi - 1]
test al, al
je 0x100097dc
cmp al, 0xff
je 0x100097dc
cmp ebx, ebp
jne 0x10009805
dec al
push ebp
lea ecx, [esp + 0x24]
mov byte [edi - 1], al
call fcn.10008c90
jmp 0x10009834
cmp ebx, ebp
jne 0x100097ed
push 1
lea ecx, [esp + 0x24]
call fcn.10008c90
jmp 0x10009834
mov eax, dword [esp + 0x2c]
cmp eax, 0x1f
ja 0x100097fa
cmp eax, ebx
jae 0x10009813
push 1
lea ecx, [esp + 0x24]
call fcn.10008c90
push ebx
lea ecx, [esp + 0x24]
call fcn.10008ce0
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x1088]
mov ecx, ebx
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
call fcn.1000abf0
mov edi, dword [0x100313e0]
mov ecx, dword [0x10030b7c]
mov ebx, 1
mov esi, dword [edi + 4]
mov dword [esp + 0x1080], ebx
cmp esi, ecx
mov al, bl
je 0x1000987c
lea eax, [esi + 0xc]
lea ecx, [esp + 0x20]
push eax
mov edi, esi
call fcn.10008ea0
test eax, eax
setl al
test al, al
je 0x10009871
mov esi, dword [esi]
jmp 0x10009874
mov esi, dword [esi + 8]
cmp esi, dword [0x10030b7c]
jne 0x10009855
mov cl, byte [0x100313e4]
test cl, cl
je 0x100098ac
lea ecx, [esp + 0x20]
lea edx, [esp + 0x14]
push ecx
push edi
push esi
push edx
mov ecx, 0x100313dc
call fcn.1000ad30
mov eax, dword [eax]
mov byte [esp + 0x34], 1
mov dword [esp + 0x30], eax
jmp 0x1000994e
test al, al
mov dword [esp + 0x1c], edi
je 0x100098fe
lea ecx, [esp + 0x14]
push ecx
mov ecx, 0x100313dc
call fcn.10010680
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax]
cmp edx, ecx
sete al
test al, al
je 0x100098f5
lea eax, [esp + 0x13]
lea ecx, [esp + 0x20]
push eax
push ecx
push edi
lea edx, [esp + 0x20]
push esi
push edx
mov ecx, 0x100313dc
mov byte [esp + 0x27], 1
call fcn.1000ad30
push eax
jmp 0x10009945
lea ecx, [esp + 0x1c]
call fcn.1000afb0
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x20]
push edx
lea ecx, [eax + 0xc]
call fcn.10008ea0
test eax, eax
jge 0x10009936
lea eax, [esp + 0x13]
lea ecx, [esp + 0x20]
push eax
push ecx
push edi
lea edx, [esp + 0x20]
push esi
push edx
mov ecx, 0x100313dc
mov byte [esp + 0x27], 1
call fcn.1000ad30
push eax
jmp 0x10009945
lea eax, [esp + 0x13]
lea ecx, [esp + 0x1c]
push eax
mov byte [esp + 0x17], 0
push ecx
lea ecx, [esp + 0x38]
call fcn.1000ef50
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1080], 0xffffffff
cmp eax, ebp
je 0x1000997e
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x10009975
cmp al, 0xff
je 0x10009975
dec al
mov byte [ecx], al
jmp 0x1000997e
push ecx
call fcn.10014af4
add esp, 4
mov al, byte [0x10030b89]
mov dword [esp + 0x24], ebp
cmp al, 0x31
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x54], ebx
jne 0x1000999f
mov dword [esp + 0x54], 3
call dword [sym.imp.DSIpcAg.dll_class_IDSIpcAg____cdecl_SCAPI_GetIDSIpcAgent_void_]
cmp eax, ebp
je 0x100099c8
mov edx, dword [eax]
push ebp
push ebp
push ebp
push ebp
lea ecx, [esp + 0x64]
push 4
push ecx
mov ecx, dword [esp + 0x10a0]
push ebp
push ecx
push 0x3f1
mov ecx, eax
call dword [edx]
call dword [sym.imp.DSCOPipe.dll_Ordinal_1]
mov esi, eax
cmp esi, ebp
je 0x10009cfc
push str.CCODECMgr::MakeDecryptedFile:_SetSOMACL
call fcn.1000b3f0
add esp, 4
mov ecx, esi
push 0x10030b88
call dword [sym.imp.DSCOPipe.dll_public:_void___thiscall_CSDSCOPipe::SetSOMACL_char__]
jmp 0x10009cfc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edx, eax
and edx, 1
cmp dl, 1
jne 0x10009a12
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
push 0x80
push 3
push ebx
push 1
push Ordinal_1
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10009a4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_CreateFile_in_MakeDecryptedFile__d_
call fcn.1000b3f0
add esp, 8
xor eax, eax
jmp 0x10009d01
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
mov dword [esp + 0x48], ebx
push ebp
call dword [sym.imp.ole32.dll_CoTaskMemAlloc]
lea ecx, [esp + 0x48]
push 0
push ecx
push ebp
push eax
push esi
mov dword [esp + 0x2c], eax
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10009a9a
mov eax, dword [esp + 0x48]
test eax, eax
jbe 0x10009a9a
lea edx, [esp + 0x48]
push 0
add edi, eax
push edx
push ebp
push edi
push esi
add ebx, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10009a7a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x59]
mov byte [esp + 0x58], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x58]
push 0x20
push eax
call fcn.10008f20
add esp, 8
lea ecx, [esp + 0x58]
lea edx, [ebp + 0x20]
push ecx
push edx
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
jne 0x10009b0c
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10009af1
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_CreateFileMapping_in_MakeDecryptedFile__d_
call fcn.1000b3f0
add esp, 8
xor eax, eax
jmp 0x10009d01
push 0
push 0
push 0
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x10009b50
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10009b2e
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_MapViewOfFile_in_MakeDecryptedFile__d_
call fcn.1000b3f0
add esp, 8
xor eax, eax
jmp 0x10009d01
mov esi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
lea edi, [eax + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10009b7d
push eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [esp + 0x14], 0
call dword [sym.imp.DSIpcAg.dll_class_IDSIpcAg____cdecl_SCAPI_GetIDSIpcAgent_void_]
mov esi, eax
test esi, esi
jne 0x10009b9f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10009d01
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x79]
mov byte [esp + 0x78], 0
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x108c]
lea edx, [esp + 0x78]
stosw word es:[edi], ax
push ecx
push edx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x78]
push str..bak
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov edx, dword [esi]
push 0
lea eax, [esp + 0x18]
push 0
lea ecx, [esp + 0x60]
push eax
mov eax, dword [esp + 0x1098]
push ecx
push ebp
mov ebp, dword [esp + 0x109c]
push 0
push eax
push ebp
push 0x3eb
mov ecx, esi
call dword [edx]
mov esi, eax
test esi, esi
je 0x10009c25
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
push str.____Failed_to_pDSIpcAg__Request_in_MakeDecryptedFile__d_
call fcn.1000b3f0
add esp, 8
xor eax, eax
jmp 0x10009d01
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10009c48
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.____Failed_to_pDSIpcAg__Request_in_MakeDecryptedFile_Result_Size_zero
call fcn.1000b3f0
add esp, 4
xor eax, eax
jmp 0x10009d01
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x10009c7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_MapViewOfFile2_in_MakeDecryptedFile__d_
call fcn.1000b3f0
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x10009d01
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x108c]
lea edx, [edi + 0x20]
push ecx
push edx
push eax
call fcn.10009d20
add esp, 0xc
test eax, eax
jne 0x10009ce5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Failed_to_CreateFile2_in_MakeDecryptedFile__d_
call fcn.1000b3f0
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
add esp, 8
push edi
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x78]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x100095b7
push str.____Failed_to_MakeDecryptedFile:_TempFile_is_Exist..__
call fcn.1000b3f0
add esp, 4
push edi
call esi
jmp 0x10009cec
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call fcn.1000ccc0
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x1078]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1074
ret