Function at 0x140017770
Capabilities:
Get common file path
Get file size
Read .ini file
Write file on windows

Disassembly:
push rsi
push rdi
push r12
sub rsp, 0x920
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x940], rbx
mov rax, qword [0x14027bbd0]
xor rax, rsp
mov qword [rsp + 0x910], rax
mov rsi, r8
mov rdi, rdx
mov rbx, rcx
mov dword [rsp + 0x54], 4
mov qword [rsp + 0x58], 0xffffffffffffffff
xor r12d, r12d
mov word [rsp + 0x4f0], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x4f2]
call fcn.140192cb0
mov word [rsp + 0x2e0], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x2e2]
call fcn.140192cb0
mov word [rsp + 0x90], r12w
xor eax, eax
mov qword [rsp + 0x92], rax
mov qword [rsp + 0x9a], rax
mov qword [rsp + 0xa2], rax
mov qword [rsp + 0xaa], rax
mov qword [rsp + 0xb2], rax
mov qword [rsp + 0xba], rax
mov word [rsp + 0xc2], ax
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x700]
call fcn.140192cb0
lea rdx, [rsp + 0xd0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rcx, [rsp + 0xd0]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea r11, str.Uninst.ini
mov qword [rsp + 0x28], r11
lea rax, [rsp + 0xd0]
mov qword [rsp + 0x20], rax
lea r9, [0x1401c9460]
or r8, 0xffffffffffffffff
mov edx, 0x104
lea rcx, [rsp + 0x700]
call fcn.140196124
lea r9, [rsp + 0x700]
xor r8d, r8d
lea rdx, str.LOG_USEFILE_CURCOUNT
lea rcx, str.Debug_Info
call qword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [0x14027dab8], eax
test eax, eax
je 0x1400178de
xor edx, edx
div dword [0x14027dab4]
mov dword [0x14027dab8], edx
mov r8d, 0x104
lea rdx, [rsp + 0x4f0]
mov rcx, rbx
call fcn.140017590
test eax, eax
jne 0x140017911
mov dword [rsp + 0x6c], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x6c]
call fcn.1401938f0
mov eax, dword [0x14027dab8]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x4f0]
lea r8, str._sDebugLog__04d.txt
mov edx, 0x104
lea rcx, [rsp + 0x2e0]
call fcn.140016e40
test eax, eax
jns 0x140017959
mov dword [rsp + 0x74], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x74]
call fcn.1401938f0
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x1400179af
mov dword [rsp + 0x68], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x68]
call fcn.1401938f0
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x1400179ea
mov word [rsp + 0x50], 0xfeff
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x54]
lea r8d, [rax + 2]
lea rdx, [rsp + 0x50]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp dword [0x14027dab0], eax
jae 0x140017b5e
xor edx, edx
mov r8d, 0x200
lea rcx, [rsp + 0xd0]
call fcn.140192cb0
mov eax, dword [0x14027dab8]
inc eax
xor edx, edx
div dword [0x14027dab4]
mov dword [0x14027dab8], edx
mov r9d, edx
lea r8, [0x1401c783c]
mov edx, 0x100
lea rcx, [rsp + 0xd0]
call fcn.140196100
lea r9, [rsp + 0x700]
lea r8, [rsp + 0xd0]
lea rdx, str.LOG_USEFILE_CURCOUNT
lea rcx, str.Debug_Info
call qword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
test eax, eax
je 0x140017a89
mov dword [rsp + 0x70], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x70]
call fcn.1401938f0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x58], 0xffffffffffffffff
mov eax, dword [0x14027dab8]
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x4f0]
lea r8, str._sDebugLog__04d.txt
mov edx, 0x104
lea rcx, [rsp + 0x2e0]
call fcn.140016e40
test eax, eax
jns 0x140017ae3
mov dword [rsp + 0x64], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x64]
call fcn.1401938f0
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x140017b39
mov dword [rsp + 0x60], 0x80004005
lea rdx, [0x14025dcf8]
lea rcx, [rsp + 0x60]
call fcn.1401938f0
mov word [rsp + 0x50], 0xfeff
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x54]
mov r8d, 2
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rcx, [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx r11d, word [rsp + 0x8e]
movzx eax, word [rsp + 0x8c]
movzx ecx, word [rsp + 0x8a]
movzx edx, word [rsp + 0x88]
movzx r8d, word [rsp + 0x86]
movzx r10d, word [rsp + 0x82]
movzx r9d, word [rsp + 0x80]
mov dword [rsp + 0x48], r11d
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov dword [rsp + 0x20], r10d
lea r8, str._04d__02d__02d__02d:_02d:_02d:_04d
mov edx, 0x1a
lea rcx, [rsp + 0x90]
call fcn.140016e40
mov dword [rsp + 0x54], r12d
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x54]
mov r8d, 0x32
lea rdx, [rsp + 0x90]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea r8d, [rsi + rsi]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x54]
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x54]
mov r8d, 2
lea rdx, [0x1401c9810]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop
jmp 0x140017c44
test rbx, rbx
je 0x140017c52
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x910]
xor rcx, rsp
call fcn.1401945b0
mov rbx, qword [rsp + 0x940]
add rsp, 0x920
pop r12
pop rdi
pop rsi
ret