Function at 0x10058950
Capabilities:
Check if file exists
Get common file path
Get startup folder
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f1380
mov eax, dword fs:[0]
push eax
sub esp, 0x420
mov eax, dword [0x10130fc4]
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, ecx
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x42c], edi
xor eax, eax
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
mov word [edi], ax
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 7
mov dword [ebp - 4], eax
mov word [edi + 0x18], ax
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], 7
mov word [edi + 0x30], ax
mov dword [edi + 0x48], eax
mov dword [edi + 0x4c], eax
mov dword [edi + 0x50], eax
mov dword [edi + 0x54], eax
mov dword [edi + 0x68], eax
mov dword [edi + 0x6c], 7
mov word [edi + 0x58], ax
mov dword [edi + 0x70], eax
mov dword [edi + 0x74], eax
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], eax
mov byte [edi + 0x80], al
lea eax, [edi + 0x84]
push 0
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov dword [edi + 0x94], 0
xor eax, eax
mov dword [edi + 0x98], 0
mov dword [edi + 0x9c], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], 1
mov dword [edi + 0xac], 0
mov dword [edi + 0xc0], 0
mov dword [edi + 0xc4], 7
mov word [edi + 0xb0], ax
mov byte [ebp - 4], 4
lea ebx, [edi + 0x11c]
mov dword [edi + 0xc8], eax
mov dword [edi + 0xcc], eax
mov dword [edi + 0xd0], eax
mov dword [edi + 0xd4], eax
mov dword [edi + 0xd8], eax
mov dword [edi + 0xdc], eax
mov dword [edi + 0xe0], eax
mov dword [edi + 0xe4], eax
mov dword [edi + 0xe8], eax
mov dword [edi + 0xec], eax
mov dword [edi + 0xf0], eax
mov dword [edi + 0xf4], 0xffffffff
mov dword [edi + 0xf8], 0x3f800000
mov dword [edi + 0xfc], 0x3f800000
mov dword [edi + 0x110], eax
mov byte [edi + 0x114], al
mov dword [edi + 0x118], 2
call fcn.10009940
mov ecx, eax
test ecx, ecx
je 0x10058cf1
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx], eax
xor eax, eax
mov dword [edi + 0x130], 0
mov dword [edi + 0x134], 7
mov word [edi + 0x120], ax
mov dword [edi + 0x148], eax
mov dword [edi + 0x14c], 7
mov word [edi + 0x138], ax
mov dword [edi + 0x160], eax
mov dword [edi + 0x164], 7
mov word [edi + 0x150], ax
push 0x208
push eax
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 8
push eax
call fcn.100bcde0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.100bcde0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.10009940
mov ecx, eax
test ecx, ecx
je 0x10058cfb
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 9
test eax, 0xffff0000
jne 0x10058bd5
movzx eax, ax
lea ecx, [ebp - 0x424]
push eax
call fcn.10009ab0
jmp 0x10058c02
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10058be0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x424]
call fcn.1000a210
push 0
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 0xa
push eax
lea eax, [ebp - 0x428]
push eax
call fcn.1007bf70
add esp, 0xc
push dword [eax]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x428]
or esi, 0xffffffff
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10058c4d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x424]
mov byte [ebp - 4], 8
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x10058c6c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10058c8c
lea eax, [ebp - 0x420]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0x420]
push eax
push str._sconfig.ini
push ebx
call fcn.10014d30
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
add esp, 0xc
push dword [ebx]
push 0
push 0x10100d68
push str.ori_size
call esi
push dword [ebx]
mov dword [edi + 0x100], eax
push 0
push 0x10100d84
push str.ori_size
call esi
mov dword [edi + 0x104], eax
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.100a242e
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10009730
push 0x80004005
call fcn.10009730
int3