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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55aca3
mov eax, dword fs:[0]
push eax
sub esp, 0x10c
mov eax, dword [0x5caea4]
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.0044baa0
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 0x459060
call esi
cmp eax, 2
jne 0x45905b
mov edx, dword [ebp - 0x1c]
cmp edx, 8
jb 0x4592ff
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4592f5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
jmp 0x4592f5
cmp eax, 3
je 0x45901e
test bl, 1
je 0x4590a2
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 0x4590a2
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.0045a000
add esp, 0xc
jmp 0x45901e
test ebx, 0x400
jne 0x45901e
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 0x45910f
mov ecx, dword [ebp - 0x30]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x459105
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
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 0x4592ff
push 0xc8
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.00530530
add esp, 0xc
lea eax, [ebp + 8]
lea ecx, [ebp - 0x110]
push esi
push eax
call fcn.0044cdd0
lea ecx, [ebp - 0x110]
mov byte [ebp - 4], 3
call fcn.0044d2a0
test al, al
jne 0x459357
lea eax, [ebp - 0xe0]
push eax
lea ecx, [ebp - 0x48]
call fcn.0044baa0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x48]
cmp dword [ebp - 0x34], 8
lea eax, [ebp + 8]
cmovae ecx, dword [ebp - 0x48]
cmp dword [ebp + 0x1c], 8
push ecx
cmovae eax, dword [ebp + 8]
push eax
push str.____Failed_to_decrypt__s__Error___s
call fcn.0045a000
mov byte [ebp - 4], 3
add esp, 0xc
mov edx, dword [ebp - 0x34]
cmp edx, 8
jb 0x4591de
mov ecx, dword [ebp - 0x48]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4591d4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x110]
cmp eax, 0xffffffff
je 0x45920a
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x110]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x110], 0xffffffff
mov edx, dword [ebp - 0xcc]
cmp edx, 8
jb 0x45924a
mov ecx, dword [ebp - 0xe0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x459240
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
mov edx, dword [ebp - 0xe4]
xor eax, eax
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 7
mov word [ebp - 0xe0], ax
cmp edx, 8
jb 0x4592a7
mov ecx, dword [ebp - 0xf8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45929d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
xor eax, eax
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xe4], 7
mov word [ebp - 0xf8], ax
mov byte [ebp - 4], 5
mov edi, dword [ebp - 0x108]
test edi, edi
je 0x4592ff
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x4592ff
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x4592ff
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
jmp 0x4592ff
push edx
push ecx
call fcn.00518d68
add esp, 8
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x459339
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45932f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
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.00518b27
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x110]
cmp eax, 0xffffffff
je 0x459386
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0x110]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x110], 0xffffffff
mov edx, dword [ebp - 0xcc]
cmp edx, 8
jb 0x4593c6
mov ecx, dword [ebp - 0xe0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4593bc
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
mov edx, dword [ebp - 0xe4]
xor eax, eax
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 7
mov word [ebp - 0xe0], ax
cmp edx, 8
jb 0x459423
mov ecx, dword [ebp - 0xf8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x459419
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
xor eax, eax
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xe4], 7
mov word [ebp - 0xf8], ax
mov byte [ebp - 4], 0xa
mov edi, dword [ebp - 0x108]
test edi, edi
je 0x45946f
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x45946f
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x45946f
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x4594a9
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x45949f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x45969c
push edx
push ecx
call fcn.00518d68
add esp, 8
mov al, 1
jmp 0x45933b
call fcn.005343f1
int3