Function at 0x40c6de
Capabilities:
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4268c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
mov eax, dword [0x430588]
push ebx
push esi
mov esi, ecx
mov ecx, 0x430588
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.0040c120
mov esi, dword [esp + 0x1c]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or ebx, 0xffffffff
cmp eax, ebx
je 0x40c754
lea eax, [esi - 0x10]
mov dword [esp + 0x34], ebx
lea edx, [eax + 0xc]
lock xadd dword [edx], ebx
dec ebx
test ebx, ebx
jg 0x40c73e
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 0x40c79e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_OpenPrcessToken__err__0x_x
push 4
call fcn.00409a50
lea eax, [esi - 0x10]
add esp, 0xc
mov dword [esp + 0x34], ebx
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
jmp 0x40c820
lea eax, [esp + 0x14]
push eax
push str.SeBackupPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x40c806
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 0x40c83f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_AdjustTokenPrivileges__err__0x_x
push 4
call fcn.00409a50
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 0x40c82c
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 0x40c8ab
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 0x40c89e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegSaveKey__err__0x_x
push 4
call fcn.00409a50
add esp, 0xc
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40c8c1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_call_RegOpenKeyEx__err__0x_x
push 4
call fcn.00409a50
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 0x40c8e5
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