Function at 0x40f7a0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
lea ebp, [esp - 0x404]
sub esp, 0x404
push 0xffffffffffffffff
push 0x57e35b
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x5cca0c]
xor eax, ebp
mov dword [ebp + 0x400], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x40c]
mov dword [ebp - 0x14], eax
xor ebx, ebx
push 0x1fe
lea ecx, [ebp + 0x202]
push ebx
push ecx
mov dword [ebp - 4], ebx
mov word [ebp + 0x200], bx
call fcn.00552500
push 0x1fe
lea edx, [ebp + 2]
push ebx
push edx
mov word [ebp], bx
call fcn.00552500
add esp, 0x18
push 0x100
lea eax, [ebp + 0x200]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp + 0x200]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp + 0x200]
push edx
lea eax, [ebp]
push str._sgamelogo
push eax
call fcn.00403f50
add esp, 0xc
lea ecx, [ebp]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40f88a
push ebx
lea edx, [ebp]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40f88a
cmp dword [ebp + 0x428], 0x10
jb 0x40f883
mov eax, dword [ebp + 0x414]
push eax
call fcn.0055215c
add esp, 4
xor al, al
jmp 0x40f9df
push 0x10
mov esi, 0xf
push str.XYQuickLink.dll
lea ecx, [ebp - 0x30]
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.0040c1c0
lea ecx, [ebp - 0x68]
push ecx
mov byte [ebp - 4], 1
call fcn.004b33f0
lea edx, [ebp - 0x30]
push edx
push eax
lea eax, [ebp - 0x4c]
push eax
mov byte [ebp - 4], 2
call fcn.0040cec0
add esp, 0x10
cmp dword [eax + 0x18], 0x10
jb 0x40f8d7
mov edi, dword [eax + 4]
jmp 0x40f8da
lea edi, [eax + 4]
cmp edi, ebx
jne 0x40f8e2
xor edi, edi
jmp 0x40f918
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
add esi, 1
cmp esi, 0x3fffffff
jle 0x40f8fa
xor edi, edi
jmp 0x40f913
lea eax, [esi + esi]
call fcn.00553150
mov eax, esp
push 0x3a8
push esi
push edi
push eax
call fcn.00401140
mov edi, eax
mov esi, 0xf
cmp dword [ebp - 0x34], 0x10
jb 0x40f92a
mov ecx, dword [ebp - 0x48]
push ecx
call fcn.0055215c
add esp, 4
cmp dword [ebp - 0x50], 0x10
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x38], ebx
mov byte [ebp - 0x48], bl
jb 0x40f945
mov edx, dword [ebp - 0x64]
push edx
call fcn.0055215c
add esp, 4
cmp dword [ebp - 0x18], 0x10
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
mov byte [ebp - 4], bl
jb 0x40f963
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0055215c
add esp, 4
mov eax, dword [0x5cdea8]
cmp eax, ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
jne 0x40f985
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [0x5cdea8], eax
je 0x40f9c2
push str.ExtraIcoFromPE
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, ebx
je 0x40f9c2
cmp dword [ebp + 0x428], 0x10
mov eax, dword [ebp + 0x414]
jae 0x40f9ac
lea eax, [ebp + 0x414]
push eax
call fcn.00554a20
mov ecx, dword [ebp - 0x14]
add esp, 4
push eax
push ecx
call edi
test eax, eax
mov bl, 1
je 0x40f9c5
mov bl, byte [ebp - 0xd]
cmp dword [ebp + 0x428], 0x10
jb 0x40f9dd
mov edx, dword [ebp + 0x414]
push edx
call fcn.0055215c
add esp, 4
mov al, bl
lea esp, [ebp - 0x78]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x400]
xor ecx, ebp
call fcn.00552d63
add ebp, 0x404
mov esp, ebp
pop ebp
ret