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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
xor r15d, r15d
mov word [rbp + 0x58], 0xbbef
mov qword [rax - 0x48], r15
mov r12, rdx
mov qword [rdx], r15
xor r9d, r9d
mov dword [rax - 0x50], 0x80
mov edx, 0x80000000
lea r8d, [r15 + 1]
mov byte [rbp + 0x5a], 0xbf
mov r13d, r15d
mov dword [rbp + 0x48], r15d
mov ebx, r15d
mov dword [rax - 0x58], 3
mov edi, r15d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
nop dword [rax + rax]
mov rsi, rax
mov r14d, 0x80070000
or rax, 0xffffffffffffffff
cmp rsi, rax
jne 0x140017364
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x140017393
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
nop dword [rax + rax]
mov edi, eax
cmp eax, 0xffffffff
jne 0x140017393
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, r14d
test eax, eax
cmovle ebx, eax
mov r14b, 1
test ebx, ebx
js 0x1400174f5
cmp edi, 2
jbe 0x1400174c6
lea r9, [rbp + 0x48]
mov qword [rsp + 0x20], r15
mov r8d, 2
lea rdx, [rbp + 0x50]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x1400173e7
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400174f5
cmp dword [rbp + 0x48], 2
mov eax, 0x80004005
cmovne ebx, eax
test ebx, ebx
js 0x1400174f5
movzx eax, word [rbp + 0x50]
mov ecx, 0xfeff
cmp ax, cx
jne 0x14001741c
mov r14b, r15b
add edi, 0xfffffffe
jmp 0x1400174c6
cmp edi, 3
jbe 0x140017490
cmp ax, word [rbp + 0x58]
jne 0x140017490
lea r9, [rbp + 0x48]
mov qword [rsp + 0x20], r15
mov r8d, 1
lea rdx, [rbp + 0x58]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x140017467
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400174f5
cmp dword [rbp + 0x48], 1
mov eax, 0x80004005
cmovne ebx, eax
test ebx, ebx
js 0x1400174f5
cmp byte [rbp + 0x58], 0xbf
jne 0x140017490
mov r13d, 0xfde9
add edi, 0xfffffffd
jmp 0x1400174c6
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x1400174c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400174f5
test r14b, r14b
je 0x1400175dd
lea r15d, [rdi + 1]
mov ecx, r15d
lea rdx, [0x1400ab718]
call fcn.1400a0ebc
xor ecx, ecx
mov r14, rax
test rax, rax
jne 0x140017528
mov ebx, 0x8007000e
or r14, 0xffffffffffffffff
cmp rsi, r14
je 0x14001750d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov eax, ebx
mov rbx, qword [rsp + 0x80]
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov eax, edi
lea r9, [rbp + 0x58]
mov qword [rsp + 0x20], rcx
mov r8d, edi
mov rdx, r14
mov byte [rax + r14], cl
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14001756a
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
js 0x1400175d0
lea r8d, [rdi + 2]
mov eax, 2
mul r8
mov rdi, 0xffffffffffffffff
lea rdx, [0x1400ab718]
cmovo rax, rdi
mov rcx, rax
call fcn.1400a0ebc
mov r9d, edi
mov dword [rsp + 0x28], r15d
mov r8, r14
mov qword [r12], rax
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop dword [rax + rax]
mov rcx, qword [r12]
xor edx, edx
test eax, eax
jle 0x1400175cb
cdqe
mov word [rcx + rax*2], dx
jmp 0x1400175d0
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x1400174f5
mov ecx, edi
mov eax, 2
shr ecx, 1
mov r14, 0xffffffffffffffff
inc ecx
mul rcx
lea rdx, [0x1400ab718]
cmovo rax, r14
mov rcx, rax
call fcn.1400a0ebc
mov rdx, rax
mov qword [r12], rax
mov eax, ebx
test rdx, rdx
mov ebx, 0x8007000e
cmove eax, ebx
mov ebx, eax
test eax, eax
js 0x1400174f9
lea r9, [rbp + 0x58]
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14001765c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, qword [r12]
test ebx, ebx
js 0x140017674
mov eax, dword [rbp + 0x58]
shr rax, 1
mov word [rcx + rax*2], r15w
jmp 0x1400174f9
call sub.msvcrt.dll_free
jmp 0x1400174f9