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

Disassembly:
push 0xffffffffffffffff
push 0x4d2397
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.004c0120
mov esi, dword [esp + 0x668]
xor edi, edi
cmp esi, edi
mov dword [esp + 0x28], edi
jne 0x4b93bd
xor eax, eax
jmp 0x4b98dd
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 0x4e43d8
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 0x4edc1c
push eax
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x4b9452
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b98dd
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 0x4b94be
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 0x4b98dd
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 0x4b9521
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 0x4b98dd
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 0x4b9585
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.0049bb1b
mov ecx, dword [esp + 0x34]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4b98dd
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 [0x4e30fc]
mov ecx, edi
shr ecx, 0x10
mov dword [esp + 0x10], eax
jne 0x4b95c0
mov eax, edi
lea ecx, [esp + 0x10]
and eax, 0xffff
push eax
call fcn.00405590
jmp 0x4b95f6
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
test esi, esi
je 0x4b95f6
push esi
lea ecx, [esp + 0x14]
call fcn.004052b0
test eax, eax
je 0x4b95f6
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 0x4b9610
or eax, 0xffffffff
jmp 0x4b962e
push 0x4f513c
push ecx
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x4b9628
or eax, 0xffffffff
jmp 0x4b962e
sub eax, dword [esp + 0x10]
sar eax, 1
test eax, eax
mov esi, eax
jl 0x4b98b4
jmp 0x4b9642
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.00446be0
mov ebx, dword [sym.imp.MSVCRT.dll_wcslen]
push 0x4f513c
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 0x4b9687
mov dword [esp + 0x20], 0xffffffff
jmp 0x4b96b1
lea eax, [ecx + eax*2]
push 0x4f513c
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x4b96a7
mov dword [esp + 0x20], 0xffffffff
jmp 0x4b96b1
sub eax, dword [esp + 0x10]
sar eax, 1
mov dword [esp + 0x20], eax
push 0
push 0x4f5134
lea ecx, [esp + 0x24]
call fcn.00446d60
mov esi, eax
lea edx, [esp + 0x18]
push esi
push 0
push edx
lea ecx, [esp + 0x28]
call fcn.00446be0
push 0x4f5134
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.00446be0
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 0x4b9723
cmp dword [eax - 4], ecx
jge 0x4b9768
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x4b972c
mov ecx, ebx
push ecx
lea ecx, [esp + 0x1c]
call fcn.004052b0
test eax, eax
je 0x4b9768
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.0041f870
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x248]
push 0x4e33c0
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 0x4b9797
cmp dword [eax - 4], ecx
jge 0x4b97dc
mov ebx, dword [eax - 8]
cmp ebx, ecx
jle 0x4b97a0
mov ecx, ebx
push ecx
lea ecx, [esp + 0x18]
call fcn.004052b0
test eax, eax
je 0x4b97dc
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.0041f870
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 0x4b97f9
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.004bfeb0
mov eax, dword [esp + 0x14]
mov edx, dword [0x4e3090]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b9844
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b984a
mov edx, dword [esp + 0x14]
lea eax, [edx - 0xc]
push eax
call fcn.0049bb1b
add esp, 4
jmp 0x4b984a
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x18]
mov edx, dword [0x4e3090]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b9875
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b9875
mov edx, dword [esp + 0x18]
lea eax, [edx - 0xc]
push eax
call fcn.0049bb1b
add esp, 4
mov eax, dword [esp + 0x1c]
mov edx, dword [0x4e3090]
mov byte [esp + 0x660], 1
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x4b98a8
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x4b98a8
mov edx, dword [esp + 0x1c]
lea eax, [edx - 0xc]
push eax
call fcn.0049bb1b
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
jge 0x4b963a
push edi
call fcn.0049bb1b
add esp, 4
lea ecx, [esp + 0x10]
mov byte [esp + 0x660], 0
call fcn.004053e0
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