Function at 0x408f1e
Capabilities:
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4225a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov eax, dword [0x42c534]
push ebx
push esi
mov esi, ecx
mov ecx, 0x42c534
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
add esi, 0x22c
push esi
lea ecx, [esp + 0x14]
push str._sRsMgrSvc.dat
push ecx
mov dword [esp + 0x40], 0
call fcn.00408960
mov esi, dword [esp + 0x1c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or ebx, 0xffffffff
cmp eax, ebx
je 0x408f94
lea eax, [esi - 0x10]
mov dword [esp + 0x34], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x408f7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop esi
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
lea eax, [esp + 8]
push eax
push 0x20
mov dword [esp + 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x408fde
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_OpenPrcessToken__err__0x_x
push 4
call fcn.004062b0
lea eax, [esi - 0x10]
add esp, 0xc
mov dword [esp + 0x34], ebx
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
jmp 0x409060
lea eax, [esp + 0x14]
push eax
push str.SeBackupPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x409046
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push 0
push 0
push 0x10
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x18]
push 0
push eax
mov dword [esp + 0x34], 1
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x40907f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_AdjustTokenPrivileges__err__0x_x
push 4
call fcn.004062b0
add esp, 0xc
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esi - 0x10]
mov dword [esp + 0x34], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x40906c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
add esp, 0x30
ret
mov eax, dword [esp + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push ecx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServicesRsMgrSvc
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test edi, edi
jne 0x4090eb
mov edx, dword [esp + 0x10]
push eax
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSaveKeyA]
mov edi, eax
test edi, edi
je 0x4090de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegSaveKey__err__0x_x
push 4
call fcn.004062b0
add esp, 0xc
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x409101
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegOpenKeyEx__err__0x_x
push 4
call fcn.004062b0
add esp, 0xc
xor ecx, ecx
test edi, edi
sete cl
lea eax, [esi - 0x10]
mov dword [esp + 0x38], ebx
lea edx, [eax + 0xc]
mov edi, ecx
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x409125
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x30]
mov eax, edi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x30
ret