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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x3a0
mov rax, qword [0x180161180]
xor rax, rsp
mov qword [rsp + 0x398], rax
mov dword [rsp + 0x2c8], 0x1f
mov qword [rsp + 0x340], 0xffffffffffffffff
mov dword [rsp + 0x36c], 0
mov dword [rsp + 0x2c0], 0
mov dword [rsp + 0x2c4], 0
mov qword [rsp + 0x348], 0xffffffffffffffff
mov dword [rsp + 0x368], 0
mov dword [rsp + 0x2cc], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rsp + 0x3b0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x340], rax
cmp qword [rsp + 0x340], 0xffffffffffffffff
jne 0x18006b526
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x2c8]
mov rdx, qword [rsp + 0x3b0]
lea rcx, [0x1800048d0]
call fcn.1800892c0
jmp 0x18006c07d
lea rdi, [rsp + 0x2d0]
xor eax, eax
mov ecx, 0x60
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x36c]
mov r8d, 0x60
lea rdx, [rsp + 0x2d0]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18006b595
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180004870]
call fcn.1800892c0
jmp 0x18006c07d
mov eax, dword [rsp + 0x36c]
cmp rax, 0x60
je 0x18006b5de
mov dword [rsp + 0x2c8], 0x3e4
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, 0x60
mov edx, dword [rsp + 0x36c]
lea rcx, [0x180004800]
call fcn.1800892c0
jmp 0x18006c07d
mov r8d, 0x10
lea rdx, [0x1800047e0]
lea rcx, [rsp + 0x2d0]
call fcn.1800ec2a0
test eax, eax
je 0x18006b627
mov dword [rsp + 0x2c8], 0xb
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180004790]
call fcn.1800892c0
jmp 0x18006c07d
movzx eax, byte [rsp + 0x2e2]
test eax, eax
jle 0x18006b66d
mov dword [rsp + 0x2c8], 0xb
movzx edx, byte [rsp + 0x2e2]
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
xor r8d, r8d
lea rcx, [0x180004720]
call fcn.1800892c0
jmp 0x18006c07d
movzx eax, word [rsp + 0x2e4]
cmp eax, 1
jle 0x18006b6b7
mov dword [rsp + 0x2c8], 0xb
movzx edx, word [rsp + 0x2e4]
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, 1
lea rcx, [0x1800046b0]
call fcn.1800892c0
jmp 0x18006c07d
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x320]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x2c0], eax
mov eax, dword [rsp + 0x320]
cmp dword [rsp + 0x2c0], eax
je 0x18006b729
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x320]
mov edx, dword [rsp + 0x2c0]
lea rcx, [0x180004620]
call fcn.1800892c0
jmp 0x18006c07d
lea rdi, [rsp + 0x350]
xor eax, eax
mov ecx, 0x18
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x36c]
mov r8d, 0x18
lea rdx, [rsp + 0x350]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18006b798
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x1800045b0]
call fcn.1800892c0
jmp 0x18006c07d
mov eax, dword [rsp + 0x36c]
cmp rax, 0x18
je 0x18006b7e1
mov dword [rsp + 0x2c8], 0x3e4
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, 0x18
mov edx, dword [rsp + 0x36c]
lea rcx, [0x180004560]
call fcn.1800892c0
jmp 0x18006c07d
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x364]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x2c0], eax
mov eax, dword [rsp + 0x364]
cmp dword [rsp + 0x2c0], eax
je 0x18006b853
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x364]
mov edx, dword [rsp + 0x2c0]
lea rcx, [0x1800044d0]
call fcn.1800892c0
jmp 0x18006c07d
mov rdi, qword [rsp + 0x3b8]
xor eax, eax
mov ecx, 0x7664
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x3b8]
mov dword [rax + 0x74d0], 0
mov rax, qword [rsp + 0x3c0]
mov byte [rax], 1
mov dword [rsp + 0x2c4], 0
jmp 0x18006b89f
mov eax, dword [rsp + 0x2c4]
add eax, 1
mov dword [rsp + 0x2c4], eax
movzx eax, byte [rsp + 0x35a]
cmp dword [rsp + 0x2c4], eax
jae 0x18006c015
mov eax, dword [rsp + 0x364]
mov ecx, dword [rsp + 0x2c4]
imul rcx, rcx, 0x50
add rax, rcx
xor r9d, r9d
xor r8d, r8d
mov edx, eax
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x2c0], eax
mov edx, dword [rsp + 0x2c0]
mov eax, dword [rsp + 0x364]
mov ecx, dword [rsp + 0x2c4]
imul rcx, rcx, 0x50
add rax, rcx
cmp rdx, rax
je 0x18006b955
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r8d, dword [rsp + 0x364]
mov eax, dword [rsp + 0x2c4]
imul rax, rax, 0x50
add r8, rax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c0]
lea rcx, [0x180004430]
call fcn.1800892c0
jmp 0x18006c07d
lea rdi, [rsp + 0x50]
xor eax, eax
mov ecx, 0x50
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x36c]
mov r8d, 0x50
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18006b9c6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x1800043c0]
call fcn.1800892c0
jmp 0x18006c07d
mov eax, dword [rsp + 0x36c]
cmp rax, 0x50
je 0x18006ba1a
mov dword [rsp + 0x2c8], 0x3e4
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c4]
mov r8d, 0x50
mov edx, dword [rsp + 0x36c]
lea rcx, [0x180004350]
call fcn.1800892c0
jmp 0x18006c07d
movzx eax, byte [rsp + 0x51]
shr al, 3
and al, 7
movzx r9d, al
movzx eax, byte [rsp + 0x50]
and al, 7
movzx r8d, al
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x180004300]
call fcn.1800892c0
movzx eax, byte [rsp + 0x50]
and al, 7
movzx eax, al
test eax, eax
jle 0x18006c010
movzx eax, byte [rsp + 0x51]
shr al, 3
and al, 7
movzx eax, al
cmp eax, 1
je 0x18006bab7
mov dword [rsp + 0x2c8], 0xb
movzx eax, byte [rsp + 0x51]
shr al, 3
and al, 7
movzx edx, al
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c4]
mov r8d, 1
lea rcx, [0x180004290]
call fcn.1800892c0
jmp 0x18006c07d
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x84]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x2c0], eax
mov eax, dword [rsp + 0x84]
cmp dword [rsp + 0x2c0], eax
je 0x18006bb34
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x84]
mov r8d, dword [rsp + 0x2c0]
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x1800041f0]
call fcn.1800892c0
jmp 0x18006c07d
lea rdi, [rsp + 0x330]
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x36c]
mov r8d, 0x10
lea rdx, [rsp + 0x330]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18006bbab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x180004170]
call fcn.1800892c0
jmp 0x18006c07d
mov eax, dword [rsp + 0x36c]
cmp rax, 0x10
je 0x18006bbff
mov dword [rsp + 0x2c8], 0x3e4
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c4]
mov r8d, 0x10
mov edx, dword [rsp + 0x36c]
lea rcx, [0x1800040f0]
call fcn.1800892c0
jmp 0x18006c07d
mov edx, dword [rsp + 0x338]
lea rcx, [0x1800040b8]
call fcn.1800892c0
movzx eax, byte [rsp + 0x50]
and al, 7
movzx eax, al
cmp eax, 2
jle 0x18006bc2c
mov rax, qword [rsp + 0x3c0]
mov byte [rax], 2
movzx eax, byte [rsp + 0x50]
and al, 7
movzx eax, al
cmp eax, 1
jne 0x18006bc5e
mov rax, qword [rsp + 0x3b8]
movsxd rcx, dword [rax + 0x74d0]
imul rcx, rcx, 0x12b
mov rax, qword [rsp + 0x3b8]
mov byte [rax + rcx + 4], 1
mov edx, dword [rsp + 0x338]
sub edx, 0x96
mov rax, qword [rsp + 0x3b8]
movsxd rcx, dword [rax + 0x74d0]
mov rax, qword [rsp + 0x3b8]
mov dword [rax + rcx*4 + 0x74d4], edx
mov rax, qword [rsp + 0x3b8]
mov ecx, dword [rax + 0x74d0]
add ecx, 1
mov rax, qword [rsp + 0x3b8]
mov dword [rax + 0x74d0], ecx
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rsp + 0x330]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rsp + 0x2c0], eax
mov eax, dword [rsp + 0x330]
cmp dword [rsp + 0x2c0], eax
je 0x18006bd25
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x330]
mov r8d, dword [rsp + 0x2c0]
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x180004020]
call fcn.1800892c0
jmp 0x18006c07d
lea rdi, [rsp + 0x1b0]
xor eax, eax
mov ecx, 0x104
rep stosb byte [rdi], al
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x36c]
mov r8d, 0x104
lea rdx, [rsp + 0x1b0]
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18006bd9c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c4]
lea rcx, [0x180003fa0]
call fcn.1800892c0
jmp 0x18006c07d
lea rdx, [rsp + 0x1b0]
lea rcx, [0x180003f60]
call fcn.1800892c0
lea rdx, [rsp + 0x1b0]
mov qword [rsp + 0x378], rdx
mov rax, qword [rsp + 0x3c8]
mov qword [rsp + 0x380], rax
mov rax, qword [rsp + 0x380]
mov qword [rsp + 0x388], rax
mov rax, qword [rsp + 0x378]
movzx eax, byte [rax]
mov byte [rsp + 0x390], al
mov rcx, qword [rsp + 0x380]
movzx eax, byte [rsp + 0x390]
mov byte [rcx], al
mov rax, qword [rsp + 0x378]
add rax, 1
mov qword [rsp + 0x378], rax
mov rax, qword [rsp + 0x380]
add rax, 1
mov qword [rsp + 0x380], rax
cmp byte [rsp + 0x390], 0
jne 0x18006bde0
cmp dword [rsp + 0x338], 0
jne 0x18006c010
mov edx, dword [rsp + 0x338]
lea rcx, [0x180003f00]
call fcn.1800892c0
lea rdi, [rsp + 0xa0]
xor eax, eax
mov ecx, 0x104
rep stosb byte [rdi], al
lea r9, [rsp + 0x1b0]
mov r8, qword [rsp + 0x3d0]
lea rdx, [0x180003ef0]
lea rcx, [rsp + 0xa0]
call fcn.1800eb79c
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 3
mov edx, 0x80000000
lea rcx, [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x348], rax
cmp qword [rsp + 0x348], 0xffffffffffffffff
jne 0x18006bf15
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
mov eax, dword [rsp + 0x2c8]
mov dword [rsp + 0x20], eax
mov r9d, dword [rsp + 0x2c8]
mov r8d, dword [rsp + 0x2c4]
lea rdx, [rsp + 0xa0]
lea rcx, [0x180003e80]
call fcn.1800892c0
jmp 0x18006c07d
lea rdx, [rsp + 0x2cc]
mov rcx, qword [rsp + 0x348]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x368], eax
cmp dword [rsp + 0x368], 0xffffffff
jne 0x18006bf81
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x2c8], eax
cmp dword [rsp + 0x2c8], 0
je 0x18006bf81
mov r8d, dword [rsp + 0x2c8]
mov edx, dword [rsp + 0x2c8]
lea rcx, [0x180003e30]
call fcn.1800892c0
mov rcx, qword [rsp + 0x348]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18006c07d
mov rcx, qword [rsp + 0x348]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [rsp + 0x368]
mov dword [rsp + 0x370], edx
mov eax, dword [rsp + 0x2cc]
mov dword [rsp + 0x374], eax
mov rax, qword [rsp + 0x370]
cqo
mov ecx, 0x990
idiv rcx
mov qword [rsp + 0x370], rax
mov r8d, dword [rsp + 0x370]
mov edx, dword [rsp + 0x338]
lea rcx, [0x180003dd0]
call fcn.1800892c0
mov edx, dword [rsp + 0x370]
sub edx, 0x96
mov rax, qword [rsp + 0x3b8]
mov eax, dword [rax + 0x74d0]
sub eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x3b8]
mov dword [rax + rcx*4 + 0x74d4], edx
jmp 0x18006b88e
mov rax, qword [rsp + 0x3b8]
cmp dword [rax + 0x74d0], 0
jle 0x18006c072
mov rax, qword [rsp + 0x3b8]
mov eax, dword [rax + 0x74d0]
sub eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x3b8]
mov edx, dword [rax + rcx*4 + 0x74d4]
add edx, 0x96
mov rax, qword [rsp + 0x3b8]
mov eax, dword [rax + 0x74d0]
sub eax, 1
movsxd rcx, eax
mov rax, qword [rsp + 0x3b8]
mov dword [rax + rcx*4 + 0x74d4], edx
mov dword [rsp + 0x2c8], 0
cmp qword [rsp + 0x340], 0xffffffffffffffff
je 0x18006c096
mov rcx, qword [rsp + 0x340]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x18006c0bf
mov eax, dword [rsp + 0x2c8]
mov rcx, qword [rsp + 0x398]
xor rcx, rsp
call fcn.1800eb430
add rsp, 0x3a0
pop rdi
ret