Function at 0x408220
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x40c0
call fcn.00445360
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push edx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0xc], 0x402470
mov dword [ebp - 8], 0x402490
mov dword [ebp - 0x38], 0x402470
mov dword [ebp - 0x34], 0x402490
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
jne 0x408283
call esi
test eax, eax
jne 0x4085bf
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0x403340
mov dword [ebp - 0x40], 0x403360
mov dword [ebp - 0x40bc], 0x405d10
mov dword [ebp - 0x40b8], 0x405d70
mov dword [ebp - 0x40b4], 0x405d80
mov dword [ebp - 0x40b0], 0x405dd0
mov dword [ebp - 0x40ac], eax
mov dword [ebp - 0x40a4], edi
mov dword [ebp - 0x40a8], edi
call fcn.00402530
lea ecx, [ebp - 0x9c]
call fcn.004035f0
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xc]
push eax
lea edx, [ebp - 0x40bc]
call fcn.00405730
mov ebx, eax
add esp, 8
mov dword [ebp - 0x14], ebx
test ebx, ebx
je 0x408313
lea edx, [ebp - 0xc]
lea ecx, [ebp - 0x9c]
call fcn.00403660
test ebx, ebx
jne 0x408516
xor edx, edx
mov dword [ebp - 0x48], 0xffffffff
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x80], edx
jbe 0x408509
mov edi, edi
mov eax, edx
shl eax, 5
add eax, dword [ebp - 0x8c]
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x10], 0
mov esi, dword [eax + edx*4 + 4]
sub esi, dword [eax + edx*4]
cmp esi, dword [ebp - 0x2c]
jbe 0x408385
push edi
call fcn.0043b8ac
add esp, 4
mov dword [ebp - 0x2c], esi
add esi, esi
je 0x4084f5
push esi
call fcn.0043b8e4
mov edi, eax
add esp, 4
test edi, edi
je 0x4084f7
mov edx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x5c]
mov ebx, dword [ecx + edx*4]
mov esi, dword [ecx + edx*4 + 4]
sub esi, ebx
test edi, edi
je 0x4083b3
mov eax, dword [ebp - 0x58]
lea ebx, [eax + ebx*2]
test esi, esi
je 0x4083b3
mov ecx, edi
sub ebx, edi
mov ax, word [ebx + ecx]
mov word [ecx], ax
lea ecx, [ecx + 2]
dec esi
jne 0x4083a3
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x30]
cmp byte [eax + 0x19], 0
je 0x4083cb
push 0x457f54
call fcn.0043bfd9
add esp, 4
jmp 0x408409
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x48]
push eax
push edx
lea edx, [ebp - 0x40bc]
lea ecx, [ebp - 0x9c]
call fcn.00405a50
mov ebx, eax
add esp, 0x20
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x408503
xor ebx, ebx
cmp word [edi], bx
je 0x40843a
mov esi, edi
cmp word [esi], 0x2f
jne 0x40842f
mov ecx, dword [ebp - 0x24]
xor eax, eax
mov edx, edi
mov word [esi], ax
call fcn.00408060
mov eax, 0x5c
mov word [esi], ax
inc ebx
cmp word [edi + ebx*2], 0
lea esi, [edi + ebx*2]
jne 0x408412
mov ebx, dword [ebp - 0x30]
cmp byte [ebx + 0x19], 0
je 0x408452
mov ecx, dword [ebp - 0x24]
mov edx, edi
call fcn.00408060
jmp 0x4084d3
mov edx, dword [ebp - 0x24]
push edi
lea ecx, [ebp - 0x20]
call fcn.00408140
add esp, 4
test eax, eax
je 0x40846f
mov ebx, 0xb
mov dword [ebp - 0x14], ebx
jmp 0x4084e3
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x10]
lea eax, [ebp - 0x10]
lea edx, [edx + ecx]
push eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], esi
call fcn.00403230
add esp, 4
test eax, eax
jne 0x4084fe
cmp dword [ebp - 0x10], esi
jne 0x4084fe
mov eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4084c3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4084bc
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x4084c3
mov ebx, 0xb
jmp 0x408509
mov dword [ebp - 0x20], 0xffffffff
cmp byte [ebx + 0x1d], 0
je 0x4084d3
push dword [ebx + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x457f58
call fcn.0043bfd9
mov ebx, dword [ebp - 0x14]
add esp, 4
mov edx, dword [ebp - 0x18]
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0x80]
jb 0x408330
jmp 0x408503
xor edi, edi
mov ebx, 2
jmp 0x408503
mov ebx, 0xb
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x1c]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
add esp, 8
push dword [ebp - 0x6c]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
push dword [ebp - 0x68]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
push dword [ebp - 0x64]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
push dword [ebp - 0x60]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
push dword [ebp - 0x5c]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
push dword [ebp - 0x58]
lea eax, [ebp - 0xc]
push eax
call dword [ebp - 8]
lea edx, [ebp - 0xc]
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
call fcn.00403540
push edi
call fcn.0043b8ac
mov eax, dword [ebp - 0x3c]
add esp, 0x34
cmp eax, 0xffffffff
je 0x408595
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40858e
call esi
jmp 0x408595
mov dword [ebp - 0x3c], 0xffffffff
test ebx, ebx
jne 0x4085a2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 4
je 0x4085bf
cmp ebx, 2
je 0x4085bf
cmp ebx, 3
je 0x4085bf
push ebx
push 0x457f5c
call fcn.0043bfd9
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret