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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101ce8d8
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x1024bd20]
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 + 8]
xor ebx, ebx
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x54], eax
mov byte [ebp - 0x50], al
mov dword [ebp - 0x58], ebx
test al, al
je 0x1015ac82
push esi
lea ecx, [ebp - 0x58]
call fcn.100224c2
push 0x10202834
push eax
mov ebx, 1
call fcn.1002573c
add esp, 8
mov byte [ebp - 0x41], bl
test al, al
jne 0x1015ac86
mov byte [ebp - 0x41], 0
or edi, 0xffffffff
test bl, 1
je 0x1015acaa
mov edx, dword [ebp - 0x58]
mov ecx, edi
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015acaa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x41], 0
je 0x1015aeb1
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.101581b0
push str._settings.ini
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
call fcn.10023c06
add esp, 0x14
cmp dword [eax + 0x14], 8
mov byte [ebp - 4], 1
jb 0x1015ace4
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x4c]
call fcn.100224c2
cmp dword [ebp - 0x14], 8
jb 0x1015acfe
push dword [ebp - 0x28]
call fcn.10042178
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp dword [ebp - 0x2c], 8
mov byte [ebp - 4], 4
jb 0x1015ad27
push dword [ebp - 0x40]
call fcn.10042178
add esp, 4
push dword [ebp - 0x4c]
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 0x1015ad86
push eax
push 0x80
push 1
push eax
push eax
push 0x40000000
push dword [ebp - 0x4c]
mov dword [ebp - 0x58], 0xfeff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x64]
push 0
push eax
push 2
lea eax, [ebp - 0x58]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x5c]
push esi
lea ecx, [ebp - 0x5c]
call fcn.100224c2
push 0x1021dba4
push eax
mov byte [ebp - 4], 5
call fcn.1002573c
add esp, 8
mov ecx, str.Default
test al, al
cmove ecx, esi
push ecx
lea ecx, [ebp - 0x50]
call fcn.100224c2
mov edx, dword [ebp - 0x5c]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015add4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x48]
lea ecx, [ebp - 0x48]
push ebx
call fcn.100224c2
push 0x1021dba4
push eax
mov byte [ebp - 4], 8
call fcn.1002573c
add esp, 8
lea ecx, [ebp - 0x54]
test al, al
mov eax, str.Default
cmove eax, ebx
push eax
call fcn.100224c2
mov edx, dword [ebp - 0x48]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 0xa
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015ae25
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x4c]
push dword [ebp - 0x60]
push dword [ebp - 0x54]
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push dword [ebp - 0x4c]
mov esi, eax
call fcn.101592e0
mov edx, dword [ebp - 0x54]
add esp, 4
test esi, esi
mov byte [ebp - 4], 7
mov ecx, edi
setne bl
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015ae69
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x50]
mov ecx, edi
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015ae89
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x4c]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x1015aeaa
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
jmp 0x1015af35
push 1
push dword [ebp - 0x50]
push esi
call fcn.1015a4b0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1015af16
mov edx, dword [ebp - 0x60]
test edx, edx
jne 0x1015aedb
push 2
push 0x1021dba4
jmp 0x1015aef4
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1015aee0
sub ecx, ebx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
mov ebx, dword [ebp - 0x48]
push 1
push 0
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, dword [0x10261f34]
je 0x1015af16
cmp esi, dword [0x10261f30]
je 0x1015af16
push esi
call edi
cmp byte [ebp - 0x54], 0
je 0x1015af2e
push dword [0x10261f34]
call edi
mov dword [0x10261f34], 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.1017868e
mov esp, ebp
pop ebp
ret