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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xf8
mov qword [rbp - 0x19], 0xfffffffffffffffe
mov rax, qword [0x1402d6cb0]
xor rax, rsp
mov qword [rbp - 1], rax
mov rbx, r9
mov r12, r8
mov qword [rbp - 0x41], r8
mov dword [rbp - 0x49], edx
mov rdi, rcx
mov qword [rbp - 0x29], rcx
mov r14, qword [rbp + 0x7f]
mov rax, qword [rcx + 0x2010]
cmp dword [rax - 0x10], 0
je 0x140200fca
mov rax, qword [rcx + 0x2018]
cmp dword [rax - 0x10], 0
je 0x140200fca
call fcn.14000e540
mov rcx, rax
test rax, rax
jne 0x140200c51
mov ecx, 0x80004005
call fcn.140006230
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x59], rax
or rsi, 0xffffffffffffffff
test rbx, rbx
je 0x140200c8e
test rbx, 0xffffffffffff0000
jne 0x140200c7f
movzx edx, bx
lea rcx, [rbp - 0x59]
call fcn.1402005d0
jmp 0x140200ca0
mov rax, rsi
inc rax
cmp word [rbx + rax*2], 0
jne 0x140200c82
jmp 0x140200c90
xor eax, eax
mov r8d, eax
mov rdx, rbx
lea rcx, [rbp - 0x59]
call fcn.140006250
nop
lea r8, [0x14021bf7c]
lea rdx, [0x140225ed4]
lea rcx, [rbp - 0x59]
call fcn.140200ff0
lea r8, [0x14021bf7c]
lea rdx, reloc.OLEAUT32.dll_VariantCopyInd
lea rcx, [rbp - 0x59]
call fcn.140200ff0
test r14, r14
je 0x140200faf
xor bl, bl
mov rdx, r14
lea rcx, [rbp - 0x51]
call fcn.140200830
nop
lea r8, [0x14021bf7c]
lea rdx, [0x140225ed4]
lea rcx, [rbp - 0x51]
call fcn.140200ff0
lea r8, [0x14021bf7c]
lea rdx, reloc.OLEAUT32.dll_VariantCopyInd
lea rcx, [rbp - 0x51]
call fcn.140200ff0
lea r13, [rdi + 0x2030]
mov qword [rbp - 0x21], r13
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [rdi + 0x2004]
mov ecx, 1
test eax, eax
je 0x140200d4c
cmp dword [rdi + 0x2058], eax
jb 0x140200d4c
mov rcx, rdi
call fcn.140201320
mov r14b, 1
jmp 0x140200d5b
movzx r14d, bl
cmp dword [rdi + 0x2058], 2
cmovbe r14d, ecx
xor r15b, r15b
mov rbx, qword [rdi + 0x2020]
call fcn.1402009c0
mov r9, rax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x2000080
mov dword [rsp + 0x20], 4
mov edx, 0x40000000
mov r8d, 1
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rbp - 0x39], rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140200dfa
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
je 0x140200dfd
test eax, eax
jne 0x140200def
mov word [rbp - 0x61], 0xfeff
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x31]
lea r8d, [rax + 2]
lea rdx, [rbp - 0x61]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [rdi + 0x2058], 2
jmp 0x140200df5
mov dword [rdi + 0x2058], eax
mov r15b, 1
jmp 0x140200dfd
xor r15b, r15b
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x140200f87
test r15b, r15b
je 0x140200f87
xor ecx, ecx
mov dword [rbp - 0x5d], ecx
cmp r14b, 1
jne 0x140200e81
lea rax, str.Type_tPID_tTID_tDateTime_local__tSystem_tContext_tMessage_r_n
lea rdx, str._r_n_r_n_r_n_r_n_r_nType_tPID_tTID_tDateTime_local__tSystem_tContext_tMessage_r_n
cmp dword [rdi + 0x2058], 2
cmovbe rdx, rax
mov rax, rsi
nop word [rax + rax]
lea rax, [rax + 1]
cmp word [rdx + rax*2], cx
jne 0x140200e50
lea r8d, [rax + rax]
mov qword [rsp + 0x20], rcx
lea r9, [rbp - 0x5d]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [rbp - 0x5d]
add dword [rdi + 0x2058], ecx
test eax, eax
je 0x140200f7e
xor eax, eax
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
lea rcx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
test r12, r12
je 0x140200ea2
cmp word [r12], 0
jne 0x140200ead
lea rax, [0x14027bbe8]
mov qword [rbp - 0x41], rax
mov rbx, qword [rbp - 0x51]
movzx esi, word [rbp - 3]
movzx r14d, word [rbp - 5]
movzx r15d, word [rbp - 7]
movzx r12d, word [rbp - 9]
movzx r13d, word [rbp - 0xb]
movzx eax, word [rbp - 0xf]
mov dword [rbp - 0x45], eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
movsxd rdx, dword [rbp - 0x49]
lea r8, [0x1402d7830]
mov qword [rsp + 0x78], rbx
mov rcx, qword [rbp - 0x59]
mov qword [rsp + 0x70], rcx
mov rcx, qword [rbp - 0x41]
mov qword [rsp + 0x68], rcx
mov dword [rsp + 0x60], esi
mov dword [rsp + 0x58], r14d
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], r13d
mov ecx, dword [rbp - 0x45]
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], eax
mov rax, qword [r8 + rdx*8]
mov qword [rsp + 0x20], rax
lea r9, str._s_t_4u_t_4u_t_02d__02d__02d:_02d:_02d._03d_t_s_t_s:_t_s_r_n
or rsi, 0xffffffffffffffff
mov r8, rsi
mov edx, 0x1000
mov rbx, qword [rbp - 0x29]
mov rcx, rbx
call fcn.1400350b0
lea r8d, [rax + rax]
mov qword [rsp + 0x20], 0
lea r9, [rbp - 0x5d]
mov rdx, rbx
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [rbp - 0x5d]
add dword [rbx + 0x2058], eax
mov rbx, qword [rbp - 0x39]
mov r13, qword [rbp - 0x21]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rdx, qword [rbp - 0x51]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140200faf
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x59]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x140200fca
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbp - 1]
xor rcx, rsp
call fcn.1401cb5d0
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret