Function at 0x1004ee60
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100aea2d
mov eax, dword fs:[0]
push eax
sub esp, 0x238
mov eax, dword [0x100dbc1c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
mov ecx, edi
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x23c], 0
call fcn.1001d000
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 0
push 0
push eax
mov dword [ebp - 0x23c], 1
call fcn.100837f0
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]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1004efb9
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 0xf
mov byte [ebp - 0x230], 0
lea eax, [ebp - 0x230]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.1003d220
add esp, 8
test eax, eax
je 0x1004efae
cmp dword [ebp - 0x220], 0
je 0x1004efae
cmp dword [ebp - 0x21c], 0x10
lea eax, [ebp - 0x230]
cmovae eax, dword [ebp - 0x230]
push eax
call fcn.10079150
add esp, 4
mov dword [ebp - 0x238], eax
test eax, eax
je 0x1004f123
cmp dword [esi + 0x14], 0x10
jb 0x1004ef92
mov esi, dword [esi]
push esi
push eax
call fcn.10079090
add esp, 8
test eax, eax
jne 0x1004efd9
push dword [ebp - 0x238]
call fcn.10078fe0
add esp, 4
lea ecx, [ebp - 0x230]
call fcn.10011940
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100763b4
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebx + 0x14], 0x10
jb 0x1004efe1
mov ebx, dword [ebx]
push ebx
push eax
call fcn.10079090
add esp, 8
test eax, eax
je 0x1004efa0
mov edx, dword [eax + 0x10]
mov esi, edx
mov dword [ebp - 0x240], edx
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x1004f000
sub esi, ecx
mov ecx, dword [edi + 0x14]
mov dword [ebp - 0x244], ecx
cmp esi, ecx
ja 0x1004f036
mov ebx, edi
cmp ecx, 0x10
jb 0x1004f01f
mov ebx, dword [edi]
push esi
push edx
push ebx
mov dword [edi + 0x10], esi
call fcn.10083270
add esp, 0xc
mov byte [ebx + esi], 0
jmp 0x1004f115
cmp esi, 0x7fffffff
ja 0x1004f162
mov ebx, esi
or ebx, 0xf
cmp ebx, 0x7fffffff
jbe 0x1004f056
mov ebx, SysReAllocString
jmp 0x1004f074
mov edx, ecx
mov eax, SysReAllocString
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x1004f06c
mov ebx, SysReAllocString
jmp 0x1004f074
lea eax, [edx + ecx]
cmp ebx, eax
cmovb ebx, eax
lea ecx, [ebx + 1]
cmp ecx, 0x1000
jb 0x1004f0a8
lea eax, [ecx + 0x23]
or edx, 0xffffffff
cmp eax, ecx
cmovbe eax, edx
push eax
call fcn.10076018
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x1004f167
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x1004f0b9
test ecx, ecx
je 0x1004f0b7
push ecx
call fcn.10076018
add esp, 4
jmp 0x1004f0b9
xor eax, eax
push esi
push dword [ebp - 0x240]
mov dword [ebp - 0x234], eax
push eax
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], ebx
call fcn.10082cf0
mov ebx, dword [ebp - 0x234]
add esp, 0xc
mov eax, dword [ebp - 0x244]
mov byte [ebx + esi], 0
cmp eax, 0x10
jb 0x1004f113
lea ecx, [eax + 1]
mov eax, dword [edi]
cmp ecx, 0x1000
jb 0x1004f109
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004f167
mov eax, edx
push ecx
push eax
call fcn.10076048
add esp, 8
mov dword [edi], ebx
push dword [ebp - 0x238]
call fcn.10078fe0
add esp, 4
mov edx, dword [ebp - 0x21c]
cmp edx, 0x10
jb 0x1004efb9
mov ecx, dword [ebp - 0x230]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1004f153
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1004f167
push edx
push ecx
call fcn.10076048
add esp, 8
jmp 0x1004efb9
call fcn.10013ff0
call fcn.10087516
int3