Function at 0x14003a350
Capabilities:
Get file size
Read file on windows

Disassembly:
push rbp
push rbx
push r13
push r15
lea rbp, [rsp - 0x838]
sub rsp, 0x938
mov rax, qword [0x14011e878]
xor rax, rsp
mov qword [rbp + 0x820], rax
xorps xmm0, xmm0
xor eax, eax
mov r15, rcx
movaps xmmword [rsp + 0x70], xmm0
xor r13d, r13d
movaps xmmword [rbp - 0x80], xmm0
lea rcx, [rbp + 0x12]
mov word [rbp - 0x70], r13w
xor edx, edx
mov qword [rbp + 2], rax
mov r8d, 0x3fe
mov qword [rbp + 0xa], rax
movups xmmword [rbp - 0x6e], xmm0
movups xmmword [rbp - 0x5e], xmm0
movups xmmword [rbp - 0x4e], xmm0
movups xmmword [rbp - 0x3e], xmm0
movups xmmword [rbp - 0x2e], xmm0
movups xmmword [rbp - 0x1e], xmm0
movups xmmword [rbp - 0xe], xmm0
call sub.VCRUNTIME140.dll_memset
xor edx, edx
mov word [rbp + 0x410], r13w
mov r8d, 0x3fe
lea rcx, [rbp + 0x412]
call sub.VCRUNTIME140.dll_memset
lea rcx, [rsp + 0x70]
mov word [rbp + 0x810], r13w
mov qword [rbp + 0x814], r13
call fcn.14003a010
test al, al
je 0x14003a6f9
lea rcx, [rsp + 0x70]
call fcn.140039b20
test al, al
je 0x14003a6f9
mov qword [rsp + 0x30], r13
mov ebx, 1
mov r8d, ebx
mov dword [rsp + 0x28], 0x8000080
xor r9d, r9d
mov qword [rsp + 0x968], rsi
mov edx, 0x80000000
mov qword [rsp + 0x50], r13
mov rcx, r15
mov qword [rsp + 0x58], r13
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
test rax, rax
jne 0x14003a47b
call fcn.1400023f0
mov r9, rax
lea rdx, str.Failed_to_create_the_file___ws____ws_
mov r8, r15
lea ecx, [rbx + 7]
call fcn.14002a3c0
jmp 0x14003a6c7
mov qword [rsp + 0x978], r12
lea rdx, [rsp + 0x40]
mov rcx, rsi
xor r12b, r12b
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x14003a69a
mov rcx, qword [rsp + 0x58]
mov qword [rsp + 0x970], rdi
mov edi, dword [rsp + 0x40]
mov dword [rsp + 0x60], r13d
test rcx, rcx
je 0x14003a4d3
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, qword [rsp + 0x50]
lea rdx, str.An_allocated_buffer_of__zu_bytes_has_been_freed.
mov ecx, 6
call fcn.14002a430
test rdi, rdi
je 0x14003a560
mov rcx, rdi
mov qword [rsp + 0x930], r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [rsp + 0x58], rax
mov r8, rdi
mov ecx, 6
mov r14, rax
test rax, rax
je 0x14003a515
lea rdx, [0x1400df1d0]
mov qword [rsp + 0x50], rdi
call fcn.14002a430
jmp 0x14003a521
lea rdx, str._Allocation__Failed_to_dynamically_allocate__zu_bytes.
call fcn.14002a3c0
test r14, r14
mov r14, qword [rsp + 0x930]
je 0x14003a560
mov r8d, dword [rsp + 0x50]
lea r9, [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003a560
mov eax, dword [rsp + 0x60]
cmp rax, qword [rsp + 0x50]
jne 0x14003a560
movzx r12d, bl
jmp 0x14003a57c
call fcn.1400023f0
mov r9, rax
lea rdx, str.Failed_to_read_the_content_of_the_file___ws____ws_
mov r8, r15
mov ecx, 8
call fcn.14002a3c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rdi, qword [rsp + 0x970]
test r12b, r12b
je 0x14003a6bf
cmp qword [rsp + 0x58], r13
je 0x14003a6bf
mov ecx, dword [rbp + 0x818]
lea r8, [rsp + 0x40]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x48], r13
call fcn.140038580
cmp qword [rsp + 0x48], r13
je 0x14003a663
mov r8, qword [rsp + 0x40]
lea rdx, str.Final_buffer_size:__u_bytes__max:__u_Kb_
mov r9d, 0x200
mov ecx, 8
call fcn.14002a430
cmp qword [rsp + 0x40], 0x80000
jae 0x14003a62c
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x40]
call fcn.140039bd0
mov rcx, qword [rsp + 0x48]
movzx ebx, al
test rcx, rcx
je 0x14003a665
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, qword [rsp + 0x40]
lea rdx, str.An_allocated_buffer_of__zu_bytes_has_been_freed.
mov ecx, 6
call fcn.14002a430
jmp 0x14003a665
lea rdx, str.Final_buffer_size_is_too_big_to_be_uploaded.
mov ecx, 8
call fcn.14002a3c0
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14003a663
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, qword [rsp + 0x40]
lea rdx, str.An_allocated_buffer_of__zu_bytes_has_been_freed.
mov ecx, 6
call fcn.14002a430
xor bl, bl
lea rax, str.Success
test bl, bl
lea r9, str.Failure
mov r8, r15
cmovne r9, rax
lea rdx, str.Energon_upload_for___ws__:__s
mov ecx, 8
call fcn.14002a430
call fcn.14002a400
movzx ebx, bl
xor ebx, 1
jmp 0x14003a6bf
call fcn.1400023f0
mov r9, rax
lea rdx, str.Failed_to_get_the_size_of_the_file___ws____ws_
mov r8, r15
mov ecx, 8
call fcn.14002a3c0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12, qword [rsp + 0x978]
mov rcx, qword [rsp + 0x58]
mov rsi, qword [rsp + 0x968]
test rcx, rcx
je 0x14003a6f5
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r8, qword [rsp + 0x50]
lea rdx, str.An_allocated_buffer_of__zu_bytes_has_been_freed.
mov ecx, 6
call fcn.14002a430
mov eax, ebx
jmp 0x14003a6fe
mov eax, 1
mov rcx, qword [rbp + 0x820]
xor rcx, rsp
call fcn.1400d51a0
add rsp, 0x938
pop r15
pop r13
pop rbx
pop rbp
ret