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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4d23bb
push eax
mov dword fs:[0], esp
sub esp, 0xe58
push ebx
mov ebx, dword [esp + 0xe6c]
push ebp
push esi
xor esi, esi
push edi
cmp ebx, esi
mov ebp, ecx
je 0x4b9d62
lea eax, [ebp + 0x62750]
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x20], 1
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x236]
mov word [esp + 0x234], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x234]
mov dword [esp + 0xe70], esi
test eax, eax
je 0x4b9b11
mov eax, dword [ebp + 0x14]
mov esi, 2
cmp eax, esi
jne 0x4b9b11
cmp ebx, esi
jne 0x4b99b6
lea ecx, [ebp + 0x3d0]
lea edx, [esp + 0x234]
push ecx
push 0x4e33c0
push 0x103
push edx
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
jmp 0x4b9b11
push ebx
mov ecx, ebp
call fcn.004b6b60
cmp eax, 0xffffffff
je 0x4b9b11
mov edx, dword [ebp + 0x60c]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4]
shl eax, 7
add eax, edx
xor edx, edx
mov dword [esp + 0x10], edx
cmp dword [eax + 4], esi
jne 0x4b99eb
mov dword [esp + 0x10], 1
mov ebx, dword [eax]
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x84e]
mov word [esp + 0x84c], dx
cmp ebx, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
je 0x4b9a99
push ebx
mov ecx, ebp
call fcn.004b6b60
cmp eax, 0xffffffff
je 0x4b9b11
mov edx, dword [ebp + 0x60c]
lea eax, [eax + eax*4]
mov ecx, 0x81
lea edi, [esp + 0x43e]
lea esi, [eax + eax*4]
xor eax, eax
shl esi, 7
add esi, edx
mov ebx, dword [esi + 8]
mov word [esp + 0x43c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [sym.imp.MSVCRT.dll_swprintf]
lea eax, [esp + 0x84c]
push eax
lea ecx, [esp + 0x440]
push 0x4e33c0
push ecx
call edi
add esp, 0xc
lea edx, [esp + 0x43c]
add esi, 0x48
lea eax, [esp + 0x84c]
push edx
push esi
push str._s_s
push eax
call edi
add esp, 0x10
cmp ebx, 2
jne 0x4b9a0f
xor edx, edx
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x43e]
mov word [esp + 0x43c], dx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x43c]
push 0x104
push ecx
stosw word es:[edi], ax
call fcn.004bc7e0
lea edx, [esp + 0x444]
push 0
push edx
call fcn.004ca180
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
lea eax, [esp + 0x84c]
lea ecx, [esp + 0x43c]
push eax
push ecx
je 0x4b9af6
push 0x4e37b8
jmp 0x4b9afb
push str._s_s.url
lea edx, [esp + 0x240]
push 0x103
push edx
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x14
lea eax, [esp + 0x234]
push 1
push eax
call fcn.004ca180
xor esi, esi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x36]
mov word [esp + 0x34], si
add esp, 8
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x234]
push str.favorder3.dat
push ecx
push 0x4e37b8
lea edx, [esp + 0x38]
push 0x103
push edx
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x14
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [esp + 0x2c]
push 0x20
push ecx
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, dword [sym.imp.MSVCRT.dll__wfopen]
lea edx, [esp + 0x2c]
push 0x4edc1c
push edx
mov dword [esp + 0x1c], esi
call ebx
mov edi, eax
add esp, 8
cmp edi, esi
je 0x4b9bc0
push edi
push 1
lea eax, [esp + 0x1c]
push 4
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x28]
add esp, 0x14
cmp eax, 1
je 0x4b9bc0
mov dword [esp + 0x14], esi
cmp dword [esp + 0xe7c], esi
je 0x4b9bd1
mov dword [esp + 0x14], 1
lea ecx, [esp + 0x2c]
push 0x4edc3c
push ecx
call ebx
mov ebx, eax
add esp, 8
cmp ebx, esi
jne 0x4b9bf0
mov edx, dword [esp + 0x1c]
push edx
jmp 0x4b9d5c
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push ebx
push 1
lea eax, [esp + 0x1c]
push 4
push eax
call esi
mov ecx, 0x104
xor eax, eax
lea edi, [esp + 0xa64]
push ebx
rep stosd dword es:[edi], eax
push 1
lea ecx, [esp + 0xa6c]
push 0x414
push ecx
mov dword [esp + 0xe84], 0xffffffff
call esi
mov ecx, dword [ebp + 0x624]
xor esi, esi
add esp, 0x20
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x10], esi
jle 0x4b9d3b
mov dword [esp + 0x18], esi
mov edx, dword [ebp + 0x60c]
add esi, edx
mov edx, dword [esp + 0xe78]
cmp dword [esi + 8], edx
jne 0x4b9d12
mov eax, dword [esi + 4]
mov dword [esp + 0x28], 1
cmp eax, 2
jne 0x4b9c87
lea eax, [esi + 0x48]
lea ecx, [esp + 0xa54]
push eax
push 0x4e33c0
push ecx
jmp 0x4b9c98
lea edx, [esi + 0x48]
lea eax, [esp + 0xa54]
push edx
push str._s.url
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
mov esi, dword [esi + 0xc]
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x44a]
mov word [esp + 0x448], 0
add esp, 0xc
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xa54]
push esi
push ecx
lea edx, [esp + 0x444]
push str._s_d::
push edx
mov dword [esp + 0xe74], esi
stosw word es:[edi], ax
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0x10
lea eax, [esp + 0x43c]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x440]
push eax
push 2
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov eax, dword [esp + 0x38]
add esp, 0x10
jmp 0x4b9d16
test eax, eax
jne 0x4b9d3b
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
mov edx, dword [ebp + 0x624]
inc ecx
add esi, 0xc80
cmp ecx, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], esi
jl 0x4b9c4c
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x28]
add esp, 4
or al, 2
lea edx, [esp + 0x2c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0xe68]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xe64
ret 8