Function at 0x458840
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a1c6
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x5c9ea4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
lea eax, [ebp + 8]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x30]
call fcn.0044ba20
mov byte [ebp - 4], 1
lea eax, [ebp - 0x30]
cmp dword [ebp - 0x1c], 8
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4588f0
call esi
cmp eax, 2
jne 0x4588eb
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x458b62
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458b58
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
jmp 0x458b58
cmp eax, 3
je 0x4588ae
test bl, 1
je 0x458932
cmp dword [ebp - 0x1c], 8
lea ecx, [ebp - 0x30]
mov eax, ebx
cmovae ecx, dword [ebp - 0x30]
xor eax, 1
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
jne 0x458932
call esi
cmp dword [ebp - 0x1c], 8
lea ecx, [ebp - 0x30]
push eax
cmovae ecx, dword [ebp - 0x30]
push ecx
push str.____Cant_remove_R_O_attribute__file__s__Code__lu
call fcn.00459870
add esp, 0xc
jmp 0x4588ae
test ebx, 0x400
jne 0x4588ae
cmp dword [ebp - 0x1c], 8
lea eax, [ebp - 0x30]
push 0
cmovae eax, dword [ebp - 0x30]
push 0
push 3
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov byte [ebp - 4], 0
mov esi, eax
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x45899f
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458995
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
xor eax, eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
cmp esi, 0xffffffff
je 0x458b62
push 0x48
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.0052fbd0
add esp, 0xc
lea eax, [ebp + 8]
lea ecx, [ebp - 0x78]
push esi
push eax
call fcn.0044cb30
lea ecx, [ebp - 0x78]
mov byte [ebp - 4], 3
call fcn.0044ce80
test al, al
jne 0x458bba
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x90]
call fcn.0044ba20
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x90]
cmp dword [ebp - 0x7c], 8
lea eax, [ebp + 8]
cmovae ecx, dword [ebp - 0x90]
cmp dword [ebp + 0x1c], 8
push ecx
cmovae eax, dword [ebp + 8]
push eax
push str.____Failed_to_decrypt__s__Error___s
call fcn.00459870
mov byte [ebp - 4], 3
add esp, 0xc
mov edx, dword [ebp - 0x7c]
cmp edx, 8
jb 0x458a6b
mov ecx, dword [ebp - 0x90]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458a61
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x78]
cmp eax, 0xffffffff
je 0x458a8e
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x78], 0xffffffff
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x458ac8
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458abe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
mov edx, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
cmp edx, 8
jb 0x458b16
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458b0c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], ax
mov byte [ebp - 4], 5
mov edi, dword [ebp - 0x70]
test edi, edi
je 0x458b62
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x458b62
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x458b62
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
jmp 0x458b62
push edx
push ecx
call fcn.00518414
add esp, 8
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x458b9c
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458b92
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005181d3
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x78]
cmp eax, 0xffffffff
je 0x458be0
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x78]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x78], 0xffffffff
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x458c1a
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458c10
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
mov edx, dword [ebp - 0x4c]
xor eax, eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 7
mov word [ebp - 0x48], ax
cmp edx, 8
jb 0x458c68
mov ecx, dword [ebp - 0x60]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458c5e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
xor eax, eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 7
mov word [ebp - 0x60], ax
mov byte [ebp - 4], 0xa
mov edi, dword [ebp - 0x70]
test edi, edi
je 0x458ca8
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x458ca8
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x458ca8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x458ce2
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x458cd8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x458ebc
push edx
push ecx
call fcn.00518414
add esp, 8
mov al, 1
jmp 0x458b9e
call fcn.00533a91
int3