Function at 0x459800
Capabilities:
Set file attributes

Disassembly:
sub esp, 0x110
push ebx
push ebp
push esi
mov esi, dword [esp + 0x120]
xor ebp, ebp
xor ebx, ebx
mov eax, dword [esi + 0x1c]
push edi
cmp eax, ebp
mov dword [esp + 0x10], ebp
je 0x45982d
cmp dword [esp + 0x128], ebp
jne 0x45982d
xor eax, eax
jmp 0x459832
mov eax, 1
lea edx, [esi + 0xc9dc]
mov dword [esi + 0x74], eax
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
mov dword [esi + 0xcb34], ebp
mov dword [esi + 0xcb38], ebp
mov dword [esp + 0x14], edx
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x128]
not ecx
dec ecx
cmp eax, ebp
mov dword [esi + 0xcb3c], ecx
je 0x459922
mov eax, edx
cmp byte [eax], 0
je 0x45988a
cmp byte [eax], 0x5c
jne 0x45987b
mov byte [eax], 0x2f
push eax
call fcn.0046408f
mov cl, byte [eax]
add esp, 4
test cl, cl
jne 0x459873
mov al, byte [esi + 0xc9dc]
lea ebx, [esi + 0xc9dc]
cmp al, 0x2f
mov dword [esp + 0x14], ebx
jne 0x4598b4
mov dword [esi + 0xcb38], 1
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], 0
inc ebx
jmp 0x459922
cmp dword [0x4956fc], 1
jle 0x4598d2
and eax, 0xff
push 0x103
push eax
call fcn.00463a9a
add esp, 8
jmp 0x4598e6
mov ecx, dword [0x4954f0]
and eax, 0xff
mov ax, word [ecx + eax*2]
and eax, 0x103
cmp eax, ebp
je 0x459922
cmp byte [esi + 0xc9dd], 0x3a
jne 0x459922
mov dword [esi + 0xcb38], 1
mov dl, byte [ebx]
mov al, byte [ebx + 1]
inc ebx
inc ebx
mov byte [esp + 0x1d], al
mov byte [esp + 0x1c], dl
lea eax, [esp + 0x1e]
cmp byte [ebx], 0x2f
jne 0x45991f
mov byte [esp + 0x1e], 0x2f
lea eax, [esp + 0x1f]
inc ebx
mov byte [eax], 0
lea ecx, [esp + 0x1c]
push 1
push ecx
push esi
call fcn.00459c80
add esp, 0xc
cmp eax, ebp
mov dword [esp + 0x18], eax
jne 0x459bc6
mov eax, dword [esp + 0x128]
mov byte [esp + 0x1c], 0
test eax, eax
lea ebp, [esp + 0x1c]
jne 0x459975
mov eax, dword [esi + 0x24]
test eax, eax
je 0x45996a
mov edx, dword [esp + 0x14]
push 0x2f
push edx
call fcn.0046422e
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x459974
mov ebx, dword [esp + 0x14]
jmp 0x459975
inc ebx
xor eax, eax
mov al, byte [ebx]
mov esi, eax
test esi, esi
je 0x459a85
lea eax, [esi - 0x20]
cmp eax, 0x5c
ja case.0x459997.36
xor ecx, ecx
mov cl, byte [eax + 0x459be8]
jmp dword [ecx*4 + 0x459bd4]
mov eax, dword [esp + 0x124]
lea edx, [esp + 0x1c]
push 2
push edx
push eax
mov byte [ebp], 0
call fcn.00459c80
add esp, 0xc
cmp eax, 1
mov dword [esp + 0x18], eax
jg 0x459bc6
lea ebp, [esp + 0x1c]
mov dword [esp + 0x10], 0
jmp 0x459a6c
mov dword [esp + 0x10], ebp
mov byte [ebp], 0x3b
inc ebp
jmp 0x459a6c
mov eax, dword [esp + 0x124]
mov ecx, dword [eax + 0x3c]
test ecx, ecx
jne case.0x459997.33
lea ecx, [eax + 0xc9dc]
push ecx
push eax
call fcn.00459c50
add esp, 8
test eax, eax
jne case.0x459997.33
mov byte [ebp], 0x20
inc ebp
jmp 0x459a6c
mov byte [ebp], 0x5f
inc ebp
jmp 0x459a6c
cmp dword [0x4956fc], 1
jle 0x459a2e
push 0x157
push esi
call fcn.00463a9a
add esp, 8
jmp 0x459a3d
mov ecx, dword [0x4954f0]
mov ax, word [ecx + esi*2]
and eax, 0x157
test eax, eax
jne 0x459a46
cmp esi, 0x7f
jb 0x459a6c
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, eax
mov esi, ebx
mov edx, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0046408f
add esp, 4
mov ebp, eax
push ebx
call fcn.0046408f
mov ebx, eax
xor eax, eax
add esp, 4
mov al, byte [ebx]
mov esi, eax
test esi, esi
jne 0x459983
mov esi, dword [esp + 0x124]
mov byte [ebp], 0
mov eax, dword [esi + 0x54]
test eax, eax
jne 0x459ada
mov ebx, dword [esp + 0x10]
test ebx, ebx
je 0x459ada
lea edi, [ebx + 1]
cmp dword [0x4956fc], 1
jle 0x459abc
xor ecx, ecx
push 4
mov cl, byte [edi]
push ecx
call fcn.00463a9a
add esp, 8
jmp 0x459acb
mov eax, dword [0x4954f0]
xor edx, edx
mov dl, byte [edi]
mov al, byte [eax + edx*2]
and eax, 4
test eax, eax
je 0x459ad2
inc edi
jmp 0x459aa2
cmp byte [edi], 0
jne 0x459ada
mov byte [ebx], 0
mov ecx, dword [esi + 0xcb3c]
lea edi, [esi + 0xc9dc]
push ecx
push edi
call fcn.004587a0
mov cl, byte [eax]
add esp, 8
cmp cl, 0x2f
jne 0x459b45
push 4
push edi
push esi
call fcn.00459c80
mov eax, dword [esi + 0xcb34]
add esp, 0xc
test eax, eax
je 0x459b35
mov edx, dword [esi + 0x8d4]
mov eax, dword [edx + 0x18]
test al, 0x6f
je 0x459b25
and eax, 0x7f
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
pop edi
pop esi
pop ebp
mov eax, 0x4d
pop ebx
add esp, 0x110
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x110
ret
mov al, byte [esp + 0x1c]
test al, al
jne 0x459b5d
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x110
ret
lea eax, [esp + 0x1c]
push 3
push eax
push esi
call fcn.00459c80
push 4
push edi
push esi
call fcn.00459c80
mov ecx, dword [esi + 0x8d4]
add esp, 0x18
test byte [ecx + 0x1c], 0x20
je 0x459bc2
mov dl, byte [esi + 0xcb40]
mov ax, word [0x493de4]
mov cl, byte [0x493de6]
add dl, 0x60
mov byte [esp + 0x10], dl
lea edx, [esp + 0x10]
push edi
push edx
mov word [esp + 0x19], ax
mov byte [esp + 0x1b], cl
call dword [sym.imp.KERNEL32.dll_SetVolumeLabelA]
neg eax
pop edi
pop esi
sbb eax, eax
pop ebp
add eax, 3
pop ebx
add esp, 0x110
ret
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x110
ret