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

Disassembly:
mov rax, rsp
push rsi
push rdi
push r14
sub rsp, 0x80
mov qword [rax - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rbp
mov rax, qword [0x1403ddfb8]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rdi, r8
mov rsi, rdx
xor r14d, r14d
mov dword [rsp + 0x44], r14d
cmp qword [r8 + 0x18], 8
jb 0x1400d0357
mov rcx, qword [r8]
jmp 0x1400d035a
mov rcx, rdi
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x1400d0474
mov eax, dword [0x1403f2658]
mov dword [rsp + 0x20], eax
mov r9, qword [str._no_host]
mov r8, qword [0x1403f2b80]
mov rdx, qword [str._no_group]
mov rcx, qword [0x1403f2660]
call fcn.140033d60
test rax, rax
je 0x1400d042b
mov rcx, qword [rax]
test rcx, rcx
je 0x1400d042b
mov rax, qword [rcx]
lea edx, [rbx + 2]
call qword [rax + 0x50]
test eax, eax
je 0x1400d042b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
cmp qword [rdi + 0x18], 8
jb 0x1400d03e9
mov rdi, qword [rdi]
mov qword [rsp + 0x50], rdi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
lea rax, str.failed_to_open_file:__s_with_error_code__d
mov qword [rsp + 0x20], rax
mov r9d, 0x27
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x26]
call fcn.140085070
mov qword [rsi + 0x18], 7
mov qword [rsi + 0x10], r14
cmp qword [rsi + 0x18], 8
jb 0x1400d0443
mov rax, qword [rsi]
jmp 0x1400d0446
mov rax, rsi
mov word [rax], r14w
movzx ecx, word [str._UNKNOWN]
neg cx
sbb r8, r8
and r8d, 8
lea rdx, str._UNKNOWN
mov rcx, rsi
call fcn.14002c3d0
nop
or rcx, 0xffffffffffffffff
jmp 0x1400d075e
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp eax, 0xffffffff
jne 0x1400d0519
mov ecx, 5
call fcn.1400294e0
test eax, eax
je 0x1400d04d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, str.failed_to_get_file_size:__d
mov qword [rsp + 0x20], rax
mov r9d, 0x2f
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x2a]
call fcn.140027910
mov qword [rsi + 0x18], 7
mov qword [rsi + 0x10], r14
cmp qword [rsi + 0x18], 8
jb 0x1400d04ed
mov rax, qword [rsi]
jmp 0x1400d04f0
mov rax, rsi
mov word [rax], r14w
movzx eax, word [str._UNKNOWN]
neg ax
sbb r8, r8
and r8d, 8
lea rdx, str._UNKNOWN
mov rcx, rsi
call fcn.14002c3d0
jmp 0x1400d0756
cmp ebp, 0xa00000
jbe 0x1400d055d
mov ecx, 5
call fcn.1400294e0
test eax, eax
je 0x1400d04d5
lea rax, str.file_too_large
mov qword [rsp + 0x20], rax
mov r9d, reloc.WS2_32.dll_getprotobynumber
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x31]
call fcn.140029450
jmp 0x1400d04d5
mov qword [rsp + 0x50], r14
mov rcx, rbp
test eax, eax
jne 0x1400d056e
mov rcx, r14
jmp 0x1400d0581
xor edx, edx
or rax, 0xffffffffffffffff
div rcx
cmp rax, 1
jb 0x1400d06d7
call fcn.14029de2c
mov rdi, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x1400d06d7
mov dword [rsp + 0x58], r14d
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x58]
mov r8d, ebp
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400d064e
lea ecx, [rax + 5]
call fcn.1400294e0
test eax, eax
je 0x1400d0606
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, str.failed_to_read_file:__d
mov qword [rsp + 0x20], rax
mov r9d, 0x44
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x3f]
call fcn.140027910
mov qword [rsi + 0x18], 7
mov qword [rsi + 0x10], r14
cmp qword [rsi + 0x18], 8
jb 0x1400d061e
mov rax, qword [rsi]
jmp 0x1400d0621
mov rax, rsi
mov word [rax], r14w
movzx eax, word [str._UNKNOWN]
neg ax
sbb r8, r8
and r8d, 8
lea rdx, str._UNKNOWN
mov rcx, rsi
call fcn.14002c3d0
nop
mov rcx, rdi
jmp 0x1400d0750
mov edx, dword [rsp + 0x58]
cmp edx, ebp
je 0x1400d0692
mov ecx, 5
call fcn.1400294e0
test eax, eax
je 0x1400d0606
lea rax, str.failed_to_read_the_right_amount_of_data
mov qword [rsp + 0x20], rax
mov r9d, 0x49
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x44]
call fcn.140029450
jmp 0x1400d0606
mov byte [rsp + 0x68], 0
xor eax, eax
mov qword [rsp + 0x69], rax
mov dword [rsp + 0x71], eax
mov word [rsp + 0x75], ax
mov byte [rsp + 0x77], al
lea r9d, [rax + 0x10]
lea r8, [rsp + 0x68]
mov rcx, rdi
call fcn.1400fff60
test eax, eax
jne 0x1400d0606
lea r8, [rsp + 0x68]
mov rdx, rsi
call fcn.1400d07b0
nop
mov rcx, rdi
jmp 0x1400d0750
mov ecx, 5
call fcn.1400294e0
test eax, eax
je 0x1400d070e
lea rax, str.failed_to_allocate_memory
mov qword [rsp + 0x20], rax
mov r9d, 0x3d
lea r8, str.Intel::Analytics::CHashSubstitution::Md5Hash
lea rdx, str.HashSubstitution.cpp
lea ecx, [r9 - 0x38]
call fcn.140029450
mov qword [rsi + 0x18], 7
mov qword [rsi + 0x10], r14
cmp qword [rsi + 0x18], 8
jb 0x1400d0726
mov rax, qword [rsi]
jmp 0x1400d0729
mov rax, rsi
mov word [rax], r14w
movzx eax, word [str._UNKNOWN]
neg ax
sbb r8, r8
and r8d, 8
lea rdx, str._UNKNOWN
mov rcx, rsi
call fcn.14002c3d0
nop
xor ecx, ecx
call fcn.140290594
nop
test rbx, rbx
je 0x1400d0764
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14026d870
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret