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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
xor ebx, ebx
mov dword [ebp - 4], 0x80004005
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], ebx
cmp dword [ebp + 8], ebx
jne 0x10164be
mov dword [ebp - 4], 0x80070057
jmp 0x1016963
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetFileSecurityW]
lea eax, [ebp - 8]
push eax
push ebx
push ebx
push 4
push dword [ebp + 8]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1016520
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
cmp dword [ebp - 8], ebx
je 0x10164f4
cmp eax, 0x8007007a
je 0x1016520
mov eax, dword [section..data]
cmp eax, section..data
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push 0x1003758
push 0x1d
jmp 0x1016910
push dword [ebp - 8]
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
pop ecx
mov dword [ebp - 0x1c], ebx
test ebx, ebx
jne 0x1016564
mov ecx, 0x8007000e
mov dword [ebp - 4], ecx
mov eax, dword [section..data]
cmp eax, section..data
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push ecx
push dword [ebp + 8]
push 0x1003758
push 0x1e
jmp 0x1016910
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push ebx
push 4
push dword [ebp + 8]
call edi
test eax, eax
jne 0x10165ae
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push 0x1003758
push 0x1f
jmp 0x1016910
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x10165fc
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, section..data
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push 0x1003758
push 0x20
jmp 0x1016910
xor eax, eax
cmp dword [ebp - 0x20], eax
jne 0x1016606
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0xc]
push ecx
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov ebx, 0x1003758
mov edi, section..data
test eax, eax
jne 0x1016653
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016653
test byte [eax + 0x1c], 2
je 0x1016653
push dword [ebp - 4]
push ebx
push 0x21
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
cmp dword [ebp - 4], 0
jge 0x101669d
lea eax, [ebp - 0xc]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x101669d
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push ebx
push 0x22
jmp 0x10167d0
lea eax, [ebp - 8]
push eax
push 0
push 0
push 1
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x10166ee
call esi
push eax
call fcn.0100968c
cmp dword [ebp - 8], 0
mov dword [ebp - 4], eax
je 0x10166cc
cmp eax, 0x8007007a
je 0x10166ee
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push ebx
push 0x23
jmp 0x10167d0
push dword [ebp - 8]
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x1016729
mov ecx, 0x8007000e
mov dword [ebp - 4], ecx
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push ecx
push dword [ebp + 8]
push ebx
push 0x24
jmp 0x1016910
lea ecx, [ebp - 8]
push ecx
push dword [ebp - 8]
push eax
push 1
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x101676a
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push ebx
push 0x25
jmp 0x10167d0
xor ecx, ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x14]
xor eax, eax
inc eax
mov dword [ebp - 0x58], 0x10140
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 3
mov dword [ebp - 0x40], eax
mov ecx, dword [ecx]
mov dword [ebp - 0x3c], ecx
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp - 0x18]
lea ecx, [ebp - 0x58]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x10167e0
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push ebx
push 0x26
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01008600
jmp 0x1016921
push 1
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
jne 0x1016820
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push ebx
push 0x27
jmp 0x1016910
push 0
push dword [ebp - 0x10]
lea eax, [ebp - 0x38]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x1016865
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push ebx
push 0x28
jmp 0x1016910
lea eax, [ebp - 0x38]
push eax
push 4
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x10168a5
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push ebx
push 0x29
jmp 0x1016910
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10168d8
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push ebx
push 0x2a
jmp 0x1016910
test al, 1
je 0x101691d
and eax, 0xfffffffe
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x101691d
call esi
push eax
call fcn.0100968c
mov dword [ebp - 4], eax
mov eax, dword [section..data]
cmp eax, edi
je 0x1016921
test byte [eax + 0x1c], 1
je 0x1016921
push dword [ebp - 4]
push dword [ebp + 8]
push ebx
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01018c98
jmp 0x1016921
and dword [ebp - 4], 0
xor esi, esi
cmp dword [ebp - 0x10], esi
je 0x1016934
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x10], esi
cmp dword [ebp - 0x14], esi
je 0x1016942
push dword [ebp - 0x14]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
cmp dword [ebp - 0xc], esi
je 0x1016953
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc], esi
cmp dword [ebp - 0x1c], esi
pop edi
pop esi
je 0x1016963
push dword [ebp - 0x1c]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, dword [ebp - 4]
pop ebx
leave
ret 4