Function at 0x4b3f20
Capabilities:
Get file attributes
Read file on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4cd537
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x648
push ebx
mov ebx, ecx
mov ecx, dword [esp + 0x660]
push ebp
push esi
push edi
mov eax, dword [ecx + 8]
mov edx, dword [ecx + 4]
push eax
push edx
call fcn.004bb450
mov esi, dword [esp + 0x668]
xor edi, edi
cmp esi, edi
mov dword [esp + 0x28], edi
jne 0x4b3f6d
xor eax, eax
jmp 0x4b4485
add ebx, 0x62750
push ebx
mov dword [esp + 0x34], ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x34], 1
mov dword [esp + 0x660], edi
mov word [esp + 0x3c], di
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x3e]
push str.favorder3.dat
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push esi
push 0x4df54c
lea eax, [esp + 0x48]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x14
lea ecx, [esp + 0x3c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ebp, eax
lea edx, [esp + 0x3c]
and ebp, 0xfffffffd
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea eax, [esp + 0x3c]
push 0x4e89fc
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4b4002
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b4485
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call edi
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov ebx, eax
call edi
push esi
push 1
lea ecx, [esp + 0x50]
push 4
push ecx
mov dword [esp + 0x58], 0
call dword [sym.imp.MSVCRT.dll_fread]
mov eax, dword [esp + 0x58]
add esp, 0x2c
cmp eax, 1
je 0x4b406e
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
or ebp, 2
lea edx, [esp + 0x3c]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b4485
mov ecx, 0x104
xor eax, eax
lea edi, [esp + 0x244]
push esi
rep stosd dword es:[edi], eax
push 1
lea ecx, [esp + 0x24c]
push 0x414
push ecx
mov dword [esp + 0x664], 0xffffffff
call dword [sym.imp.MSVCRT.dll_fread]
lea edi, [ebx + 1]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, eax
add esp, 0x14
test edx, edx
mov dword [esp + 0x24], edx
jne 0x4b40d1
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [esp + 0x34]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b4485
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push esi
and ecx, 3
push ebx
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x2c]
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
add ebx, 0xfffffbe8
cmp eax, ebx
push esi
je 0x4b4135
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
or ebp, 2
lea eax, [esp + 0x3c]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call fcn.00495c27
mov ecx, dword [esp + 0x34]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b4485
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
or ebp, 2
lea edx, [esp + 0x3c]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [0x4de108]
mov ecx, edi
shr ecx, 0x10
mov dword [esp + 0x10], eax
jne 0x4b4170
mov eax, edi
lea ecx, [esp + 0x10]
and eax, 0xffff
push eax
call fcn.00405630
jmp 0x4b41a6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4b41a6
push esi
lea ecx, [esp + 0x14]
call fcn.00405350
test eax, eax
je 0x4b41a6
lea ecx, [esi + esi]
mov esi, edi
mov edi, dword [esp + 0x10]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
xor ebx, ebx
mov byte [esp + 0x660], 1
mov eax, dword [ecx - 8]
test eax, eax
jge 0x4b41c0
or eax, 0xffffffff
jmp 0x4b41de
push 0x4efdfc
push ecx
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x4b41d8
or eax, 0xffffffff
jmp 0x4b41de
sub eax, dword [esp + 0x10]
sar eax, 1
test eax, eax
mov esi, eax
jl 0x4b4464
jmp 0x4b41f2
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x38]
mov eax, esi
lea ecx, [esp + 0x1c]
sub eax, ebx
push eax
push ebx
push ecx
lea ecx, [esp + 0x1c]
call fcn.004420c0
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push 0x4efdfc
mov byte [esp + 0x664], 2
call ebx
mov ecx, dword [esp + 0x14]
add eax, esi
add esp, 4
mov dword [esp + 0x38], eax
cmp eax, dword [ecx - 8]
jle 0x4b4237
mov dword [esp + 0x20], 0xffffffff
jmp 0x4b4261
lea eax, [ecx + eax*2]
push 0x4efdfc
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x4b4257
mov dword [esp + 0x20], 0xffffffff
jmp 0x4b4261
sub eax, dword [esp + 0x10]
sar eax, 1
mov dword [esp + 0x20], eax
push 0
push 0x4efdf4
lea ecx, [esp + 0x24]
call fcn.00442240
mov esi, eax
lea edx, [esp + 0x18]
push esi
push 0
push edx
lea ecx, [esp + 0x28]
call fcn.004420c0
push 0x4efdf4
mov byte [esp + 0x664], 3
call ebx
add esp, 4
add esi, eax
mov eax, 0
lea ecx, [esp + 0x14]
sets al
dec eax
and eax, esi
push eax
push esi
push ecx
lea ecx, [esp + 0x28]
call fcn.004420c0
mov eax, dword [esp + 0x18]
mov ecx, 1
mov byte [esp + 0x660], 4
mov edx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp edx, ecx
jg 0x4b42d3
cmp dword [eax - 4], ecx
jge 0x4b4318
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x4b42dc
mov ecx, ebx
push ecx
lea ecx, [esp + 0x1c]
call fcn.00405350
test eax, eax
je 0x4b4318
mov edi, dword [esp + 0x18]
lea ecx, [ebx + ebx + 2]
mov edx, ecx
lea esi, [ebp + 0xc]
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]
mov eax, dword [esp + 0x1c]
mov dword [eax - 8], ebx
call fcn.0041d8d0
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x248]
push 0x4de3ac
push ecx
call dword [sym.imp.MSVCRT.dll_swprintf]
mov eax, dword [esp + 0x20]
mov ecx, 1
add esp, 0xc
mov edx, dword [eax - 0xc]
lea ebp, [eax - 0xc]
cmp edx, ecx
jg 0x4b4347
cmp dword [eax - 4], ecx
jge 0x4b438c
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x4b4350
mov ecx, ebx
push ecx
lea ecx, [esp + 0x18]
call fcn.00405350
test eax, eax
je 0x4b438c
mov edi, dword [esp + 0x14]
lea ecx, [ebx + ebx + 2]
mov edx, ecx
lea esi, [ebp + 0xc]
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]
mov eax, dword [esp + 0x18]
mov dword [eax - 8], ebx
call fcn.0041d8d0
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
push eax
call dword [sym.imp.MSVCRT.dll__wtoi]
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x654], eax
jle 0x4b43a9
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x66c]
lea edx, [esp + 0x244]
push edx
mov eax, dword [ecx + 8]
push eax
call fcn.004bb1e0
mov eax, dword [esp + 0x14]
mov edx, dword [0x4de090]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b43f4
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b43fa
mov edx, dword [esp + 0x14]
lea eax, [edx - 0xc]
push eax
call fcn.00495c27
add esp, 4
jmp 0x4b43fa
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x18]
mov edx, dword [0x4de090]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b4425
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b4425
mov edx, dword [esp + 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.00495c27
add esp, 4
mov eax, dword [esp + 0x1c]
mov edx, dword [0x4de090]
mov byte [esp + 0x660], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b4458
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b4458
mov edx, dword [esp + 0x1c]
add edx, 0xfffffff4
push edx
call fcn.00495c27
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
jge 0x4b41ea
push edi
call fcn.00495c27
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00405480
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x658]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x654
ret 8