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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1022c8e0
mov eax, dword fs:[0]
push eax
sub esp, 0x54
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 al, byte [ebp + 0x14]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x50], esi
mov byte [ebp - 0x49], al
mov byte [ebp - 0x58], al
mov dword [ebp - 0x48], 0
test al, al
je 0x10196f9e
push edi
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 0x10196fa2
mov byte [ebp - 0x41], 0
or ebx, 0xffffffff
test byte [ebp - 0x48], 1
je 0x10196fc5
mov edx, dword [ebp - 0x54]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10196fc5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x41], 0
je 0x10197218
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 0x10196fff
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x48]
call fcn.1001f510
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x1019701d
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 0x1019704a
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 0x101970a9
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 - 0x58]
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]
call fcn.10012120
mov ecx, eax
test ecx, ecx
jne 0x101970be
push 0x80004005
call fcn.1000dd70
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x50], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x50]
mov byte [ebp - 4], 5
push 0x10289060
push eax
call fcn.10020be8
add esp, 0xc
lea ecx, [ebp - 0x54]
push edi
call fcn.1001f510
push 0x10288a8c
push eax
mov byte [ebp - 4], 6
call fcn.10196130
add esp, 8
test al, al
je 0x10197105
mov edi, str.Default
push edi
lea ecx, [ebp - 0x60]
call fcn.1001f510
mov edx, dword [ebp - 0x54]
mov eax, ebx
mov byte [ebp - 4], 8
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1019712c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
lea ecx, [ebp - 0x58]
call fcn.1001f510
push 0x10288a8c
push eax
mov byte [ebp - 4], 9
call fcn.10196130
add esp, 8
test al, al
je 0x10197150
mov esi, str.Default
push esi
lea ecx, [ebp - 0x5c]
call fcn.1001f510
mov edx, dword [ebp - 0x58]
mov eax, ebx
mov byte [ebp - 4], 0xb
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10197177
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x48]
mov esi, dword [ebp - 0x50]
push esi
push dword [ebp - 0x5c]
push dword [ebp - 0x60]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push dword [ebp - 0x48]
mov edi, eax
call fcn.1019ab70
mov edx, dword [ebp - 0x5c]
add esp, 4
test edi, edi
mov byte [ebp - 4], 8
mov eax, ebx
setne byte [ebp - 0x41]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101971bb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x60]
mov eax, ebx
mov byte [ebp - 4], 5
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x101971d9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 4
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x101971f4
mov ecx, dword [esi]
push esi
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], ebx
dec ebx
test ebx, ebx
jg 0x10197213
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x41]
jmp 0x10197278
push 1
push dword [ebp - 0x58]
push edi
call fcn.10196c30
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x10197259
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push dword [ebp - 0x50]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, dword [0x102ddf8c]
je 0x10197259
cmp esi, dword [0x102ddf88]
je 0x10197259
push esi
call edi
cmp byte [ebp - 0x49], 0
je 0x10197271
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