Function at 0x180002394
Capabilities:
Get file size
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
mov qword [rax + 0x10], rdx
mov qword [rax + 0x18], r8
mov qword [rax + 0x20], r9
push rbp
push rbx
push rsi
push rdi
lea rbp, [rax - 0x7f98]
mov eax, 0x8078
call fcn.180022fc0
sub rsp, rax
xor edi, edi
cmp dword [0x1800414e4], edi
je 0x180002617
xor eax, eax
lea rcx, [rbp + 0x3f72]
xor edx, edx
mov r8d, 0x3ffe
mov word [rsp + 0x58], di
mov word [rbp + 0x3f70], di
mov qword [rsp + 0x5a], rax
mov dword [rsp + 0x62], eax
mov word [rsp + 0x66], ax
call fcn.18001cca0
lea rcx, [rbp + 0x1f71]
xor edx, edx
mov r8d, 0x1fff
mov byte [rbp + 0x1f70], dil
call fcn.18001cca0
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rsp + 0x62]
movzx edx, word [rsp + 0x60]
movzx r8d, word [rsp + 0x5e]
movzx eax, word [rsp + 0x64]
movzx r10d, word [rsp + 0x5a]
movzx r9d, word [rsp + 0x58]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov esi, 0x2000
lea r8, str._d__02d__02d__02d:_02d:_02d__
lea rcx, [rbp + 0x3f70]
mov edx, esi
mov dword [rsp + 0x20], r10d
call fcn.18001d8d8
lea rcx, [rbp + 0x3f70]
call fcn.18001d570
mov r9, qword [rbp + 0x7fa0]
mov ecx, esi
sub ecx, eax
lea r8, [rbp + 0x7fa8]
cdqe
movsxd rdx, ecx
mov qword [rsp + 0x20], r8
lea rcx, [rbp + 0x3f70]
lea rcx, [rcx + rax*2]
mov r8, rdx
call fcn.18001dbbc
mov qword [rsp + 0x30], rdi
lea r8d, [rdi + 1]
lea rcx, [0x1800413e0]
xor r9d, r9d
mov edx, 0x40000000
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180002617
lea r8d, [rsi - 1]
lea rcx, [rsp + 0x71]
xor edx, edx
mov byte [rsp + 0x70], dil
call fcn.18001cca0
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov rcx, rbx
cmp eax, dword [0x18003e6c4]
mov dword [rsp + 0x68], eax
jbe 0x18000251d
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
jmp 0x18000252e
mov r9d, 2
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov qword [rsp + 0x38], rdi
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rdi
lea r8, [rbp + 0x3f70]
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, [rsp + 0x70]
call fcn.18001d680
lea rcx, [0x18003e6c8]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x50]
xor edx, edx
mov qword [rsp + 0x28], rcx
lea rcx, [rbp + 0x1f70]
mov r9d, eax
mov qword [rsp + 0x20], rcx
mov dword [rsp + 0x50], edi
call fcn.180001880
test eax, eax
jne 0x180002617
lea rcx, [rsp + 0x70]
mov r8, rsi
xor edx, edx
call fcn.18001cca0
mov edx, dword [rsp + 0x50]
lea r9, [rsp + 0x54]
lea r8, [rsp + 0x70]
lea rcx, [rbp + 0x1f70]
mov dword [rsp + 0x54], esi
call fcn.180001ee0
test eax, eax
je 0x180002617
cmp dword [rsp + 0x54], edi
jle 0x180002617
lea r8, [0x180035198]
lea rcx, [rsp + 0x70]
mov rdx, rsi
call fcn.18001d5f0
lea rcx, [rsp + 0x70]
call fcn.18001d680
lea r9, [rsp + 0x68]
lea rdx, [rsp + 0x70]
mov rcx, rbx
mov r8, rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
add rsp, 0x8078
pop rdi
pop rsi
pop rbx
pop rbp
ret