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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x4d0
lea rbp, [rsp + 0x40]
mov rax, qword [0x1406836b8]
xor rax, rbp
mov qword [rbp + 0x480], rax
mov r15, r8
mov r14, rdx
mov rdi, rcx
xor r12d, r12d
xor edx, edx
lea rcx, [rbp + 0x40]
mov r8d, 0x432
mov esi, r12d
mov ebx, r9d
call sub.VCRUNTIME140.dll_memset
mov eax, ILFindChild
mov qword [rsp + 0x30], r12
and ebx, 1
mov dword [rsp + 0x28], r12d
xor r9d, r9d
mov dword [rbp + 0x40], 0x4034b50
mov edx, 0x80000000
mov dword [rbp + 0x46], 0x80000
mov rcx, r14
mov word [rbp + 0x44], ax
lea r8d, [rbx*2 + 1]
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1401b3c61
lea rdx, [rbp + 0x1c]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
lea r9, [rbp + 0x20]
mov rcx, rbx
lea r8, [rbp + 0x28]
mov dword [rbp + 0x56], eax
lea rdx, [rbp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x1401b3c4f
lea rdx, [rbp + 0x18]
mov word [rbp + 8], r12w
lea rcx, [rbp + 0x20]
mov word [rbp + 4], r12w
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea r8, [rbp + 8]
lea rdx, [rbp + 4]
lea rcx, [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx eax, word [rbp + 4]
mov r8, r14
mov word [rbp + 0x4c], ax
mov rdx, r15
movzx eax, word [rbp + 8]
mov rcx, rdi
mov word [rbp + 0x4a], ax
call fcn.1401b3900
mov r14, rax
test rax, rax
je 0x1401b3c54
mov qword [rsp + 0x38], r12
lea r9d, [r12 - 1]
mov qword [rsp + 0x30], r12
mov r8, rax
mov dword [rsp + 0x28], r12d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
dec ax
movzx edx, ax
mov word [rbp + 0x5a], dx
lea rax, [rdx + 1]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1401b3ad5
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.14039bb40
sub rsp, rcx
lea r8d, [rdx + 1]
xor r9d, r9d
mov rdx, r14
lea rsi, [rsp + 0x40]
mov rcx, rsi
call fcn.14019edd0
mov eax, dword [rdi + 0x18]
lea rcx, [rbp + 0x62]
mov r9, 0xffffffffffffffff
mov dword [rbp + 0x5e], eax
mov r8, r14
mov dword [rbp], r12d
mov edx, 0x104
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov rcx, qword [rdi + 8]
lea r9, [rbp]
mov r8d, 0x1e
mov word [rbp + 0x26a], r12w
lea rdx, [rbp + 0x40]
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
mov eax, dword [rbp]
add dword [rdi + 0x18], eax
test ecx, ecx
je 0x1401b3c3d
movzx r8d, word [rbp + 0x5a]
lea r9, [rbp]
mov rcx, qword [rdi + 8]
mov rdx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
mov eax, dword [rbp]
add dword [rdi + 0x18], eax
test ecx, ecx
je 0x1401b3c3d
lea r9, [rbp + 0xc]
mov rdx, rbx
lea r8, [rbp + 0x10]
mov rcx, rdi
call fcn.1401b3c90
mov ecx, dword [rbp + 0x10]
mov esi, eax
mov dword [rbp + 0x52], ecx
mov ecx, dword [rbp + 0xc]
mov dword [rbp + 0x4e], ecx
test eax, eax
js 0x1401b3c54
mov edx, dword [rbp + 0x5e]
xor r9d, r9d
mov rcx, qword [rdi + 8]
add edx, 0xe
xor r8d, r8d
mov dword [rbp + 0xc], r12d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rdi + 8]
lea r9, [rbp]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rbp + 0x4e]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi + 8]
lea r9, [rbp]
mov r8d, 4
mov qword [rsp + 0x20], r12
lea rdx, [rbp + 0x52]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [rdi + 0x18]
xor r9d, r9d
mov rcx, qword [rdi + 8]
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov rcx, qword [rdi + 0x10]
lea rax, [rbp + 0xc]
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
mov r8d, 0x432
lea rdx, [rbp + 0x40]
call sym.ErrorReportClient.exe_SfList_AllocAndInsertItem
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x1401b3c66
mov rcx, rbx
mov esi, 0x8004e009
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x1401b3c66
mov esi, 0x8004e00b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x1401b3c66
mov eax, 0x8004e006
mov rcx, qword [rbp + 0x480]
xor rcx, rbp
call fcn.14039bbb0
lea rsp, [rbp + 0x490]
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret