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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x224
mov eax, dword [0x711ab8]
xor eax, esp
mov dword [esp + 0x220], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [esp + 0x14], eax
mov eax, dword [ebx + 8]
push esi
push edi
mov dword [esp + 0x10], ebx
test al, 1
je 0x46ab3b
test al, 2
je 0x46ab3b
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x18], 0
mov edx, 0x104
lea eax, [esp + 0x20]
test edi, edi
je 0x46a959
mov esi, edi
mov ecx, eax
xor ebx, ebx
sub esi, ecx
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x46a881
movzx ecx, word [esi + eax]
test cx, cx
je 0x46a881
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46a861
jmp 0x46a885
test edx, edx
jne 0x46a88d
sub eax, 2
mov ebx, 0x8007007a
xor edx, edx
mov word [eax], dx
test ebx, ebx
jge 0x46a8b0
lea eax, [edx + 0x57]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esp + 0x10]
add edx, 0x14
je 0x46a93d
mov ecx, 0x104
mov eax, edx
cmp word [eax], 0
je 0x46a8ee
add eax, 2
sub ecx, 1
jne 0x46a8c4
mov eax, 0x54f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
test ecx, ecx
je 0x46a93d
mov eax, 0x104
sub eax, ecx
je 0x46a93d
sub eax, 1
je 0x46a93d
cmp word [edx + eax*2], 0x5c
je 0x46a928
sub eax, 1
jne 0x46a900
mov eax, 0x54f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
test eax, eax
je 0x46a93d
lea eax, [edx + eax*2]
push eax
lea esi, [esp + 0x24]
call fcn.0046a170
test eax, eax
jge 0x46a996
mov eax, 0x54f
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
lea esi, [esp + 0x20]
sub ecx, esi
lea esi, [ecx + 0x14]
lea ecx, [edx + 0x7ffffefa]
test ecx, ecx
je 0x46a988
movzx ecx, word [esi + eax]
test cx, cx
je 0x46a988
mov word [eax], cx
add eax, 2
sub edx, 1
jne 0x46a962
sub eax, 2
mov word [eax], dx
jmp 0x46a99a
test edx, edx
jne 0x46a98f
sub eax, 2
xor edx, edx
mov word [eax], dx
jmp 0x46a99a
mov ebx, dword [esp + 0x10]
cmp byte [ebp + 8], 0
je 0x46a9e3
test edi, edi
jne 0x46a9b5
test byte [ebx + 0xc], 1
je 0x46a9b5
lea eax, [esp + 0x20]
call fcn.0046ab80
jmp 0x46a9c0
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x46a9e3
mov esi, 0x50
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
test edi, edi
jne 0x46a9ff
test byte [ebx + 0xc], 1
je 0x46a9ff
push 5
push 0x1f01ff
lea eax, [esp + 0x28]
call fcn.0046ae10
jmp 0x46aa1c
push 0
push 0x2000080
push 2
push 0
push 1
push 0x1f01ff
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x46aa42
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [esp + 0x10]
push 0x6cd7d8
push 0
add edx, 0x21c
push 0x8000
push edx
call fcn.005da5d7
add esp, 0xc
push eax
call fcn.005161e0
mov ebx, eax
add esp, 8
mov dword [esp + 0x14], ebx
test ebx, ebx
jne 0x46aa7c
lea esi, [eax + 5]
jmp 0x46ab0e
push ebx
push edi
mov ebx, 1
call fcn.0046af80
mov esi, eax
test esi, esi
jne 0x46ab0a
mov esi, dword [esp + 0x10]
test byte [esi + 0xc], 2
je 0x46aaa6
lea eax, [esi + 0x404]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileShortNameW]
mov ebx, dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
lea esp, [esp]
cmp dword [ebp + 0x10], 0
jne 0x46aacb
test byte [esi + 0xc], 1
je 0x46aacb
mov ecx, dword [esi + 0x10]
push ecx
lea eax, [esp + 0x24]
call fcn.0046ac60
jmp 0x46aada
mov edx, dword [esi + 0x10]
push edx
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [esp + 0x18], 0
jne 0x46aafa
test eax, eax
jne 0x46ab02
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46ab08
push eax
call ebx
mov dword [esp + 0x18], eax
test eax, eax
jne 0x46aab0
jmp 0x46ab08
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x46ab08
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor esi, esi
mov ebx, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x46ab22
push ebx
call fcn.00515e50
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.005c397a
mov esp, ebp
pop ebp
ret 0xc