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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x110
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1801563c0]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov r13d, r8d
mov rbp, rdx
mov rsi, rcx
mov qword [rsp + 0x68], rdx
xor r14d, r14d
cmp r8d, r14d
je 0x18005a04f
lea rcx, [0x180162178]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r15d, r14d
mov dword [rsp + 0x40], r14d
mov r12, r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [rbp]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x18005a0b6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x18005a3b5
cmp r15d, 0xa
jge 0x18005a3b5
inc r15d
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x18005a05a
lea rdx, [rsp + 0x44]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov r14d, eax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
test r12, r12
je 0x18005a0e5
mov rcx, r12
call fcn.1800d1434
lea ecx, [r14 + 2]
mov edi, ecx
call fcn.1800d04fc
mov r12, rax
mov r8, rdi
xor edx, edx
mov rcx, rax
call fcn.1800d7640
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x44]
mov r8d, r14d
mov rdx, r12
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movsxd rbx, dword [rsp + 0x40]
mov qword [rsp + reloc.WS2_32.dll_ntohs0], 0xf
mov qword [rsp + 0xe8], rdi
mov byte [rsp + 0xd8], dil
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0xd0]
call fcn.180003768
nop
mov rdi, qword [rsi + 8]
test rdi, rdi
je 0x18005a181
mov rcx, rdi
call fcn.1800c792c
mov rcx, rdi
call fcn.1800d1290
mov rdi, qword [rsi]
test rdi, rdi
je 0x18005a199
mov rcx, rdi
call fcn.180059dfc
mov rcx, rdi
call fcn.1800d1290
mov ecx, 0x100
call fcn.1800d1934
mov qword [rsp + 0x60], rax
xor edi, edi
cmp rax, rdi
je 0x18005a1b9
mov rcx, rax
call fcn.1800ca2a4
jmp 0x18005a1bc
mov rax, rdi
mov qword [rsi], rax
mov ecx, 0x18
call fcn.1800d1934
nop
cmp rax, rdi
je 0x18005a1de
mov byte [rax + 8], dil
btr dword [rax + 8], 8
mov qword [rax + 0x10], rdi
jmp 0x18005a1e1
mov rax, rdi
mov qword [rsi + 8], rax
and dword [rsp + 0x50], 0xfffffe00
mov qword [rsp + 0x58], rdi
xor r9d, r9d
mov r8, rax
lea rdx, [rsp + 0xd0]
mov rcx, qword [rsi]
call fcn.1800ca370
cmp al, dil
jne 0x18005a48b
cmp rbx, 0xa
jl 0x18005a326
lea rdx, [rsp + 0x78]
mov rcx, qword [rsi]
call fcn.1800cc1bc
nop
lea rcx, [rsp + 0xa0]
mov rdx, rax
mov r8d, 0x28
call fcn.1800d47b0
lea rdx, [rsp + 0xa0]
mov qword [rsp + 0x28], rdx
mov rax, qword [rbp]
mov qword [rsp + 0x20], rax
lea r9, str.CChromeJSONHelper_:_cannot_load_preferences_file_at_:__s__err_:__s
mov r8d, 0x71
lea rdx, str..ChromeJSONHelper.cpp
lea rcx, [0x18015f578]
call fcn.18000b1e8
nop
cmp qword [rsp + 0x98], 0x10
jb 0x18005a28e
mov rcx, qword [rsp + 0x80]
call fcn.1800d1290
mov rdi, qword [rsi + 8]
test rdi, rdi
je 0x18005a2a7
mov rcx, rdi
call fcn.1800c792c
mov rcx, rdi
call fcn.1800d1290
mov rdi, qword [rsi]
test rdi, rdi
je 0x18005a2bf
mov rcx, rdi
call fcn.180059dfc
mov rcx, rdi
call fcn.1800d1290
xor edi, edi
mov qword [rsi], rdi
mov qword [rsi + 8], rdi
mov rcx, r12
call fcn.1800d1434
cmp qword [rsi + 0x10], rdi
je 0x18005a401
mov ecx, dword [rsi + 0x18]
lea r14d, [rcx - 2]
call fcn.1800d04fc
mov r12, rax
mov r8d, dword [rsi + 0x18]
mov rdx, qword [rsi + 0x10]
mov rcx, rax
call fcn.1800d47b0
nop
lea rcx, [rsp + 0x48]
call fcn.1800c792c
nop
cmp qword [rsp + 0xf0], 0x10
jb 0x18005a129
mov rcx, qword [rsp + 0xd8]
call fcn.1800d1290
jmp 0x18005a129
mov rdi, qword [rsi + 8]
xor r14d, r14d
cmp rdi, r14
je 0x18005a342
mov rcx, rdi
call fcn.1800c792c
mov rcx, rdi
call fcn.1800d1290
mov rdi, qword [rsi]
cmp rdi, r14
je 0x18005a35a
mov rcx, rdi
call fcn.180059dfc
mov rcx, rdi
call fcn.1800d1290
mov qword [rsi], r14
mov qword [rsi + 8], r14
inc dword [rsp + 0x40]
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
lea rcx, [rsp + 0x48]
call fcn.1800c792c
nop
cmp qword [rsp + 0xf0], 0x10
jb 0x18005a394
mov rcx, qword [rsp + 0xd8]
call fcn.1800d1290
mov qword [rsp + reloc.WS2_32.dll_ntohs0], 0xf
mov qword [rsp + 0xe8], r14
mov byte [rsp + 0xd8], r14b
jmp 0x18005a05a
cmp r13d, r14d
je 0x18005a3c8
lea rcx, [0x180162178]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
mov rcx, qword [rbp]
add rcx, 0xfffffffffffffff4
lea rax, [0x18015f758]
cmp rcx, rax
je 0x18005a3f7
or eax, 0xffffffff
lock xadd dword [rcx], eax
dec eax
cmp eax, r14d
jg 0x18005a3f7
mov rcx, qword [rbp]
sub rcx, 0xc
call fcn.1800d1434
mov eax, 2
jmp 0x18005a532
cmp r13d, edi
je 0x18005a414
lea rcx, [0x180162178]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
lea rcx, [rsp + 0x48]
call fcn.1800c792c
nop
cmp qword [rsp + 0xf0], 0x10
jb 0x18005a437
mov rcx, qword [rsp + 0xd8]
call fcn.1800d1290
mov qword [rsp + reloc.WS2_32.dll_ntohs0], 0xf
mov qword [rsp + 0xe8], rdi
mov byte [rsp + 0xd8], dil
mov rcx, qword [rbp]
add rcx, 0xfffffffffffffff4
lea rax, [0x18015f758]
cmp rcx, rax
je 0x18005a481
or eax, 0xffffffff
lock xadd dword [rcx], eax
dec eax
cmp eax, edi
jg 0x18005a481
mov rcx, qword [rbp]
sub rcx, 0xc
call fcn.1800d1434
mov eax, 0x80004005
jmp 0x18005a532
mov rcx, qword [rsi + 0x10]
cmp rcx, rdi
je 0x18005a499
call fcn.1800d1290
lea ebx, [r14 + 2]
mov ecx, ebx
call fcn.1800d04fc
mov qword [rsi + 0x10], rax
mov r8d, ebx
mov rdx, r12
mov rcx, rax
call fcn.1800d47b0
mov dword [rsi + 0x18], ebx
mov rcx, r12
call fcn.1800d1434
nop
lea rcx, [rsp + 0x48]
call fcn.1800c792c
nop
cmp qword [rsp + 0xf0], 0x10
jb 0x18005a4e5
mov rcx, qword [rsp + 0xd8]
call fcn.1800d1290
mov qword [rsp + reloc.WS2_32.dll_ntohs0], 0xf
and qword [rsp + 0xe8], 0
mov byte [rsp + 0xd8], 0
mov rcx, qword [rbp]
add rcx, 0xfffffffffffffff4
lea rax, [0x18015f758]
cmp rcx, rax
je 0x18005a530
or eax, 0xffffffff
lock xadd dword [rcx], eax
dec eax
test eax, eax
jg 0x18005a530
mov rcx, qword [rbp]
sub rcx, 0xc
call fcn.1800d1434
xor eax, eax
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.1800d12b0
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret