Function at 0x10019310
Capabilities:
Check if file exists
Get common file path
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xaa8
mov eax, dword [0x1004c024]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xa64], ecx
mov dword [ebp - 0x22c], 0
mov byte [ebp - 0x441], 0
push 0x104
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x10019391
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa68], eax
push 0x235
push 0x1003afd0
call fcn.10017a50
add esp, 8
push eax
push str._s:_GetSystemDirectory_failed.
mov ecx, dword [ebp - 0xa68]
push ecx
mov edx, dword [ebp - 0xa68]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
mov dl, byte [ebp - 0x220]
mov byte [ebp - 0x441], dl
mov byte [ebp - 0x118], 0
xor eax, eax
mov word [ebp - 0x117], ax
mov byte [ebp - 0x115], al
movsx ecx, byte [ebp - 0x441]
push ecx
push 0x1003b004
lea edx, [ebp - 0x118]
push edx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
call fcn.10017b10
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x228]
push eax
call fcn.10017710
add esp, 4
mov byte [ebp - 0x442], al
lea ecx, [ebp - 0x118]
push ecx
call fcn.100179e0
add esp, 4
test eax, eax
je 0x10019412
mov edx, dword [ebp - 0x22c]
or edx, 1
mov dword [ebp - 0x22c], edx
cmp dword [ebp - 0x228], 5
ja 0x1001948f
movsx eax, byte [ebp - 0x441]
cmp eax, 0x61
jl 0x10019443
movsx ecx, byte [ebp - 0x441]
cmp ecx, 0x7a
jg 0x10019443
movsx edx, byte [ebp - 0x441]
sub edx, 0x20
mov byte [ebp - 0x441], dl
movsx eax, byte [ebp - 0x442]
cmp eax, 0x61
jl 0x1001946b
movsx ecx, byte [ebp - 0x442]
cmp ecx, 0x7a
jg 0x1001946b
movsx edx, byte [ebp - 0x442]
sub edx, 0x20
mov byte [ebp - 0x442], dl
movsx eax, byte [ebp - 0x441]
movsx ecx, byte [ebp - 0x442]
cmp eax, ecx
je 0x1001948f
mov edx, dword [ebp - 0x22c]
or edx, 0x100
mov dword [ebp - 0x22c], edx
mov eax, dword [ebp - 0x22c]
push eax
call fcn.10017d90
add esp, 4
test eax, eax
jne 0x100194e3
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa6c], eax
push 0x258
push 0x1003b00c
call fcn.10017a50
add esp, 8
push eax
push str._s:_CopyFileToSystem_failed.
mov ecx, dword [ebp - 0xa6c]
push ecx
mov edx, dword [ebp - 0xa6c]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
call fcn.10033950
mov dword [ebp - 0x448], eax
mov byte [ebp - 0x440], 0
push 0x103
push 0
lea edx, [ebp - 0x43f]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
push 0x104
lea eax, [ebp - 0x440]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x1001956b
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa70], eax
push 0x261
push 0x1003b040
call fcn.10017a50
add esp, 8
push eax
push str._s:_GetModuleFileName_failed.
mov ecx, dword [ebp - 0xa70]
push ecx
mov edx, dword [ebp - 0xa70]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x44c], 0
jmp 0x10019590
mov edx, dword [ebp - 0x44c]
add edx, 1
mov dword [ebp - 0x44c], edx
lea eax, [ebp - 0x440]
push eax
call sub.ntdll.dll_strlen
add esp, 4
cmp dword [ebp - 0x44c], eax
jae 0x100195e2
mov ecx, dword [ebp - 0x44c]
movsx edx, byte [ebp + ecx - 0x440]
cmp edx, 0x5c
je 0x100195cd
mov eax, dword [ebp - 0x44c]
movsx ecx, byte [ebp + eax - 0x440]
cmp ecx, 0x2f
jne 0x100195e0
mov edx, dword [ebp - 0x44c]
lea eax, [ebp + edx - 0x440]
mov dword [ebp - 0x224], eax
jmp 0x10019581
mov ecx, dword [ebp - 0x224]
mov byte [ecx], 0
mov dword [ebp - 0x114], 1
mov byte [ebp - 0x338], 0
push 0x103
push 0
lea edx, [ebp - 0x337]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
push str.ampe.iso
lea eax, [ebp - 0x440]
push eax
push 0x1003b080
lea ecx, [ebp - 0x338]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x338]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100196ce
mov dword [ebp - 0x114], 0
push str.amlnx.iso
lea eax, [ebp - 0x440]
push eax
push 0x1003b094
lea ecx, [ebp - 0x338]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x338]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100196ce
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa74], eax
lea eax, [ebp - 0x338]
push eax
push 0x277
push 0x1003b09c
call fcn.10017a50
add esp, 8
push eax
push str._s:_Not_found__s
mov ecx, dword [ebp - 0xa74]
push ecx
mov edx, dword [ebp - 0xa74]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0x10
xor eax, eax
jmp 0x10019dc5
push 0x104
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x10019725
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa78], eax
push 0x27f
push 0x1003b0c4
call fcn.10017a50
add esp, 8
push eax
push str._s:_GetSystemDirectory
mov eax, dword [ebp - 0xa78]
push eax
mov ecx, dword [ebp - 0xa78]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
push 0x104
push 0
lea ecx, [ebp - 0x338]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
push str.amboot.iso
push str.Aomei
push str.__s__s
lea edx, [ebp - 0x338]
push edx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x10
cmp dword [ebp - 0x228], 5
ja 0x10019a7b
movsx eax, byte [ebp - 0x442]
test eax, eax
jne 0x100197b3
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa7c], eax
push 0x28e
push 0x1003b10c
call fcn.10017a50
add esp, 8
push eax
push str._s:_Get_system_driver_letter_failed.
mov ecx, dword [ebp - 0xa7c]
push ecx
mov edx, dword [ebp - 0xa7c]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
push 0x104
lea edx, [ebp - 0x110]
push edx
call fcn.10018950
add esp, 8
test eax, eax
jne 0x1001980c
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa80], eax
push 0x295
push 0x1003b148
call fcn.10017a50
add esp, 8
push eax
push str._s:_GetLocalSystemBootFilePath_failed.
mov eax, dword [ebp - 0xa80]
push eax
mov ecx, dword [ebp - 0xa80]
mov edx, dword [ecx]
mov eax, dword [edx + 0xc]
call eax
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa84], eax
lea ecx, [ebp - 0x110]
push ecx
push 0x299
push 0x1003b184
call fcn.10017a50
add esp, 8
push eax
push str._s:_WindowsDirector:__s
mov edx, dword [ebp - 0xa84]
push edx
mov eax, dword [ebp - 0xa84]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0x10
lea eax, [ebp - 0x110]
push eax
mov ecx, dword [ebp - 0x228]
push ecx
mov edx, dword [ebp - 0x448]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x448]
mov edx, dword [eax + 0xc]
call edx
test eax, eax
je 0x10019a36
mov byte [ebp - 0x558], 0
push 0xff
push 0
lea eax, [ebp - 0x557]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x100
push 0
lea ecx, [ebp - 0x558]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
movsx edx, byte [ebp - 0x442]
push edx
push 0x1003b1b0
lea eax, [ebp - 0x558]
push eax
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa88], eax
lea ecx, [ebp - 0x558]
push ecx
push 0x2a2
push 0x1003b1c0
call fcn.10017a50
add esp, 8
push eax
push 0x1003b1d4
mov edx, dword [ebp - 0xa88]
push edx
mov eax, dword [ebp - 0xa88]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0x10
lea eax, [ebp - 0x558]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1001992b
push 0x80
lea ecx, [ebp - 0x558]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x1003b1dc
lea edx, [ebp - 0x558]
push edx
call dword [sym.imp.MSVCR80.dll_fopen]
add esp, 8
mov dword [ebp - 0x454], eax
cmp dword [ebp - 0x454], 0
jne 0x10019997
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa8c], eax
lea eax, [ebp - 0x558]
push eax
push 0x2ab
push 0x1003b1e0
call fcn.10017a50
add esp, 8
push eax
push str._s:_Open__s_failed.
mov ecx, dword [ebp - 0xa8c]
push ecx
mov edx, dword [ebp - 0xa8c]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0x10
xor eax, eax
jmp 0x10019dc5
mov byte [ebp - 0x758], 0
push 0x1ff
push 0
lea edx, [ebp - 0x757]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x338]
push ecx
lea edx, [ebp - 0x338]
push edx
push 0x1003b208
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp - 0x454]
push ecx
lea edx, [ebp - 0x758]
push edx
call sub.ntdll.dll_strlen
add esp, 4
push eax
push 1
lea eax, [ebp - 0x758]
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
mov dword [ebp - 0x450], eax
mov ecx, dword [ebp - 0x454]
push ecx
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
push 2
lea edx, [ebp - 0x558]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, 1
jmp 0x10019dc5
mov eax, dword [ebp - 0x22c]
push eax
lea ecx, [ebp - 0x110]
push ecx
mov dl, byte [ebp - 0x442]
push edx
mov eax, dword [ebp - 0x228]
push eax
lea ecx, [ebp - 0x338]
push ecx
mov edx, dword [ebp - 0x448]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x448]
mov edx, dword [eax]
call edx
test eax, eax
jne 0x10019a76
xor eax, eax
jmp 0x10019dc5
jmp 0x10019d86
mov al, byte [ebp - 0x110]
mov byte [ebp - 0x442], al
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa90], eax
push 0x2be
push 0x1003b2a4
call fcn.10017a50
add esp, 8
push eax
push 0x1003b2b8
mov ecx, dword [ebp - 0xa90]
push ecx
mov edx, dword [ebp - 0xa90]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
push 0
mov edx, dword [ebp - 0x228]
push edx
mov eax, dword [ebp - 0x448]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x448]
mov eax, dword [edx + 0xc]
call eax
test eax, eax
je 0x10019d19
mov byte [ebp - 0x860], 0
push 0xff
push 0
lea ecx, [ebp - 0x85f]
push ecx
call sub.ntdll.dll_memset
add esp, 0xc
push 0x100
push 0
lea edx, [ebp - 0x860]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
movsx eax, byte [ebp - 0x442]
push eax
push str._c:_amcf.lst
lea ecx, [ebp - 0x860]
push ecx
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0xc
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa94], eax
push 0x2c6
push 0x1003b2d0
call fcn.10017a50
add esp, 8
push eax
push 0x1003b2e4
mov edx, dword [ebp - 0xa94]
push edx
mov eax, dword [ebp - 0xa94]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
lea eax, [ebp - 0x860]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x10019b93
push 0x80
lea ecx, [ebp - 0x860]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa98], eax
push 0x2cb
push 0x1003b2ec
call fcn.10017a50
add esp, 8
push eax
push 0x1003b300
mov edx, dword [ebp - 0xa98]
push edx
mov eax, dword [ebp - 0xa98]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
push 0x1003b308
lea eax, [ebp - 0x860]
push eax
call dword [sym.imp.MSVCR80.dll_fopen]
add esp, 8
mov dword [ebp - 0x760], eax
cmp dword [ebp - 0x760], 0
jne 0x10019c39
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xa9c], eax
lea ecx, [ebp - 0x860]
push ecx
push 0x2cf
push 0x1003b30c
call fcn.10017a50
add esp, 8
push eax
push str._s:_Failed_to_open__s
mov edx, dword [ebp - 0xa9c]
push edx
mov eax, dword [ebp - 0xa9c]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0x10
xor eax, eax
jmp 0x10019dc5
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xaa0], eax
lea eax, [ebp - 0x860]
push eax
push 0x2d2
push 0x1003b338
call fcn.10017a50
add esp, 8
push eax
push str._s:_Config_file_path:__s
mov ecx, dword [ebp - 0xaa0]
push ecx
mov edx, dword [ebp - 0xaa0]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0x10
mov byte [ebp - 0xa60], 0
push 0x1ff
push 0
lea edx, [ebp - 0xa5f]
push edx
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 0x338]
push eax
lea ecx, [ebp - 0x338]
push ecx
lea edx, [ebp - 0x338]
push edx
push str.timeout_0_nhiddenmenu_ndefault_AOMEI_Backupper_n_ntitle_AOMEI_Backupper_nfind___set_root__s_nmap__s__0xff___map___mem__s__0xff__nmap___hook_r_nchainloader__0xff__n
lea eax, [ebp - 0xa60]
push eax
call dword [sym.imp.ntdll.dll_sprintf]
add esp, 0x14
mov ecx, dword [ebp - 0x760]
push ecx
lea edx, [ebp - 0xa60]
push edx
call sub.ntdll.dll_strlen
add esp, 4
push eax
push 1
lea eax, [ebp - 0xa60]
push eax
call dword [sym.imp.MSVCR80.dll_fwrite]
add esp, 0x10
mov dword [ebp - 0x75c], eax
mov ecx, dword [ebp - 0x760]
push ecx
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
push 2
lea edx, [ebp - 0x860]
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, 1
jmp 0x10019dc5
push 0
push 0
mov al, byte [ebp - 0x442]
push eax
mov ecx, dword [ebp - 0x228]
push ecx
lea edx, [ebp - 0x338]
push edx
mov eax, dword [ebp - 0x448]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x448]
mov eax, dword [edx]
call eax
test eax, eax
jne 0x10019d86
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xaa4], eax
push 0x2de
push 0x1003b404
call fcn.10017a50
add esp, 8
push eax
push str._s:_AddOurBootOption_failed.
mov ecx, dword [ebp - 0xaa4]
push ecx
mov edx, dword [ebp - 0xaa4]
mov eax, dword [edx]
mov ecx, dword [eax + 0xc]
call ecx
add esp, 0xc
xor eax, eax
jmp 0x10019dc5
call sym.Comn.dll_GetObjectLog
mov dword [ebp - 0xaa8], eax
push 0x2e2
push 0x1003b438
call fcn.10017a50
add esp, 8
push eax
push str._s:
mov edx, dword [ebp - 0xaa8]
push edx
mov eax, dword [ebp - 0xaa8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
call edx
add esp, 0xc
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000f6c2
mov esp, ebp
pop ebp
ret