Function at 0x1000a820
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x28
push esi
push edi
mov edi, eax
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1000a90b
lea ecx, [esp + 0xc]
push ecx
push 0x20
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1000a891
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_OpenPrcessToken__err__0x_x
push 0
push 4
mov esi, 0x10023490
call fcn.10003ad0
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x1000a91f
lea ecx, [esp + 0x18]
push ecx
push str.SeRestorePrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x1000a900
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
push 0
push 0
push 0x10
lea eax, [esp + 0x2c]
push eax
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x1c]
push 0
push ecx
mov dword [esp + 0x38], 1
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x1000a935
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_AdjustTokenPrivileges__err__0x_x
push 0
push 4
mov esi, 0x10023490
call fcn.10003ad0
add esp, 0x10
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1000a92b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
pop edi
pop esi
add esp, 0x28
ret 4
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [esp + 0x14], 0
test eax, eax
je 0x1000a9ac
push edi
push str.can_not_open__s_then_create_it
push 0
push 4
mov esi, 0x10023490
call fcn.10003ad0
add esp, 0x10
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edi, eax
test edi, edi
jne 0x1000a9ee
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x10]
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegRestoreKeyA]
mov edi, eax
test edi, edi
je 0x1000a9e1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegRestoreKey__err__0x_x
push 0
push 4
mov esi, 0x10023490
call fcn.10003ad0
add esp, 0x10
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1000aa0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegOpenKeyEx_and_RegCreateKeyEx__err__0x_x
push 0
push 4
mov esi, 0x10023490
call fcn.10003ad0
add esp, 0x10
mov eax, dword [esp + 0x34]
xor edx, edx
test edi, edi
sete dl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov esi, edx
mov edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x1000aa36
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
mov eax, esi
pop esi
add esp, 0x28
ret 4