Function at 0x1001a170
Capabilities:
Check if file exists
Get file attributes
Set file attributes
Timestomp file

Disassembly:
sub esp, 0x14c
cmp dword [0x1003098c], 0
push ebx
push esi
push edi
push ebp
je 0x1001a320
mov dword [esp + 0x34], 1
cmp dword [0x10030990], 0
je 0x1001a1b1
lea eax, [esp + 0x34]
mov esi, dword [esp + 0x160]
push eax
push esi
call dword [0x10030990]
test eax, eax
je 0x1001a22b
jmp 0x1001a1b8
mov esi, dword [esp + 0x160]
cmp dword [0x100307cc], 0
je 0x1001a1c8
mov eax, dword [0x100307d0]
jmp 0x1001a1cd
call fcn.100188c0
test eax, eax
je 0x1001a1f0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x38], eax
cmp eax, 0xffffffff
jne 0x1001a22b
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
call fcn.100188f0
lea eax, [esp + 0x58]
push eax
push esi
call fcn.10018c10
add esp, 8
call fcn.10018920
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esp + 0x38], eax
cmp eax, 0xffffffff
jne 0x1001a22b
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov bx, word [esp + 0x168]
mov al, byte [esp + 0x16c]
mov word [esp + 0x32], 0
mov byte [esp + 0x38], al
mov ax, bx
and ax, 0x1f
add ax, ax
mov word [esp + 0x30], ax
mov ax, bx
and ax, 0x7e0
shr ax, 5
mov di, word [esp + 0x164]
mov word [esp + 0x2e], ax
mov ax, bx
shr ax, 0xb
mov word [esp + 0x2c], ax
mov ax, di
and ax, 0x1f
mov word [esp + 0x2a], ax
mov ax, di
and ax, 0x1e0
shr ax, 5
mov word [esp + 0x26], ax
mov ax, di
and ah, 0xfe
cmp ah, 0x7e
mov ax, di
jbe 0x1001a2b6
shr ax, 9
add ax, 0x77c
mov word [esp + 0x24], ax
inc word [esp + 0x30]
jmp 0x1001a2c3
shr ax, 9
add ax, 0x7bc
mov word [esp + 0x24], ax
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea eax, [esp + 0x14]
lea edx, [esp + 0x3c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [edx], ecx
mov dword [edx + 4], eax
lea edx, [esp + 0x34]
mov dword [esp + 0x34], 3
push edx
push esi
call dword [0x1003098c]
test eax, eax
mov eax, dword [0x100307cc]
jne 0x1001a33c
xor ax, ax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov di, word [esp + 0x164]
mov esi, dword [esp + 0x160]
mov bx, word [esp + 0x168]
mov eax, dword [0x100307cc]
test eax, eax
je 0x1001a347
mov eax, dword [0x100307d0]
jmp 0x1001a34c
call fcn.100188c0
test eax, eax
je 0x1001a4ba
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [esp + 0x34], eax
cmp eax, 0xffffffff
jne 0x1001a373
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov al, byte [esp + 0x16c]
mov byte [esp + 0x12], al
and word [esp + 0x12], 0xfffe
mov al, byte [esp + 0x12]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x1001a3ac
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
push 0
push 0
push 3
push 0
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov ebp, eax
jne 0x1001a3d8
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov word [esp + 0x32], 0
mov ax, bx
and ax, 0x1f
add ax, ax
mov word [esp + 0x30], ax
mov ax, bx
and ax, 0x7e0
shr ax, 5
shr bx, 0xb
mov word [esp + 0x2e], ax
mov ax, di
and ax, 0x1f
mov word [esp + 0x2c], bx
mov word [esp + 0x2a], ax
mov ax, di
and ax, 0x1e0
shr ax, 5
mov word [esp + 0x26], ax
mov ax, di
and ah, 0xfe
cmp ah, 0x7e
jbe 0x1001a443
shr di, 9
add di, 0x77c
mov word [esp + 0x24], di
inc word [esp + 0x30]
jmp 0x1001a451
shr di, 9
add di, 0x7bc
mov word [esp + 0x24], di
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea edi, [eax - 1]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [esp + 0x16c], 1
je 0x1001a4ac
mov al, byte [esp + 0x16c]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ax, di
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
call fcn.100188f0
lea eax, [esp + 0x58]
push eax
push esi
call fcn.10018c10
lea eax, [esp + 0x60]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [esp + 0x34], eax
cmp eax, 0xffffffff
jne 0x1001a4f5
call fcn.10018920
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov al, byte [esp + 0x16c]
lea ecx, [esp + 0x58]
mov byte [esp + 0x12], al
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
and word [esp + 0x12], 0xfffe
mov al, byte [esp + 0x12]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x34]
push eax
push ecx
call esi
test eax, eax
jne 0x1001a539
call fcn.10018920
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
lea eax, [esp + 0x58]
push 0
push 0
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 3
push 0
push 1
push 0x40000000
push eax
call ebp
cmp eax, 0xffffffff
mov ebp, eax
jne 0x1001a570
call fcn.10018920
mov ax, 0xffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret
mov word [esp + 0x32], 0
mov ax, bx
and ax, 0x1f
add ax, ax
mov word [esp + 0x30], ax
mov ax, bx
and ax, 0x7e0
shr ax, 5
shr bx, 0xb
mov word [esp + 0x2e], ax
mov ax, di
and ax, 0x1f
mov word [esp + 0x2c], bx
mov word [esp + 0x2a], ax
mov ax, di
and ax, 0x1e0
shr ax, 5
mov word [esp + 0x26], ax
mov ax, di
and ah, 0xfe
cmp ah, 0x7e
jbe 0x1001a5db
shr di, 9
add di, 0x77c
mov word [esp + 0x24], di
inc word [esp + 0x30]
jmp 0x1001a5e9
shr di, 9
add di, 0x7bc
mov word [esp + 0x24], di
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x24]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_LocalFileTimeToFileTime]
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
lea edi, [eax - 1]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test byte [esp + 0x16c], 1
je 0x1001a644
mov al, byte [esp + 0x16c]
lea ecx, [esp + 0x58]
mov byte [esp + 0x34], al
mov eax, dword [esp + 0x34]
push eax
push ecx
call esi
call fcn.10018920
mov ax, di
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x14c
ret