Function at 0x180010488
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x7d0]
sub rsp, 0x8d0
mov rax, qword [0x1800d61f8]
xor rax, rsp
mov qword [rbp + 0x7c0], rax
mov r14, rdx
mov r13, rcx
call fcn.180005ccc
mov rcx, qword [r14 + 0x20]
lea r9, [rsp + 0x30]
mov rdi, rax
lea rdx, [rbp - 0x40]
lea rax, [rbp - 0x68]
xor r12d, r12d
mov r15d, 0x200
mov qword [rsp + 0x20], rax
mov r8d, r15d
mov qword [rbp - 0x58], r12
mov qword [rbp - 0x50], r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x180010d62
cmp dword [rsp + 0x30], r15d
jne 0x180010d62
mov eax, 0xaa55
cmp word [rbp + 0x1be], ax
jne 0x180010d56
mov al, byte [rbp - 0x40]
cmp al, 0xeb
jne 0x180010528
cmp byte [rbp - 0x3e], 0x90
je 0x180010530
cmp al, 0xe9
jne 0x180010d56
movzx eax, word [rbp - 0x35]
mov qword [rsp + 0x40], rax
test rax, rax
jne 0x180010559
lea r9, str.This_is_not_a_FAT_disk__BytesPerSector_is_zero_.
xor r8d, r8d
lea edx, [r8 + 2]
mov rcx, rdi
call fcn.180004968
jmp 0x180010da0
movzx r10d, byte [rbp - 0x33]
mov qword [rsp + 0x48], r10
test r10, r10
jne 0x180010571
lea r9, str.This_is_not_a_FAT_disk__SectorsPerCluster_is_zero_.
jmp 0x180010545
movzx r9d, word [rbp - 0x2d]
mov qword [rsp + 0x50], r9
test r9, r9
jne 0x180010589
mov r9d, dword [rbp - 0x20]
mov qword [rsp + 0x50], r9
movzx eax, word [rbp - 0x2f]
movzx ecx, word [rbp - 0x35]
shl eax, 5
dec eax
add eax, ecx
cdq
idiv ecx
movsxd r11, eax
movzx eax, word [rbp - 0x2a]
mov qword [rsp + 0x58], r11
mov qword [rsp + 0x68], rax
test rax, rax
jne 0x1800105b9
mov eax, dword [rbp - 0x1c]
mov qword [rsp + 0x68], rax
movzx edx, word [rbp - 0x32]
movzx r8d, byte [rbp - 0x30]
sub r9, rdx
imul r8, rax
sub r9, r8
sub r9, r11
mov rax, r9
mov qword [rsp + 0x70], r9
lea rcx, [rdx + r8]
xor edx, edx
div r10
add rcx, r11
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x78], rax
cmp rax, 0xff5
jae 0x180010609
mov dword [r14 + 0x108], 0xc
lea r9, str.This_is_a_FAT12_disk.
jmp 0x180010637
cmp rax, 0xfff5
jae 0x180010625
mov dword [r14 + 0x108], 0x10
lea r9, str.This_is_a_FAT16_disk.
jmp 0x180010637
mov dword [r14 + 0x108], 0x20
lea r9, str.This_is_a_FAT32_disk.
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x48]
lea r8, [rbp - 0x3d]
imul rax, qword [rsp + 0x40]
mov esi, 8
lea rcx, [rbp + 0x1c0]
mov qword [r14 + 0x1a0], rax
mov r9d, esi
mov rax, qword [rsp + 0x78]
mov rdx, r15
mov qword [r14 + 0x198], rax
call fcn.180055c88
lea rax, [rbp + 0x1c0]
mov byte [rbp + 0x1c8], r12b
lea ebx, [rsi - 6]
mov qword [rsp + 0x20], rax
mov edx, ebx
lea r9, str.__OEMName:__S
xor r8d, r8d
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x40]
lea r9, str.__BytesPerSector:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x50]
lea r9, str.__TotalSectors:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x48]
lea r9, str.__SectorsPerCluster:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x58]
lea r9, str.__RootDirSectors:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x68]
lea r9, str.__FATSz:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x60]
lea r9, str.__FirstDataSector:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x70]
lea r9, str.__DataSec:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rax, qword [rsp + 0x78]
lea r9, str.__CountofClusters:__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x32]
lea r9, str.__ReservedSectors:__lu
mov dword [rsp + 0x20], eax
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, byte [rbp - 0x30]
lea r9, str.__NumberFATs:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x2f]
lea r9, str.__RootEntriesCount:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, byte [rbp - 0x2b]
lea r9, str.__MediaType:__X
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x28]
lea r9, str.__SectorsPerTrack:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x26]
lea r9, str.__NumberOfHeads:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov eax, dword [rbp - 0x24]
lea r9, str.__HiddenSectors:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
xor r8d, r8d
mov edx, ebx
cmp dword [r14 + 0x108], 0x20
mov rcx, rdi
je 0x180010902
movzx eax, byte [rbp - 0x1c]
lea r9, str.__BS_DrvNum:__u
mov dword [rsp + 0x20], eax
call fcn.180004968
movzx eax, byte [rbp - 0x1a]
lea r9, str.__BS_BootSig:__u
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov eax, dword [rbp - 0x19]
lea r9, str.__BS_VolID:__u
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
lea r9d, [rsi + 3]
mov rdx, r15
lea r8, [rbp - 0x15]
lea rcx, [rbp + 0x1c0]
call fcn.180055c88
lea rax, [rbp + 0x1c0]
mov byte [rbp + 0x1cb], r12b
lea r9, str.__VolLab:__S
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.180004968
lea r8, [rbp - 0xa]
jmp 0x180010a37
mov eax, dword [rbp - 0x1c]
lea r9, str.__FATSz32:__lu
mov dword [rsp + 0x20], eax
call fcn.180004968
movzx eax, word [rbp - 0x18]
lea r9, str.__ExtFlags:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x16]
lea r9, str.__FSVer:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov eax, dword [rbp - 0x14]
lea r9, str.__RootClus:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0x10]
lea r9, str.__FSInfo:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, word [rbp - 0xe]
lea r9, str.__BkBootSec:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, byte [rbp]
lea r9, str.__DrvNum:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
movzx eax, byte [rbp + 2]
lea r9, str.__BootSig:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov eax, dword [rbp + 3]
lea r9, str.__VolID:__lu
xor r8d, r8d
mov dword [rsp + 0x20], eax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov r9d, 0xb
lea r8, [rbp + 7]
mov rdx, r15
lea rcx, [rbp + 0x1c0]
call fcn.180055c88
lea rax, [rbp + 0x1c0]
mov byte [rbp + 0x1cb], r12b
lea r9, str.__VolLab:__S
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.180004968
lea r8, [rbp + 0x12]
mov r9, rsi
lea rcx, [rbp + 0x1c0]
mov rdx, r15
call fcn.180055c88
lea rax, [rbp + 0x1c0]
mov byte [rbp + 0x1c8], r12b
lea r9, str.__FilSysType:__S
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov eax, dword [r14 + 0x108]
cmp eax, 0xc
je 0x180010aaa
cmp eax, 0x10
je 0x180010a9b
cmp eax, 0x20
jne 0x180010a95
mov rax, qword [rsp + 0x78]
lea rsi, [rax*4 + 4]
jmp 0x180010abd
mov rsi, qword [rbp - 0x70]
jmp 0x180010abd
mov rax, qword [rsp + 0x78]
lea rsi, [rax*2 + 2]
jmp 0x180010abd
mov rcx, qword [rsp + 0x78]
lea rax, [rcx + 1]
shr rax, 1
lea rsi, [rcx + 1]
add rsi, rax
mov rcx, qword [rsp + 0x40]
xor edx, edx
mov rax, rsi
div rcx
test rdx, rdx
je 0x180010ad5
sub rcx, rdx
add rsi, rcx
mov rcx, rsi
call fcn.180026bf8
xor r8d, r8d
mov qword [rbp - 0x80], rax
mov edx, ebx
test rax, rax
jne 0x180010af7
lea r9, str.Error:_malloc___returned_NULL.
jmp 0x18001054c
movzx eax, word [rbp - 0x32]
lea r9, str.Reading_FAT___lu_bytes_at_offset_I64u
imul rax, qword [rsp + 0x40]
mov qword [rbp - 0x50], r12
mov rcx, rax
mov qword [rsp + 0x28], rax
shr rcx, 0x20
mov dword [rbp - 0x54], ecx
mov rcx, rdi
mov dword [rbp - 0x58], eax
mov qword [rsp + 0x20], rsi
call fcn.180004968
mov rdx, qword [rbp - 0x80]
lea rax, [rbp - 0x68]
mov rcx, qword [r14 + 0x20]
lea r9, [rsp + 0x30]
mov r8d, esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180010b77
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [r13]
lea r8, [rbp + 0x3c0]
mov edx, eax
mov r9, r15
call sym.JkDefrag.dll_public:_void___cdecl_JKDefragLib::SystemErrorStr_unsigned_long_int__wchar_t____ptr64__unsigned_long_long_unsigned___int64_____ptr64
lea r9, str.Error:__s
mov edx, ebx
jmp 0x180010d89
cmp dword [r14 + 0x108], 0x20
jne 0x180010bde
mov r9d, dword [rbp - 0x14]
lea rax, [rbp - 0x70]
lea r8, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov rdx, r14
mov rcx, r13
call fcn.180010e48
mov r15, qword [rbp - 0x70]
mov r12, rax
and qword [rsp + 0x28], 0
lea r8, [rsp + 0x40]
mov r9, r12
mov qword [rsp + 0x20], r15
mov rdx, r14
mov rcx, r13
call fcn.18000fd40
mov rcx, r12
call fcn.180053d58
mov rcx, qword [rbp - 0x80]
call fcn.180053d58
mov eax, 1
jmp 0x180010da2
movzx eax, word [rbp - 0x32]
movzx r15d, word [rbp - 0x2f]
movzx esi, byte [rbp - 0x30]
imul rsi, qword [rsp + 0x68]
mov r8, qword [rsp + 0x40]
add rsi, rax
shl r15d, 5
imul rsi, r8
mov eax, 0xffffffff
cmp r15, rax
jbe 0x180010c32
lea r9, str.Root_directory_is_too_big___I64u_bytes
mov qword [rsp + 0x20], r15
xor r8d, r8d
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rcx, qword [rbp - 0x80]
call fcn.180053d58
jmp 0x180010da0
mov rax, qword [rsp + 0x78]
inc rax
imul rax, qword [rsp + 0x48]
imul rax, r8
cmp rsi, rax
jbe 0x180010c69
mov qword [rsp + 0x28], rax
lea r9, str.Trying_to_access__I64u__but_the_last_sector_is_at__I64u
xor r8d, r8d
mov qword [rsp + 0x20], rsi
mov edx, ebx
mov rcx, rdi
call fcn.180004968
jmp 0x180010c24
xor edx, edx
mov rax, r15
div r8
mov rcx, r15
mov dword [rsp + 0x30], ecx
test rdx, rdx
je 0x180010c89
mov ecx, r8d
sub ecx, edx
add ecx, r15d
mov dword [rsp + 0x30], ecx
call fcn.180026bf8
xor r8d, r8d
mov r12, rax
mov rcx, rdi
test rax, rax
jne 0x180010caf
lea r9, str.Error:_malloc___returned_NULL.
mov edx, ebx
call fcn.180004968
jmp 0x180010c24
and qword [rbp - 0x50], 0
lea r9, str.Reading_root_directory___lu_bytes_at_offset_I64u.
mov rax, rsi
mov qword [rsp + 0x28], rsi
shr rax, 0x20
mov edx, 6
mov dword [rbp - 0x54], eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x20], eax
mov dword [rbp - 0x58], esi
call fcn.180004968
mov r8d, dword [rsp + 0x30]
lea rax, [rbp - 0x68]
mov rcx, qword [r14 + 0x20]
lea r9, [rsp + 0x30]
mov rdx, r12
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x180010ba5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [r13]
lea r8, [rbp + 0x3c0]
mov edx, eax
mov r9d, 0x200
call sym.JkDefrag.dll_public:_void___cdecl_JKDefragLib::SystemErrorStr_unsigned_long_int__wchar_t____ptr64__unsigned_long_long_unsigned___int64_____ptr64
lea rax, [rbp + 0x3c0]
xor r8d, r8d
lea r9, str.Error:__s
mov qword [rsp + 0x20], rax
mov edx, ebx
mov rcx, rdi
call fcn.180004968
mov rcx, qword [rbp - 0x80]
call fcn.180053d58
mov rcx, r12
jmp 0x180010c28
lea r9, str.This_is_not_a_FAT_disk__different_cookie_.
jmp 0x180010545
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [r13]
lea r8, [rbp + 0x3c0]
mov edx, eax
mov r9, r15
call sym.JkDefrag.dll_public:_void___cdecl_JKDefragLib::SystemErrorStr_unsigned_long_int__wchar_t____ptr64__unsigned_long_long_unsigned___int64_____ptr64
lea r9, str.Error_while_reading_bootblock:__s
mov edx, 2
lea rax, [rbp + 0x3c0]
xor r8d, r8d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call fcn.180004968
xor eax, eax
mov rcx, qword [rbp + 0x7c0]
xor rcx, rsp
call fcn.1800149a0
mov rbx, qword [rsp + 0x920]
add rsp, 0x8d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret