Function at 0x496ef0
Capabilities:
Check if file exists
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55df19
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x5c5244]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x248], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x24c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x244], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x23c], ecx
jb 0x496f77
mov eax, dword [eax]
mov dword [ebp - 0x240], eax
cmp ecx, 0x10
jae 0x496f8e
movups xmm0, xmmword [eax]
movups xmmword [edi], xmm0
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0xf
jmp 0x496fcf
mov esi, ecx
mov eax, SysReAllocString
or esi, 0xf
mov ecx, edi
cmp esi, eax
cmova esi, eax
lea eax, [esi + 1]
push eax
call fcn.00420c40
mov ecx, eax
mov eax, dword [ebp - 0x23c]
inc eax
mov dword [edi], ecx
push eax
push dword [ebp - 0x240]
push ecx
call fcn.004f2ee0
mov eax, dword [ebp - 0x23c]
add esp, 0xc
mov dword [edi + 0x10], eax
mov dword [edi + 0x14], esi
mov dword [ebp - 4], 0
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
mov dword [ebp - 0x244], 1
call fcn.004f39e0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push str.Ludashi_switch.json
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
je 0x4972c6
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
mov dword [ebp - 4], 1
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
je 0x4972b7
mov dword [ebp - 0x238], 0
mov byte [ebp - 4], 2
mov dword [ebp - 0x234], 0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x218]
push 0
push 0
push 0x80
push 3
push 1
push SysReAllocString
push eax
lea ecx, [ebp - 0x238]
call fcn.00494100
test eax, eax
mov eax, dword [ebp - 0x238]
js 0x49729e
lea ecx, [ebp - 0x250]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x254], esi
cmp esi, 0xffffffff
jne 0x4970f5
call fcn.0042f8b0
test eax, eax
js 0x497298
mov esi, dword [ebp - 0x254]
mov eax, dword [ebp - 0x250]
test eax, eax
jb 0x497298
ja 0x497298
test esi, esi
je 0x497298
test eax, eax
ja 0x497298
jb 0x497127
cmp esi, 0x500000
jae 0x497298
push 0
push esi
lea ecx, [ebp - 0x230]
call fcn.0042b360
cmp dword [ebp - 0x21c], 0x10
lea ecx, [ebp - 0x23c]
push 0
push ecx
lea eax, [ebp - 0x230]
mov dword [ebp - 0x23c], 0
cmovae eax, dword [ebp - 0x230]
push esi
push eax
push dword [ebp - 0x238]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x497177
call fcn.0042f8b0
mov esi, eax
jmp 0x49718f
xor ecx, ecx
mov eax, 0x80070026
cmp dword [ebp - 0x23c], esi
cmovne ecx, eax
mov dword [ebp - 0x240], ecx
mov esi, ecx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x238]
test eax, eax
je 0x4971ae
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x238], 0
test esi, esi
js 0x4972b7
cmp dword [ebp - 0x220], 0
je 0x4972b7
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.004eadc0
mov esi, eax
add esp, 4
test esi, esi
je 0x497241
mov eax, dword [ebp - 0x248]
cmp dword [eax + 0x14], 0x10
jb 0x4971f4
mov eax, dword [eax]
push eax
push esi
call fcn.004eacb0
mov ecx, eax
add esp, 8
test ecx, ecx
jne 0x497212
push esi
call fcn.004eaad0
add esp, 4
jmp 0x4972b7
mov eax, dword [ebp - 0x24c]
cmp dword [eax + 0x14], 0x10
jb 0x497220
mov eax, dword [eax]
push eax
push ecx
call fcn.004eacb0
add esp, 8
test eax, eax
je 0x497204
push dword [eax + 0x10]
mov ecx, edi
call fcn.00420f80
push esi
call fcn.004eaad0
add esp, 4
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x49727b
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x497271
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4972e3
push edx
push ecx
call fcn.004d9fad
add esp, 8
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
jmp 0x4972c6
mov eax, dword [ebp - 0x238]
mov byte [ebp - 4], 1
test eax, eax
je 0x4972b7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x238], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x230]
call fcn.00421360
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004da3bd
mov esp, ebp
pop ebp
ret
call fcn.004fe4a8
int3