Function at 0x1402b5d04
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x150
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1405420e0]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov r14, r8
mov r15, rdx
mov rsi, rcx
mov qword [rsp + 0x50], rcx
xor r8d, r8d
call fcn.140235678
cmp al, 1
jne 0x1402b5d7e
mov rcx, qword [rsp + 0x178]
lea rax, str.DataCollectionFileUtils::ConvertToUtf8:_original__output_files_cannot_be_the_same
mov qword [rsp + 0x20], rax
mov r9d, 0xa0
lea r8, str.amcorewcd_sourcecommands_adapters_srcdatacolectionfileutils.cpp
lea edx, [r9 - 0x3f]
call fcn.140078788
mov rcx, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402b5d8b
mov rcx, qword [rsi]
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rdi, rax
mov qword [rsp + 0x68], rax
cmp rax, 0xffffffffffffffff
setne r12b
mov rcx, qword [rsp + 0x178]
lea rax, str.DataCollectionFileUtils::ConvertToUtf8:_Failed_to_open_an_output_file
mov qword [rsp + 0x20], rax
movzx r9d, r12b
lea r8, str.amcorewcd_sourcecommands_adapters_srcdatacolectionfileutils.cpp
lea edx, [rbx + 0x6d]
call fcn.140060d38
lea rdx, [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x1402b5ee2
call fcn.1400550c0
mov r10, qword [rax + 8]
lea rbx, str.DataCollectionFileUtils::ConvertToUtf8:_Failed_to_get_original_size_of_the_output_file
cmp dword [r10], 3
jbe 0x1402b5eb4
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], 0x57
xor r8d, r8d
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402b5e4a
mov rax, qword [rsi]
lea r13, [0x1403cb630]
mov rdx, r13
mov rcx, r8
test rax, rax
je 0x1402b5e6d
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r8w
jne 0x1402b5e63
mov qword [rsp + 0x110], rdx
lea eax, [rcx*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], r8d
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
lea rdx, [0x140489896]
mov rcx, r10
call fcn.140001208
jmp 0x1402b5ebb
lea r13, [0x1403cb630]
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], rbx
movzx r9d, r12b
lea r12, str.amcorewcd_sourcecommands_adapters_srcdatacolectionfileutils.cpp
mov r8, r12
mov edx, 0x75
call fcn.140060d38
jmp 0x1402b5ef0
lea r13, [0x1403cb630]
lea r12, str.amcorewcd_sourcecommands_adapters_srcdatacolectionfileutils.cpp
mov rax, qword [rsp + 0x58]
mov dword [rsp + 0x48], eax
mov ecx, eax
cmp rcx, r14
ja 0x1402b5fdf
cmp eax, 0xffffffff
jae 0x1402b5fdf
xor r14d, r14d
test eax, eax
jne 0x1402b60a0
call fcn.1400550c0
mov r10, qword [rax + 8]
lea rbx, str.original_size_of_the_output_file_cannot_be_0
cmp dword [r10], 3
jbe 0x1402b5fd0
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], reloc.msi.dll_MsiGetActiveDatabase
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402b5f53
mov rax, qword [rsi]
mov rdx, r13
mov rcx, r14
test rax, rax
je 0x1402b5f6f
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r14w
jne 0x1402b5f65
mov qword [rsp + 0x110], rdx
lea eax, [rcx*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], r14d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x128], 4
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1404898cc]
mov rcx, r10
call fcn.140001208
mov r9d, 0xe8
lea edx, [r9 - 0x63]
jmp 0x1402b608b
call fcn.1400550c0
mov r10, qword [rax + 8]
lea rbx, str.DataCollectionFileUtils::ConvertToUtf8:_Original_file_size_exceeds_max_permitted_size
xor r14d, r14d
cmp dword [r10], 3
jbe 0x1402b6081
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], 0x56
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402b601d
mov rax, qword [rsi]
mov rdx, r13
mov rcx, r14
test rax, rax
je 0x1402b6039
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r14w
jne 0x1402b602f
mov qword [rsp + 0x110], rdx
lea eax, [rcx*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], r14d
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140489896]
mov rcx, r10
call fcn.140001208
mov r9d, 0xa0
lea edx, [r9 - 0x23]
mov qword [rsp + 0x20], rbx
mov r8, r12
mov rcx, qword [rsp + 0x178]
call fcn.140078788
mov rcx, r15
cmp qword [r15 + 0x18], 8
jb 0x1402b60ad
mov rcx, qword [r15]
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rbx, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
setne al
mov rcx, qword [rsp + 0x178]
lea rdx, str.DataCollectionFileUtils::ConvertToUtf8:_failed_to_create_a_file_for_localization
mov qword [rsp + 0x20], rdx
movzx r9d, al
mov r8, r12
mov edx, SysAllocStringByteLen
call fcn.140060d38
mov r14d, dword [rsp + 0x48]
and qword [rsp + 0x88], 0
mov qword [rsp + 0x90], SafeArrayLock
mov byte [rsp + 0x78], 0
lea rcx, [rsp + 0x78]
cmp r14, 0xf
ja 0x1402b6151
mov qword [rsp + 0x88], r14
mov r8d, r14d
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov byte [rsp + r14 + 0x78], 0
jmp 0x1402b615a
mov rdx, r14
call fcn.140071d40
nop
xor r14d, r14d
mov dword [rsp + 0x40], r14d
mov dword [rsp + 0x4c], r14d
lea rdx, [rsp + 0x78]
cmp qword [rsp + 0x90], 0x10
cmovae rdx, qword [rsp + 0x78]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
mov dword [rsp + 0x44], eax
test eax, eax
jne 0x1402b6295
call fcn.1400550c0
mov r10, qword [rax + 8]
lea r14, str.Failed_to_read_an_output_file
cmp dword [r10], 3
jbe 0x1402b6273
mov qword [rsp + 0x100], r14
mov qword [rsp + 0x108], reloc.Cabinet.dll_CreateCompressor
xor edx, edx
cmp qword [rsi + 0x18], 8
jb 0x1402b61df
mov rsi, qword [rsi]
mov rcx, r13
mov rax, rdx
test rsi, rsi
je 0x1402b61fa
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], dx
jne 0x1402b61f1
mov qword [rsp + 0x110], rcx
lea eax, [rax*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], edx
lea rax, [rsp + 0x44]
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x128], 4
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x130], rcx
mov qword [rsp + 0x138], 4
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 6
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x1404897be]
mov rcx, r10
call fcn.140001208
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov r8, r12
mov edx, 0xa1
call fcn.140060d38
jmp 0x1402b6374
cmp dword [rsp + 0x40], r14d
jne 0x1402b6377
call fcn.1400550c0
mov r10, qword [rax + 8]
lea r14, str.An_output_file_is_empty
cmp dword [r10], 3
jbe 0x1402b6355
mov qword [rsp + 0x100], r14
mov qword [rsp + 0x108], CreateCompressor
xor edx, edx
cmp qword [rsi + 0x18], 8
jb 0x1402b62da
mov rsi, qword [rsi]
mov rcx, r13
mov rax, rdx
test rsi, rsi
je 0x1402b62f5
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], dx
jne 0x1402b62ec
mov qword [rsp + 0x110], rcx
lea eax, [rax*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], edx
lea rax, [rsp + 0x40]
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x128], 4
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 5
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14048980a]
mov rcx, r10
call fcn.140001208
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], r14
mov r9d, 0xe8
mov r8, r12
lea edx, [r9 - 0x3f]
call fcn.140078788
xor r14d, r14d
mov qword [rsp + 0xa8], r14
mov qword [rsp + 0xb0], SafeArrayLock
mov byte [rsp + 0x98], r14b
mov edx, dword [rsp + 0x40]
cmp rdx, qword [rsp + 0x88]
ja 0x1402b63c3
lea rax, [rsp + 0x78]
cmp qword [rsp + 0x90], 0x10
cmovae rax, qword [rsp + 0x78]
mov qword [rsp + 0x88], rdx
mov byte [rax + rdx], r14b
jmp 0x1402b63d8
sub rdx, qword [rsp + 0x88]
xor r8d, r8d
lea rcx, [rsp + 0x78]
call fcn.140071ff4
mov r8d, 1
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0xb8]
call fcn.1400a0868
nop
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0xe0]
call fcn.14008cc40
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.140096848
lea rcx, [rsp + 0xe0]
call fcn.14007269c
nop
lea rcx, [rsp + 0xb8]
call fcn.140055f70
nop
lea rdx, [rsp + 0x98]
cmp qword [rsp + 0xb0], 0x10
cmovae rdx, qword [rsp + 0x98]
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x4c]
mov r8d, dword [rsp + 0xa8]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
mov dword [rsp + 0x44], eax
test eax, eax
jne 0x1402b6567
call fcn.1400550c0
mov rcx, qword [rax + 8]
lea rsi, str.DataCollectionFileUtils::ConvertToUtf8:_failed_writing_to_file
cmp dword [rcx], 3
jbe 0x1402b6540
mov qword [rsp + 0x100], rsi
mov qword [rsp + 0x108], 0x3f
cmp qword [r15 + 0x18], 8
jb 0x1402b64b0
mov r15, qword [r15]
mov rax, r14
test r15, r15
je 0x1402b64c9
mov r13, r15
or rax, 0xffffffffffffffff
inc rax
cmp word [r15 + rax*2], r14w
jne 0x1402b64bf
mov qword [rsp + 0x110], r13
lea eax, [rax*2 + 2]
mov dword [rsp + 0x118], eax
mov dword [rsp + 0x11c], r14d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x128], 4
lea rdx, [rsp + 0x4c]
mov qword [rsp + 0x130], rdx
mov qword [rsp + 0x138], 4
lea rax, [rsp + 0xe0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 6
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x14048976a]
call fcn.140001208
cmp dword [rsp + 0x44], r14d
setne al
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], rsi
movzx r9d, al
mov r8, r12
mov edx, 0xcc
call fcn.140060d38
nop
lea rcx, [rsp + 0x98]
call fcn.14007269c
nop
lea rcx, [rsp + 0x78]
call fcn.14007269c
nop
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1402b659a
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
nop
lea rax, [rdi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1402b65b3
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
xor eax, eax
jmp 0x1402b660b
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.140356560
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret