Function at 0x415e80
Capabilities:
Set file attributes

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov eax, dword [esp + 0x30]
mov edi, edx
mov dword [esp + 8], ecx
add edx, eax
test eax, eax
mov dword [esp], edx
je 0x415ea4
movzx ebx, byte [edi]
test bl, bl
js 0x415ec1
inc edi
jmp 0x415f1b
xor esi, esi
mov ebx, 4
mov edx, 8
xor edi, edi
mov dword [esp + 4], 0
xor ebp, ebp
jmp 0x415f5f
movzx edx, byte [edi + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x415f0e
movzx ecx, byte [edi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x416112
movzx ebx, byte [edi + 3]
and eax, 7
shl ecx, 6
add edi, 4
shl eax, 0x12
and ebx, 0x3f
or ebx, ecx
or ebx, eax
mov edx, dword [esp]
cmp ebx, 0xffff
jbe 0x415f1b
jmp 0x41612b
shl eax, 6
add edi, 2
or eax, edx
mov edx, dword [esp]
mov ebx, eax
mov ebp, ebx
mov eax, 1
xor esi, esi
mov ecx, edx
mov edx, 0xffffffff
mov ebx, 4
sub ecx, edi
add ecx, 3
cmovae edx, ecx
shr edx, 2
lea ecx, [edx + eax]
lea eax, [edx + eax + 1]
cmp ecx, 3
cmovae ebx, eax
cmp ebx, 0x40000000
jae 0x416154
lea edx, [ebx + ebx]
mov ax, 1
mov dword [esp + 4], eax
movzx eax, byte [0x90320d]
xor ecx, ecx
call fcn.0049d570
test eax, eax
je 0x416154
mov word [eax], bp
mov dword [esp + 0xc], ebx
mov ebx, 1
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 1
jmp 0x415fa9
xor ecx, ecx
mov edx, esi
cmp ebx, dword [esp + 0xc]
je 0x41603f
mov esi, ecx
mov word [eax + ebx*2], dx
inc ebx
mov dword [esp + 0x14], ebx
test edi, edi
je 0x415fd0
test si, si
jne 0x415f90
cmp edi, dword [esp]
je 0x415fd0
movzx edx, byte [edi]
test dl, dl
js 0x415ffa
inc edi
xor ecx, ecx
jmp 0x415f94
cmp word [esp + 4], 1
mov edi, dword [esp + 0xc]
jne 0x4160ca
xor edx, edx
cmp ebx, edi
mov edi, 0
mov ebp, 0
mov dword [esp + 4], 0
jne 0x415fa0
jmp 0x416062
movzx esi, byte [edi + 1]
mov ecx, edx
and ecx, 0x1f
and esi, 0x3f
cmp dl, 0xdf
jbe 0x416087
movzx ebp, byte [edi + 2]
shl esi, 6
and ebp, 0x3f
or ebp, esi
cmp dl, 0xf0
jb 0x416098
movzx edx, byte [edi + 3]
and ecx, 7
shl ebp, 6
add edi, 4
shl ecx, 0x12
and edx, 0x3f
or edx, ebp
or edx, ecx
mov ecx, edx
cmp ecx, 0xffff
jbe 0x41608f
jmp 0x4160aa
mov ebp, dword [esp]
mov eax, 0xffffffff
movzx esi, word [esp + 4]
sub ebp, edi
add ebp, 3
cmovb ebp, eax
shr ebp, 2
cmp cx, 1
sbb ebp, 0xffffffff
add ebp, esi
mov esi, ecx
mov dword [esp + 0x18], edx
mov edx, ebx
inc ebp
lea ecx, [esp + 0xc]
push 2
push 2
push ebp
call fcn.004f2050
mov edx, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x10]
jmp 0x415fa0
shl ecx, 6
add edi, 2
or ecx, esi
mov edx, ecx
xor ecx, ecx
jmp 0x415f94
shl ecx, 0xc
add edi, 3
or ebp, ecx
mov ecx, ebp
cmp ecx, 0xffff
jbe 0x41608f
lea edx, [ecx + 0xff0000]
and ecx, 0x3ff
shr edx, 0xa
or ecx, 0xdc00
or edx, 0xd800
jmp 0x415f94
mov esi, dword [esp + 0x10]
push 2
push esi
call sub.kernel32.dll_SetFileAttributesW
test eax, eax
je 0x4160fc
mov eax, dword [esp + 8]
mov byte [eax], 4
test edi, edi
je 0x4160f4
push esi
push 0
push dword [0x903200]
call dword [sym.imp.kernel32.dll_HeapFree]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esp + 8]
mov byte [ecx], 0
mov dword [ecx + 4], eax
test edi, edi
jne 0x4160e5
jmp 0x4160f4
shl eax, 0xc
add edi, 3
or ecx, eax
mov ebx, ecx
mov edx, dword [esp]
cmp ebx, 0xffff
jbe 0x415f1b
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
or ecx, 0xd800
mov esi, ebx
mov ebp, ecx
jmp 0x415f24
ud2