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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101ce870
mov eax, dword fs:[0]
push eax
sub esp, 0x50
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 + 0x14]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x54], eax
mov byte [ebp - 0x58], al
mov dword [ebp - 0x48], 0
test al, al
je 0x1015a84e
push edi
lea ecx, [ebp - 0x50]
call fcn.100224c2
push 0x10202834
push eax
mov dword [ebp - 0x48], 1
call fcn.1002573c
add esp, 8
mov byte [ebp - 0x41], 1
test al, al
jne 0x1015a852
mov byte [ebp - 0x41], 0
or ebx, 0xffffffff
test byte [ebp - 0x48], 1
je 0x1015a877
mov edx, dword [ebp - 0x50]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015a877
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x41], 0
je 0x1015aad9
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 0x1015a8b1
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x48]
call fcn.100224c2
cmp dword [ebp - 0x14], 8
jb 0x1015a8cb
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 0x1015a8f4
push dword [ebp - 0x40]
call fcn.10042178
add esp, 4
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 0x1015a953
push eax
push 0x80
push 1
push eax
push eax
push 0x40000000
push dword [ebp - 0x48]
mov dword [ebp - 0x50], 0xfeff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x58]
push 0
push eax
push 2
lea eax, [ebp - 0x50]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x4c]
call fcn.10010450
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x1015a96f
push 0x80004005
call fcn.1000c1e0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x4c], eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 5
push 0x101d98d0
push eax
call fcn.10022679
add esp, 0xc
lea ecx, [ebp - 0x50]
push edi
call fcn.100224c2
push 0x1021dba4
push eax
mov byte [ebp - 4], 6
call fcn.1002573c
add esp, 8
mov ecx, str.Default
test al, al
cmove ecx, edi
push ecx
lea ecx, [ebp - 0x54]
call fcn.100224c2
mov edx, dword [ebp - 0x50]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 8
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015a9e2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push esi
lea ecx, [ebp - 0x58]
call fcn.100224c2
push 0x1021dba4
push eax
mov byte [ebp - 4], 9
call fcn.1002573c
add esp, 8
lea ecx, [ebp - 0x5c]
test al, al
mov eax, str.Default
cmove eax, esi
push eax
call fcn.100224c2
mov edx, dword [ebp - 0x58]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 0xb
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015aa30
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x48]
mov esi, dword [ebp - 0x4c]
push esi
push dword [ebp - 0x5c]
push dword [ebp - 0x54]
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push dword [ebp - 0x48]
mov edi, eax
call fcn.101592e0
mov edx, dword [ebp - 0x5c]
add esp, 4
test edi, edi
mov byte [ebp - 4], 8
mov ecx, ebx
setne byte [ebp - 0x41]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015aa76
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x54]
mov ecx, ebx
add edx, 0xfffffff0
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015aa96
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 4
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x1015aab3
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x48]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x1015aad4
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x41]
jmp 0x1015ab39
push 1
push dword [ebp - 0x58]
push edi
call fcn.1015a4b0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x1015ab1a
push 4
lea eax, [ebp + 0x10]
push eax
push 4
push 0
push dword [ebp - 0x4c]
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp esi, dword [0x10261f34]
je 0x1015ab1a
cmp esi, dword [0x10261f30]
je 0x1015ab1a
push esi
call edi
cmp byte [ebp - 0x54], 0
je 0x1015ab32
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