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

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x2a0
mov qword [rsp + 0x88], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov qword [r11 + 0x20], rbp
mov rax, qword [0x1800ff050]
xor rax, rsp
mov qword [rsp + 0x290], rax
mov r12, rdx
mov r14, rcx
mov qword [r11 - 0x248], 7
xor esi, esi
mov qword [rsp + 0x78], rsi
mov word [rsp + 0x68], si
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x60]
call fcn.1800027f0
nop
lea rcx, [r14 + 0x78]
lea rdx, [rsp + 0x60]
call fcn.180016400
nop
cmp qword [rsp + 0x80], 8
jb 0x18005c067
mov rcx, qword [rsp + 0x68]
call fcn.18006a4d4
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x18005c114
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x18005c0cd
cmp eax, 0x20
je 0x18005c0cd
cmp eax, 0xa7
je 0x18005c0cd
cmp eax, 0x21
je 0x18005c0cd
cmp eax, 0x13
je 0x18005c0cd
test eax, eax
jle 0x18005c0c8
movzx eax, ax
or eax, 0x80070000
jmp 0x18005c4c5
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x18005c10c
call fcn.180003180
nop
jmp 0x18005c4c5
mov dword [r14 + 0x24], 1
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x18005c143
call fcn.180003180
mov ebx, eax
cmp rdi, 0xffffffffffffffff
je 0x18005c13c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x18005c4c5
mov byte [rsp + 0x90], 0
xor edx, edx
mov r8d, 0x1ff
lea rcx, [rsp + 0x91]
call fcn.18006cf60
mov dword [rsp + 0x40], esi
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, 0x200
lea rdx, [rsp + 0x90]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005c1a6
call fcn.180003180
mov ebx, eax
cmp rdi, 0xffffffffffffffff
je 0x18005c19f
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x18005c4c5
mov r8d, reloc.WS2_32.dll_setsockopt
lea rdx, [0x1800e6960]
lea rcx, [rsp + 0x90]
call fcn.180079150
test eax, eax
jne 0x18005c2e8
mov rax, qword [rsp + 0x48]
cmp rax, 0x100000
jl 0x18005c1ee
cmp rdi, 0xffffffffffffffff
je 0x18005c1e4
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
jmp 0x18005c4c5
lea ecx, [rax + 1]
lea rdx, [0x180106f48]
call fcn.18006aaa4
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18005c223
cmp rdi, 0xffffffffffffffff
je 0x18005c219
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x18005c4c5
mov r8d, dword [rsp + 0x48]
inc r8d
xor edx, edx
mov rcx, rax
call fcn.18006cf60
xor r9d, r9d
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18005c271
call fcn.180003180
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c26a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x18005c4c5
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x48]
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005c2b6
call fcn.180003180
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c2af
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x18005c4c5
xor r9d, r9d
mov r8, r12
mov rdx, rbx
mov rcx, r14
call fcn.18005c500
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c2e1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x18005c4c5
mov eax, dword [rsp + 0x90]
cmp eax, 0x44574f43
jne 0x18005c30f
cmp rdi, 0xffffffffffffffff
je 0x18005c305
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0033001
jmp 0x18005c4c5
cmp eax, 0x564d444b
je 0x18005c32f
cmp rdi, 0xffffffffffffffff
je 0x18005c325
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe00e1001
jmp 0x18005c4c5
mov rax, qword [rsp + 0x48]
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x18005c362
cmp rdi, 0xffffffffffffffff
je 0x18005c358
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe003300c
jmp 0x18005c4c5
cmp qword [rsp + 0xac], 0
jne 0x18005c386
cmp rdi, 0xffffffffffffffff
je 0x18005c37c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0033005
jmp 0x18005c4c5
cmp word [rsp + 0xdd], 0
je 0x18005c3aa
cmp rdi, 0xffffffffffffffff
je 0x18005c3a0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xe0033003
jmp 0x18005c4c5
mov ebp, dword [rsp + 0xb4]
shl ebp, 9
mov r13d, ebp
lea rdx, [0x180106f48]
mov ecx, ebp
call fcn.18006aaa4
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18005c3eb
cmp rdi, 0xffffffffffffffff
je 0x18005c3e1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x8007000e
jmp 0x18005c4c5
mov r8, r13
xor edx, edx
mov rcx, rax
call fcn.18006cf60
mov rdx, qword [rsp + 0xac]
shl rdx, 9
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18005c43d
call fcn.180003180
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c436
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x18005c4c5
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, ebp
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18005c47d
call fcn.180003180
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c479
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
jmp 0x18005c4c5
cmp rdi, 0xffffffffffffffff
je 0x18005c495
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x50], rdi
mov r9d, 1
mov r8, r12
mov rdx, rbx
mov rcx, r14
call fcn.18005c500
mov esi, eax
mov rcx, rbx
call fcn.18006aaac
nop
cmp rdi, 0xffffffffffffffff
je 0x18005c4c3
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.18006a4f0
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret