Function at 0x418934
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4b0e89
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4dc104]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push esi
push edi
mov eax, dword [0x4dc104]
xor eax, esp
push eax
lea eax, [esp + 0x258]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov esi, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x24], esi
mov dword [esp + 0x1c], edi
test al, 1
je 0x418bdd
test al, 2
je 0x418bdd
and dword [esp + 0x18], 0
lea ecx, [esp + 0x44]
test edi, edi
je 0x418a3e
mov edx, edi
call fcn.0040cdd7
test eax, eax
jge 0x4189bf
push 0x57
pop eax
jmp 0x418bdf
lea ebx, [esi + 0x14]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov esi, 0x104
test ebx, ebx
je 0x4189e4
lea edi, [esp + 0x10]
mov edx, esi
mov eax, ebx
call fcn.004183b4
mov ecx, dword [esp + 0x10]
jmp 0x4189e9
mov eax, 0x80070057
test eax, eax
jl 0x418a34
test ecx, ecx
je 0x418a34
dec ecx
je 0x418a34
cmp word [ebx + ecx*2], 0x5c
je 0x4189fe
dec ecx
jne 0x4189f4
test ecx, ecx
je 0x418a34
lea edi, [esp + 0x14]
mov edx, esi
lea eax, [esp + 0x44]
lea ebx, [ebx + ecx*2]
call fcn.004183b4
test eax, eax
jl 0x418a34
mov eax, dword [esp + 0x14]
mov ecx, esi
sub ecx, eax
lea edx, [esp + eax*2 + 0x44]
push SysReAllocString
mov eax, ebx
call fcn.00418414
test eax, eax
jge 0x418a48
mov eax, 0x54f
jmp 0x418bdf
lea edx, [esi + 0x14]
call fcn.0040cdd7
jmp 0x418a50
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
cmp byte [ebp + 8], 0
je 0x418a84
test edi, edi
jne 0x418a6c
test byte [esi + 0xc], 1
je 0x418a6c
lea eax, [esp + 0x44]
push eax
call fcn.00418c23
jmp 0x418a77
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x418a84
push 0x50
pop edi
jmp 0x418bd9
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
call fcn.004040cf
and dword [esp + 0x260], 0
lea ebx, [esp + 0x28]
call fcn.004188a1
or dword [esp + 0x260], 0xffffffff
xor ebx, ebx
push ebx
push 1
lea ecx, [esp + 0x30]
call fcn.00405617
cmp edi, ebx
jne 0x418ad6
test byte [esi + 0xc], 1
je 0x418ad6
push 5
push 0x1f01ff
lea eax, [esp + 0x4c]
push eax
call fcn.00418e35
jmp 0x418af1
push ebx
push 0x2000080
push 2
push ebx
push 1
push 0x1f01ff
lea eax, [esp + 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x418b07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x418bd9
push 0x4c6e84
push ebx
lea eax, [esi + 0x21c]
push 0x8000
push eax
call fcn.00494dbe
add esp, 0xc
push eax
call fcn.004a2198
pop ecx
pop ecx
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x418b39
push 5
pop edi
jmp 0x418bbf
push 1
push eax
push dword [esp + 0x18]
call fcn.00418f4f
mov edi, eax
cmp edi, ebx
jne 0x418bbf
test byte [esi + 0xc], 2
je 0x418b62
lea eax, [esi + 0x404]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
cmp dword [esp + 0x1c], ebx
jne 0x418b7d
test byte [esi + 0xc], 1
je 0x418b7d
push dword [esi + 0x10]
lea eax, [esp + 0x48]
push eax
call fcn.00418cd0
jmp 0x418b8b
push dword [esi + 0x10]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x18], ebx
jne 0x418baf
cmp eax, ebx
jne 0x418bb7
cmp dword [esp + 0x20], ebx
je 0x418bbd
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x418b62
jmp 0x418bbd
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x418bbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x14], ebx
je 0x418bd9
push dword [esp + 0x14]
call fcn.004a1f25
pop ecx
mov eax, edi
jmp 0x418bdf
xor eax, eax
mov ecx, dword [esp + 0x258]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x240]
xor ecx, esp
call fcn.00488689
mov esp, ebp
pop ebp
ret 0xc