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

Disassembly:
push 0xffffffffffffffff
push 0x4354d7
mov eax, dword fs:[0]
push eax
sub esp, 0x370
mov eax, dword [0x4451b0]
xor eax, esp
mov dword [esp + 0x368], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4451b0]
xor eax, esp
push eax
lea eax, [esp + 0x384]
mov dword fs:[0], eax
mov eax, dword [esp + 0x394]
push 0x208
xor ebx, ebx
lea ecx, [esp + 0x178]
push ebx
push ecx
mov dword [esp + 0x24], eax
call fcn.0041c7f0
add esp, 0xc
push ebx
push 0x1a
lea edx, [esp + 0x17c]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str.Ludashigame.json
lea eax, [esp + 0x178]
push eax
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x174]
push ecx
call edi
test eax, eax
jne 0x40f514
mov ebp, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [esp + 0x174]
push edx
call ebp
lea eax, [esp + 0x174]
push eax
call ebp
push str.lockhomepagegame.json
lea ecx, [esp + 0x178]
push ecx
call esi
lea edx, [esp + 0x174]
push edx
call edi
test eax, eax
je 0x40f753
xor eax, eax
mov dword [esp + 0x154], 0xf
mov dword [esp + 0x150], eax
mov byte [esp + 0x140], bl
lea ecx, [esp + 0x13c]
lea edx, [esp + 0x174]
mov dword [esp + 0x38c], eax
call fcn.0040c8c0
test eax, eax
je 0x40f739
cmp dword [esp + 0x150], 0
je 0x40f739
cmp dword [esp + 0x154], 0x10
mov edi, dword [esp + 0x140]
jae 0x40f577
lea edi, [esp + 0x140]
call fcn.00410c40
mov ebx, eax
test ebx, ebx
je 0x40f6ee
mov eax, dword [ebx + 8]
xor ebp, ebp
test eax, eax
je 0x40f597
nop
mov eax, dword [eax]
inc ebp
test eax, eax
jne 0x40f590
xor esi, esi
test ebp, ebp
jle 0x40f6e5
push 0
push 0x43a588
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
call fcn.00401f10
lea eax, [esp + 0x1c]
push eax
push esi
mov ecx, ebx
lea edi, [esp + 0x160]
mov byte [esp + 0x394], 1
call fcn.00410730
add esp, 8
mov edi, 0x10
mov byte [esp + 0x38c], 3
cmp dword [esp + 0x34], edi
jb 0x40f605
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0041a784
add esp, 4
cmp dword [esp + 0x16c], 0
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], 0
mov byte [esp + 0x20], 0
je 0x40f6ba
mov eax, dword [esp + 0x15c]
cmp dword [esp + 0x170], edi
jae 0x40f63f
lea eax, [esp + 0x15c]
lea edx, [esp + 0x3c]
push eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], edx
call fcn.0040f7e0
lea eax, [esp + 0x14]
mov byte [esp + 0x38c], 4
mov ecx, dword [esp + 0x38]
push eax
call fcn.004029c0
mov byte [esp + 0x38c], 6
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x3c]
cmp eax, ecx
je 0x40f684
push eax
call fcn.0041b097
add esp, 4
mov edi, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
call fcn.0040d180
mov byte [esp + 0x38c], 3
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f6ba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x38c], 0
cmp dword [esp + 0x170], 0x10
jb 0x40f6dc
mov ecx, dword [esp + 0x15c]
push ecx
call fcn.0041a784
add esp, 4
inc esi
cmp esi, ebp
jl 0x40f5a1
push ebx
call fcn.00410910
add esp, 4
cmp dword [esp + 0x154], 0x10
mov esi, 1
jb 0x40f70d
mov edx, dword [esp + 0x140]
push edx
call fcn.0041a784
add esp, 4
mov eax, esi
mov ecx, dword [esp + 0x384]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x368]
xor ecx, esp
call fcn.0041a78f
add esp, 0x37c
ret 4
cmp dword [esp + 0x154], 0x10
jb 0x40f753
mov eax, dword [esp + 0x140]
push eax
call fcn.0041a784
add esp, 4
mov eax, ebx
jmp 0x40f70f