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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4adb57
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x4d9114]
xor eax, esp
mov dword [esp + 0x240], eax
push ebx
push esi
push edi
mov eax, dword [0x4d9114]
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 0x417d63
test al, 2
je 0x417d63
and dword [esp + 0x18], 0
lea ecx, [esp + 0x44]
test edi, edi
je 0x417bc4
mov edx, edi
call fcn.0040c069
test eax, eax
jge 0x417b45
push 0x57
pop eax
jmp 0x417d65
lea ebx, [esi + 0x14]
xor ecx, ecx
mov dword [esp + 0x10], ecx
mov esi, 0x104
test ebx, ebx
je 0x417b6a
lea edi, [esp + 0x10]
mov edx, esi
mov eax, ebx
call fcn.004174fa
mov ecx, dword [esp + 0x10]
jmp 0x417b6f
mov eax, 0x80070057
test eax, eax
jl 0x417bba
test ecx, ecx
je 0x417bba
dec ecx
je 0x417bba
cmp word [ebx + ecx*2], 0x5c
je 0x417b84
dec ecx
jne 0x417b7a
test ecx, ecx
je 0x417bba
lea edi, [esp + 0x14]
mov edx, esi
lea eax, [esp + 0x44]
lea ebx, [ebx + ecx*2]
call fcn.004174fa
test eax, eax
jl 0x417bba
mov eax, dword [esp + 0x14]
mov ecx, esi
sub ecx, eax
lea edx, [esp + eax*2 + 0x44]
push SysReAllocString
mov eax, ebx
call fcn.0041755a
test eax, eax
jge 0x417bce
mov eax, 0x54f
jmp 0x417d65
lea edx, [esi + 0x14]
call fcn.0040c069
jmp 0x417bd6
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
cmp byte [ebp + 8], 0
je 0x417c0a
test edi, edi
jne 0x417bf2
test byte [esi + 0xc], 1
je 0x417bf2
lea eax, [esp + 0x44]
push eax
call fcn.00417dad
jmp 0x417bfd
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x417c0a
push 0x50
pop edi
jmp 0x417d5f
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x2c]
call fcn.004040b1
and dword [esp + 0x260], 0
lea ebx, [esp + 0x28]
call fcn.00417a27
or dword [esp + 0x260], 0xffffffff
xor ebx, ebx
push ebx
push 1
lea ecx, [esp + 0x30]
call fcn.0040515f
cmp edi, ebx
jne 0x417c5c
test byte [esi + 0xc], 1
je 0x417c5c
push 5
push 0x1f01ff
lea eax, [esp + 0x4c]
push eax
call fcn.00417fbf
jmp 0x417c77
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 0x417c8d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x417d5f
push 0x4c3f9c
push ebx
lea eax, [esi + 0x21c]
push 0x8000
push eax
call fcn.00493d4e
add esp, 0xc
push eax
call fcn.004a1148
pop ecx
pop ecx
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x417cbf
push 5
pop edi
jmp 0x417d45
push 1
push eax
push dword [esp + 0x18]
call fcn.004180d9
mov edi, eax
cmp edi, ebx
jne 0x417d45
test byte [esi + 0xc], 2
je 0x417ce8
lea eax, [esi + 0x404]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
cmp dword [esp + 0x1c], ebx
jne 0x417d03
test byte [esi + 0xc], 1
je 0x417d03
push dword [esi + 0x10]
lea eax, [esp + 0x48]
push eax
call fcn.00417e5a
jmp 0x417d11
push dword [esi + 0x10]
lea eax, [esp + 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x18], ebx
jne 0x417d35
cmp eax, ebx
jne 0x417d3d
cmp dword [esp + 0x20], ebx
je 0x417d43
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x417ce8
jmp 0x417d43
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x417d43
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 0x417d5f
push dword [esp + 0x14]
call fcn.004a0ed5
pop ecx
mov eax, edi
jmp 0x417d65
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.004876e8
mov esp, ebp
pop ebp
ret 0xc