Function at 0x4584c0
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x844
mov eax, dword [0x4f0008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
mov eax, dword [ebx]
inc dword [ebx + 0x10]
cmp dword [eax + 4], 0
lea edi, [eax + 0x10]
je 0x458532
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
sub esi, 1
js 0x458500
cmp word [edi + esi*2], 0x5c
je 0x458500
sub esi, 1
jns 0x4584f4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x218]
push eax
call edi
test esi, esi
js 0x45851e
xor eax, eax
mov word [ebp + esi*2 - 0x218], ax
mov eax, dword [ebx]
add eax, 0x10
push eax
lea eax, [ebp - 0x420]
push eax
call edi
jmp 0x4585d5
cmp word [edi], 0
je 0x458555
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
sub esi, 1
js 0x458552
cmp word [edi + esi*2], 0x5c
je 0x458552
sub esi, 1
jns 0x458546
push edi
jmp 0x458597
push 0x208
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
sub esi, 1
js 0x458590
nop dword [eax]
cmp word [ebp + esi*2 - 0x420], 0x5c
je 0x458590
sub esi, 1
jns 0x458580
lea eax, [ebp - 0x420]
push eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x218]
push eax
call edi
test esi, esi
js 0x4585b4
xor eax, eax
mov word [ebp + esi*2 - 0x218], ax
push 0x4d1554
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push 0x4d0ed4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
mov eax, dword [0x4f7f30]
add eax, 0x978
push eax
call edi
mov eax, dword [ebx]
cmp dword [eax + 4], 0
je 0x4587e3
mov esi, dword [0x4f7f30]
lea ecx, [ebp - 0x420]
xor edx, edx
mov dword [ebp - 0x834], esi
call fcn.0048d420
mov edi, eax
test edi, edi
jne 0x458625
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x83c]
mov dword [ebp - 0x83c], 0
push eax
push edi
mov ecx, esi
call fcn.00488e70
mov ecx, edi
mov esi, eax
call fcn.0048d4e0
test esi, esi
je 0x4587d0
mov eax, dword [ebp - 0x834]
mov dword [eax + 0xb80], 2
mov eax, dword [0x4f7f30]
mov dword [ebp - 0x834], eax
lea eax, [ebp - 0x83c]
push eax
push 0
push 0
push 0x4bb490
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x628]
push str.SRPG_Studio
push dword [ebp - 0x83c]
push 0x4d0ed4
push eax
call edi
add esp, 0x10
push dword [ebp - 0x83c]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push str.option.dat
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x830]
push 0x4d0ed4
push eax
call edi
add esp, 0x10
lea ecx, [ebp - 0x830]
xor edx, edx
call fcn.0048d420
mov edi, eax
test edi, edi
jne 0x45872e
call fcn.004890d0
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x458703
push edi
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 0x834]
lea ecx, [ecx + 0x580]
call fcn.0048c6e0
mov dword [ebx + 0xc], 1
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov edx, dword [ecx + eax]
mov eax, dword [ecx + eax + 4]
mov dword [ebp - 0x83c], eax
lea eax, [ecx + 8]
mov dword [edi + 4], eax
movq xmm0, qword [str.SOPT]
mov dword [ebp - 0x10], edx
movzx eax, dl
movq qword [ebp - 0x10], xmm0
cmp ax, word [ebp - 0x10]
jne 0x4587ac
mov eax, edx
shr eax, 8
movzx ecx, al
mov eax, dword [ebp - 0x10]
shr eax, 0x10
cmp cx, ax
jne 0x4587ac
mov eax, edx
shr eax, 0x10
movzx eax, al
cmp ax, word [ebp - 0xc]
jne 0x4587ac
mov eax, dword [ebp - 0xc]
shr edx, 0x18
shr eax, 0x10
cmp edx, eax
jne 0x4587ac
mov ecx, dword [ebp - 0x834]
mov eax, dword [ebp - 0x83c]
push edi
mov dword [0x4f7f2c], eax
lea ecx, [ecx + 0x580]
call fcn.0048c250
jmp 0x4587c2
call fcn.004890d0
mov ecx, dword [ebp - 0x834]
lea ecx, [ecx + 0x580]
call fcn.0048c6e0
mov ecx, edi
call fcn.0048d4e0
mov dword [ebx + 0xc], 1
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 8]
lea eax, [ebp - 0x420]
push eax
call fcn.004569e0
test eax, eax
je 0x458803
lea eax, [ebx + 0xc]
push eax
push ecx
mov ecx, dword [ebx + 8]
call fcn.00456f90
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004912f2
mov esp, ebp
pop ebp
ret