Function at 0x180002f50
Capabilities:
Check if file exists
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x20], r9
push rbp
push rdi
lea rbp, [rsp - 0x1fc8]
mov eax, 0x20c8
call fcn.180009810
sub rsp, rax
mov rax, qword [0x18002d340]
xor rax, rsp
mov qword [rbp + 0x1fa0], rax
xor edi, edi
lea rcx, [rbp + 0x172]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x170], di
call fcn.1800098a0
mov ecx, edi
lea rdx, str.C:log_
nop dword [rax]
movzx eax, word [rcx + rdx]
lea rcx, [rcx + 2]
mov word [rbp + rcx + 0x16e], ax
test ax, ax
jne 0x180002fb0
lea rcx, [rbp + 0x592]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x590], di
call fcn.1800098a0
lea rcx, [rsp + 0x62]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x60], di
call fcn.1800098a0
lea rdx, [rsp + 0x60]
mov r8d, 0x104
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x60]
mov edx, 0x5c
call fcn.180007e94
lea rcx, [rbp + 0x7a2]
xor edx, edx
mov word [rax], di
mov r8d, 0x7fe
mov word [rbp + 0x7a0], di
call fcn.1800098a0
lea r8, [rbp + 0x170]
lea rdx, str._sgswb.log
lea rcx, [rbp + 0x380]
call fcn.18000862c
lea rcx, [rbp + 0x380]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x18000324d
mov qword [rsp + 0x20c0], rbx
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x20b8], rsi
mov qword [rsp + 0x20b0], r14
lea rcx, [rsp + 0x60]
mov rax, rbx
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x180003090
lea rdx, [rsp + 0x62]
lea rax, [rdx + rax*2]
lea rdx, [rbp + 0x590]
sub rdx, rax
nop
movzx ecx, word [rax]
lea rax, [rax + 2]
mov word [rdx + rax - 2], cx
test cx, cx
jne 0x1800030b0
lea r9, [rbp + 0x590]
lea r8, [rbp + 0x170]
lea rdx, str._s_s.txt
lea rcx, [rbp + 0x380]
call fcn.18000862c
mov r8, qword [rbp + 0x1fe8]
lea r9, [rbp + 0x1ff0]
lea rcx, [rbp + 0x7a0]
mov edx, 0x3ff
call fcn.180008518
xor ecx, ecx
call fcn.180008edc
lea rcx, [rsp + 0x58]
mov qword [rsp + 0x58], rax
call fcn.180008b88
lea rcx, [rbp + 0x7a0]
mov r9d, dword [rax + 0x10]
mov r8d, dword [rax + 0x14]
mov qword [rsp + 0x40], rcx
mov ecx, dword [rax]
lea rdx, str.__d__d__d__d__d__d_:_s
inc r9d
mov dword [rsp + 0x38], ecx
mov ecx, dword [rax + 4]
add r8d, 0x76c
mov dword [rsp + 0x30], ecx
mov ecx, dword [rax + 8]
mov eax, dword [rax + 0xc]
mov dword [rsp + 0x28], ecx
lea rcx, [rbp + 0xfa0]
mov dword [rsp + 0x20], eax
call fcn.18000862c
lea rcx, [rbp + 0x380]
mov word [rbp + 0xf9e], di
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea rdx, [0x18001fad0]
lea rcx, [rbp + 0x380]
test eax, eax
mov r14d, 1
cmovne edi, r14d
call fcn.1800086f0
mov rsi, rax
test rax, rax
je 0x180003235
test edi, edi
jne 0x1800031c4
mov eax, 0xfeff
lea r8d, [r14 + 1]
lea rcx, [rsp + 0x54]
mov r9, rsi
mov edx, r14d
mov word [rsp + 0x54], ax
call fcn.180008a58
lea rax, [rbp + 0xfa0]
nop dword [rax + rax]
inc rbx
cmp word [rax + rbx*2], 0
jne 0x1800031d0
add ebx, ebx
lea rcx, [rbp + 0xfa0]
mov r9, rsi
movsxd r8, ebx
mov rdx, r14
call fcn.180008a58
mov eax, 0xd
lea rcx, [rsp + 0x50]
lea r8d, [rax - 0xb]
mov r9, rsi
mov rdx, r14
mov word [rsp + 0x50], ax
call fcn.180008a58
mov eax, 0xa
lea rcx, [rsp + 0x50]
lea r8d, [rax - 8]
mov r9, rsi
mov rdx, r14
mov word [rsp + 0x50], ax
call fcn.180008a58
mov rcx, rsi
call fcn.180008860
mov rsi, qword [rsp + 0x20b8]
mov rbx, qword [rsp + 0x20c0]
mov r14, qword [rsp + 0x20b0]
mov rcx, qword [rbp + 0x1fa0]
xor rcx, rsp
call fcn.180009870
add rsp, 0x20c8
pop rdi
pop rbp
ret