Function at 0x10197350
Capabilities:
Check if file exists
Set registry value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1022c948
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x102bff3c]
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 eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov dword [ebp - 0x60], eax
mov al, byte [ebp + 0x14]
mov dword [ebp - 0x50], esi
mov byte [ebp - 0x49], al
mov byte [ebp - 0x58], al
mov dword [ebp - 0x48], 0
test al, al
je 0x101973c4
push ebx
lea ecx, [ebp - 0x54]
call fcn.1001f510
push 0x10288f74
push eax
mov dword [ebp - 0x48], 1
call fcn.10196130
add esp, 8
mov byte [ebp - 0x41], 1
test al, al
jne 0x101973c8
mov byte [ebp - 0x41], 0
or edi, 0xffffffff
test byte [ebp - 0x48], 1
je 0x101973eb
mov edx, dword [ebp - 0x54]
mov eax, edi
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101973eb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x41], 0
je 0x101975eb
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.101999e0
push str._settings.ini
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
call fcn.10026025
add esp, 0x14
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 1
jb 0x10197425
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x48]
call fcn.1001f510
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x10197443
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.100114d0
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0x2c]
mov byte [ebp - 4], 4
cmp eax, 8
jb 0x10197470
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.100114d0
push dword [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x101974cf
push eax
push 0x80
push 1
push eax
push eax
push 0x40000000
push dword [ebp - 0x48]
mov dword [ebp - 0x54], 0xfeff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x64]
push 0
push eax
push 2
lea eax, [ebp - 0x54]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x50]
push ebx
lea ecx, [ebp - 0x54]
call fcn.1001f510
push 0x10288a8c
push eax
mov byte [ebp - 4], 5
call fcn.10196130
add esp, 8
test al, al
je 0x101974f3
mov ebx, str.Default
push ebx
lea ecx, [ebp - 0x58]
call fcn.1001f510
mov edx, dword [ebp - 0x54]
mov eax, edi
mov byte [ebp - 4], 7
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1019751a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
lea ecx, [ebp - 0x50]
call fcn.1001f510
push 0x10288a8c
push eax
mov byte [ebp - 4], 8
call fcn.10196130
add esp, 8
test al, al
je 0x1019753e
mov esi, str.Default
push esi
lea ecx, [ebp - 0x5c]
call fcn.1001f510
mov edx, dword [ebp - 0x50]
mov eax, edi
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10197565
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x48]
push dword [ebp - 0x60]
push dword [ebp - 0x5c]
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push dword [ebp - 0x48]
mov esi, eax
call fcn.1019ab70
mov edx, dword [ebp - 0x5c]
add esp, 4
test esi, esi
mov byte [ebp - 4], 7
mov eax, edi
setne bl
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101975a7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x58]
mov eax, edi
mov byte [ebp - 4], 4
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101975c5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x48]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
jg 0x101975e4
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
jmp 0x10197674
push 1
push dword [ebp - 0x58]
push ebx
call fcn.10196c30
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10197655
mov edx, dword [ebp - 0x60]
test edx, edx
jne 0x10197615
push 2
push 0x10288a8c
jmp 0x10197634
mov ecx, edx
lea ebx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10197620
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push 1
push 0
push dword [ebp - 0x50]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, dword [0x102ddf8c]
je 0x10197655
cmp esi, dword [0x102ddf88]
je 0x10197655
push esi
call edi
cmp byte [ebp - 0x49], 0
je 0x1019766d
push dword [0x102ddf8c]
call edi
mov dword [0x102ddf8c], 0
xor eax, eax
test esi, esi
setne al
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.101b70aa
mov esp, ebp
pop ebp
ret