Function at 0x140274e8c
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 [0x14049e510]
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.1401fedf8
cmp al, 1
jne 0x140274f06
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.14006d0c0
mov rcx, rsi
cmp qword [rsi + 0x18], 8
jb 0x140274f13
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]
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.140062740
lea rdx, [rsp + 0x58]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14027505e
call fcn.14004d8a4
mov r10, qword [rax + 8]
lea rbx, str.DataCollectionFileUtils::ConvertToUtf8:_Failed_to_get_original_size_of_the_output_file
cmp dword [r10], 3
jbe 0x140275030
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], 0x57
xor r8d, r8d
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x140274fc6
mov rax, qword [rsi]
lea r13, [0x140344690]
mov rdx, r13
mov rcx, r8
test rax, rax
je 0x140274fe9
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r8w
jne 0x140274fdf
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, [0x1403e4966]
mov rcx, r10
call fcn.140001158
jmp 0x140275037
lea r13, [0x140344690]
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.140062740
jmp 0x14027506c
lea r13, [0x140344690]
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 0x14027515b
cmp eax, 0xffffffff
jae 0x14027515b
xor r14d, r14d
test eax, eax
jne 0x14027521c
call fcn.14004d8a4
mov r10, qword [rax + 8]
lea rbx, str.original_size_of_the_output_file_cannot_be_0
cmp dword [r10], 3
jbe 0x14027514c
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], reloc.msi.dll_MsiGetActiveDatabase
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x1402750cf
mov rax, qword [rsi]
mov rdx, r13
mov rcx, r14
test rax, rax
je 0x1402750eb
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r14w
jne 0x1402750e1
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, [0x1403e4a6c]
mov rcx, r10
call fcn.140001158
mov r9d, 0xe8
lea edx, [r9 - 0x63]
jmp 0x140275207
call fcn.14004d8a4
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 0x1402751fd
mov qword [rsp + 0x100], rbx
mov qword [rsp + 0x108], 0x56
mov rax, rsi
cmp qword [rsi + 0x18], 8
jb 0x140275199
mov rax, qword [rsi]
mov rdx, r13
mov rcx, r14
test rax, rax
je 0x1402751b5
mov rdx, rax
or rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], r14w
jne 0x1402751ab
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, [0x1403e4966]
mov rcx, r10
call fcn.140001158
mov r9d, 0xa0
lea edx, [r9 - 0x23]
mov qword [rsp + 0x20], rbx
mov r8, r12
mov rcx, qword [rsp + 0x178]
call fcn.14006d0c0
mov rcx, r15
cmp qword [r15 + 0x18], 8
jb 0x140275229
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]
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.140062740
mov r14d, dword [rsp + 0x48]
and qword [rsp + 0x88], 0
mov qword [rsp + 0x90], SafeArrayUnlock
mov byte [rsp + 0x78], 0
lea rcx, [rsp + 0x78]
cmp r14, 0xf
ja 0x1402752c7
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 0x1402752d0
mov rdx, r14
call fcn.140066a98
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]
mov dword [rsp + 0x44], eax
test eax, eax
jne 0x140275405
call fcn.14004d8a4
mov r10, qword [rax + 8]
lea r14, str.Failed_to_read_an_output_file
cmp dword [r10], 3
jbe 0x1402753e3
mov qword [rsp + 0x100], r14
mov qword [rsp + 0x108], reloc.Cabinet.dll_CreateCompressor
xor edx, edx
cmp qword [rsi + 0x18], 8
jb 0x14027534f
mov rsi, qword [rsi]
mov rcx, r13
mov rax, rdx
test rsi, rsi
je 0x14027536a
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], dx
jne 0x140275361
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, [0x1403e4ab0]
mov rcx, r10
call fcn.140001158
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], r14
xor r9d, r9d
mov r8, r12
mov edx, 0xa1
call fcn.140062740
jmp 0x1402754e4
cmp dword [rsp + 0x40], r14d
jne 0x1402754e7
call fcn.14004d8a4
mov r10, qword [rax + 8]
lea r14, str.An_output_file_is_empty
cmp dword [r10], 3
jbe 0x1402754c5
mov qword [rsp + 0x100], r14
mov qword [rsp + 0x108], DispGetParam
xor edx, edx
cmp qword [rsi + 0x18], 8
jb 0x14027544a
mov rsi, qword [rsi]
mov rcx, r13
mov rax, rdx
test rsi, rsi
je 0x140275465
mov rcx, rsi
or rax, 0xffffffffffffffff
inc rax
cmp word [rsi + rax*2], dx
jne 0x14027545c
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, [0x1403e4afc]
mov rcx, r10
call fcn.140001158
mov rcx, qword [rsp + 0x178]
mov qword [rsp + 0x20], r14
mov r9d, 0xe8
mov r8, r12
lea edx, [r9 - 0x3f]
call fcn.14006d0c0
xor r14d, r14d
mov qword [rsp + 0xa8], r14
mov qword [rsp + 0xb0], SafeArrayUnlock
mov byte [rsp + 0x98], r14b
mov edx, dword [rsp + 0x40]
cmp rdx, qword [rsp + 0x88]
ja 0x140275533
mov qword [rsp + 0x88], rdx
lea rax, [rsp + 0x78]
cmp qword [rsp + 0x90], 0x10
cmovae rax, qword [rsp + 0x78]
mov byte [rax + rdx], r14b
jmp 0x140275548
sub rdx, qword [rsp + 0x88]
xor r8d, r8d
lea rcx, [rsp + 0x78]
call fcn.140066da4
mov r8d, 1
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0xb8]
call fcn.1400917b0
nop
lea rdx, [rsp + 0xb8]
lea rcx, [rsp + 0xe0]
call fcn.140087b3c
mov rdx, rax
lea rcx, [rsp + 0x98]
call fcn.140087cf8
lea rcx, [rsp + 0xe0]
call fcn.1400550a8
nop
lea rcx, [rsp + 0xb8]
call fcn.14004e0f0
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]
mov dword [rsp + 0x44], eax
test eax, eax
jne 0x1402756d1
call fcn.14004d8a4
mov rcx, qword [rax + 8]
lea rsi, str.DataCollectionFileUtils::ConvertToUtf8:_failed_writing_to_file
cmp dword [rcx], 3
jbe 0x1402756aa
mov qword [rsp + 0x100], rsi
mov qword [rsp + 0x108], 0x3f
cmp qword [r15 + 0x18], 8
jb 0x14027561a
mov r15, qword [r15]
mov rax, r14
test r15, r15
je 0x140275633
mov r13, r15
or rax, 0xffffffffffffffff
inc rax
cmp word [r15 + rax*2], r14w
jne 0x140275629
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, [0x1403e499c]
call fcn.140001158
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.140062740
nop
lea rcx, [rsp + 0x98]
call fcn.1400550a8
nop
lea rcx, [rsp + 0x78]
call fcn.1400550a8
nop
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1402756fe
mov rcx, rbx
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop
lea rax, [rdi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140275711
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
xor eax, eax
jmp 0x14027575d
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.1402dfdb0
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