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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x17]
sub rsp, 0xf8
mov rax, qword [0x18004c110]
xor rax, rsp
mov qword [rbp + 7], rax
mov r12, qword [rbp + 0x7f]
mov r14, r9
mov qword [rbp - 0x71], r12
mov r15, r8
mov r13, rdx
mov rdi, rcx
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x18000a970
mov eax, 0x1000000
jmp 0x18000abe1
lea rdx, [rbp - 0x69]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x18000a98b
mov eax, 0x200
jmp 0x18000abe1
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
lea rcx, [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rdx, [rsp + 0x48]
lea rcx, [rbp - 0x31]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ebx, 8
lea rdx, [rsp + 0x48]
mov r8d, ebx
lea rcx, [rsp + 0x50]
call fcn.180010c60
mov r8d, ebx
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x58]
call fcn.180010c60
mov rsi, qword [rsp + 0x50]
lea rax, [rbp - 0x55]
sub rsi, qword [rsp + 0x58]
mov qword [rbp - 0x11], rax
xor ebx, ebx
lea rax, [rbp - 0x5d]
mov qword [rbp - 9], rax
lea rax, [rbp - 0x65]
mov qword [rbp - 1], rax
lea r12d, [rbx + 1]
mov rdx, qword [rbp + rbx*8 - 0x11]
lea rcx, [rsp + 0x60]
mov r8d, 8
call fcn.180010c60
mov rax, qword [rsp + 0x60]
lea rdx, [rbp - 0x79]
mov rcx, qword [rbp + rbx*8 - 0x11]
sub rax, rsi
mov r8d, 8
mov qword [rbp - 0x79], rax
call fcn.180010c60
add rbx, r12
cmp rbx, 3
jl 0x18000aa0e
mov eax, dword [rbp - 0x69]
xor ebx, ebx
mov edx, eax
and edx, r12d
cmovne ebx, r12d
mov r12, qword [rbp - 0x71]
test al, 2
je 0x18000aa65
or ebx, 2
test al, 4
je 0x18000aa6c
or ebx, 4
mov ecx, eax
and ecx, 0x10
je 0x18000aa76
or ebx, 0x10
test al, 0x20
je 0x18000aa7d
or ebx, 0x20
test ecx, ecx
je 0x18000aa87
bts ebx, 0x1e
jmp 0x18000aa8b
bts ebx, 0x1f
bts ebx, 0x18
test edx, edx
jne 0x18000aa97
bts ebx, 0x17
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp eax, 0x28
jbe 0x18000ab77
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 2
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
lea edx, [r9 + 0x24]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 4
lea rdx, [rsp + 0x38]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, 0x54ad
cmp word [rsp + 0x30], ax
jne 0x18000ab77
mov edx, dword [rsp + 0x38]
lea eax, [rdx + 0x34]
cmp esi, eax
jbe 0x18000ab77
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 4
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [rsp + 0x48]
cmp eax, 0x5a4d
je 0x18000ab73
add eax, 0xffffbab4
cmp eax, 4
ja 0x18000ab77
mov ecx, socket
bt ecx, eax
jae 0x18000ab77
bts ebx, 0x16
test r13, r13
je 0x18000ab80
mov dword [r13], ebx
test r15, r15
je 0x18000ab88
mov dword [r15], esi
test r14, r14
je 0x18000abb3
mov rcx, qword [rbp - 0x5d]
call fcn.18000bfec
mov rcx, qword [rbp - 0x55]
mov dword [r14], eax
call fcn.18000bfec
mov rcx, qword [rbp - 0x65]
mov dword [r14 + 4], eax
call fcn.18000bfec
mov dword [r14 + 8], eax
test r12, r12
je 0x18000abdf
lea r8, [rsp + 0x38]
lea rdx, [rsp + 0x30]
lea rcx, [rbp - 0x55]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx ecx, word [rsp + 0x30]
movzx eax, word [rsp + 0x38]
shl ecx, 0x10
or ecx, eax
mov dword [r12], ecx
xor eax, eax
mov rcx, qword [rbp + 7]
xor rcx, rsp
call fcn.18000fa50
add rsp, 0xf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret