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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x2f0], rbx
mov rax, qword [0x1800eb008]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov r15, rdx
mov r13, rcx
xor ebx, ebx
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x80], rbx
mov qword [rbp - 0x80], 7
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
cmp word [rdx], bx
jne 0x1800586aa
mov r8d, ebx
jmp 0x1800586ba
or r8, 0xffffffffffffffff
nop
inc r8
cmp word [rdx + r8*2], bx
jne 0x1800586b0
lea rcx, [rsp + 0x68]
call fcn.180004430
nop
mov rax, qword [r13 + 0x80]
lea rcx, [rsp + 0x68]
cmp rcx, rax
jae 0x180058717
mov rcx, qword [r13 + 0x78]
lea rdx, [rsp + 0x68]
cmp rcx, rdx
ja 0x180058717
lea rsi, [rsp + 0x68]
sub rsi, rcx
cmp rax, qword [r13 + 0x88]
jne 0x1800586fe
lea rcx, [r13 + 0x78]
call fcn.180047d80
mov rcx, qword [r13 + 0x80]
and rsi, 0xffffffffffffffe0
add rsi, qword [r13 + 0x78]
test rcx, rcx
je 0x18005874e
mov rdx, rsi
jmp 0x18005873a
cmp rax, qword [r13 + 0x88]
jne 0x180058729
lea rcx, [r13 + 0x78]
call fcn.180047d80
mov rcx, qword [r13 + 0x80]
test rcx, rcx
je 0x18005874e
lea rdx, [rsp + 0x68]
mov qword [rcx + 0x18], 7
mov qword [rcx + 0x10], rbx
mov word [rcx], bx
call fcn.180005e70
add qword [r13 + 0x80], 0x20
mov rax, qword [rbp - 0x80]
cmp rax, 8
jb 0x1800587c7
inc rax
mov rcx, qword [rsp + 0x68]
movabs rdx, 0x7fffffffffffffff
cmp rax, rdx
jbe 0x18005877d
call fcn.18008d744
int3
add rax, rax
cmp rax, 0x1000
jb 0x1800587c2
test byte [rsp + 0x68], 0x1f
je 0x180058795
call fcn.18008d744
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x1800587a4
call fcn.18008d744
int3
sub rcx, rax
cmp rcx, 8
jae 0x1800587b3
call fcn.18008d744
int3
cmp rcx, 0x27
jbe 0x1800587bf
call fcn.18008d744
int3
mov rcx, rax
call fcn.180072908
mov qword [rbp - 0x80], 7
mov qword [rsp + 0x78], rbx
mov word [rsp + 0x68], bx
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 1]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x180058894
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp eax, 0x21
ja 0x18005882e
movabs rcx, 0x300080020
bt rcx, rsi
jb 0x18005884c
cmp esi, 0xa7
je 0x18005884c
test esi, esi
jle 0x180058af8
movzx esi, si
or esi, 0x80070000
jmp 0x180058af8
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
jne 0x18005888c
call fcn.180002050
mov esi, eax
jmp 0x180058af8
mov dword [r13 + 0x24], 1
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1800588b2
call fcn.180002050
mov esi, eax
jmp 0x180058af8
xor edx, edx
mov r8d, 0x200
lea rcx, [rbp - 0x70]
call fcn.18008c000
mov dword [rsp + 0x40], ebx
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, 0x200
lea rdx, [rbp - 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800588f4
call fcn.180002050
mov esi, eax
jmp 0x180058af8
mov r8d, reloc.WS2_32.dll_setsockopt
lea rdx, str._Disk_DescriptorFile
lea rcx, [rbp - 0x70]
call fcn.1800ac140
test eax, eax
jne 0x1800589cb
mov rax, qword [rsp + 0x48]
cmp rax, 0x100000
jl 0x180058929
mov esi, 0x80004005
jmp 0x180058af8
lea ecx, [rax + 1]
lea rdx, [0x1800ece24]
call fcn.180072944
mov r14, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x18005894c
mov esi, 0x8007000e
jmp 0x1800589b4
mov r8d, dword [rsp + 0x48]
inc r8d
xor edx, edx
mov rcx, r14
call fcn.18008c000
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x18005897b
call fcn.180002050
jmp 0x1800589b2
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x48]
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800589a1
call fcn.180002050
jmp 0x1800589b2
xor r9d, r9d
mov r8, r15
mov rdx, r14
mov rcx, r13
call fcn.180058b40
mov esi, eax
test r14, r14
je 0x1800589c6
mov rcx, r14
call fcn.18007294c
mov qword [rsp + 0x58], rbx
jmp 0x180058af8
mov rax, qword [rbp - 0x70]
cmp eax, 0x44574f43
jne 0x1800589e0
mov esi, 0xe0033001
jmp 0x180058af8
cmp eax, 0x564d444b
je 0x1800589f1
mov esi, 0xe00e1001
jmp 0x180058af8
mov rax, qword [rsp + 0x48]
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x180058a15
mov esi, 0xe003300c
jmp 0x180058af8
cmp qword [rbp - 0x54], 0
jne 0x180058a26
mov esi, 0xe0033005
jmp 0x180058af8
cmp word [rbp - 0x23], 0
je 0x180058a37
mov esi, 0xe0033003
jmp 0x180058af8
mov esi, dword [rbp - 0x4c]
shl esi, 9
mov r12d, esi
lea rdx, [0x1800ece24]
mov ecx, esi
call fcn.180072944
mov r14, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x180058a65
mov esi, 0x8007000e
jmp 0x180058ae6
mov r8, r12
xor edx, edx
mov rcx, r14
call fcn.18008c000
mov rdx, qword [rbp - 0x54]
shl rdx, 9
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x180058a94
call fcn.180002050
jmp 0x180058ae4
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x40]
mov r8d, esi
mov rdx, r14
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180058ab8
call fcn.180002050
jmp 0x180058ae4
cmp rdi, 0xffffffffffffffff
je 0x180058ad0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rdi, 0xffffffffffffffff
mov qword [rsp + 0x50], rdi
mov r9d, 1
mov r8, r15
mov rdx, r14
mov rcx, r13
call fcn.180058b40
mov esi, eax
test r14, r14
je 0x180058af8
mov rcx, r14
call fcn.18007294c
mov qword [rsp + 0x58], rbx
cmp rdi, 0xffffffffffffffff
je 0x180058b07
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x50], 0xffffffffffffffff
mov eax, esi
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.180072920
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret