Function at 0x14005fbec
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x200]
sub rsp, 0x300
mov rax, qword [0x1403cd210]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rsi, rcx
mov qword [rsp + 0x38], rcx
xor r15d, r15d
test rcx, rcx
jne 0x14005fc7b
lea ebx, [rcx + 5]
mov ecx, ebx
call fcn.1400e2070
lea edi, [rsi + 0x57]
test eax, eax
je 0x140060537
mov dword [rsp + 0x30], edi
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x28], rcx
lea rcx, str.Input_parameters_are_invalid:__d
mov qword [rsp + 0x20], rcx
lea r9d, [rsi + 0x2c]
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
jmp 0x140060537
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp eax, 0xffffffff
jne 0x14005fcde
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060537
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_get_filesize:__d
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 0x2f]
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
jmp 0x140060537
mov qword [rbp + 0x1c0], r15
mov r13d, 0xf
mov qword [rbp + 0x1c8], r13
mov byte [rbp + 0x1b0], r15b
mov rbx, rdi
test eax, eax
jne 0x14005fd11
mov qword [rbp + 0x1c0], rbx
mov byte [rbp + rdi + 0x1b0], r15b
jmp 0x14005fd23
xor r8d, r8d
mov rdx, rbx
lea rcx, [rbp + 0x1b0]
call fcn.140038df0
lea r14, [rbp + 0x1b0]
cmp qword [rbp + 0x1c8], 0x10
cmovae r14, qword [rbp + 0x1b0]
cmp qword [rbp + 0x1c0], rbx
jne 0x1400604d4
test r14, r14
je 0x1400604d4
lea rcx, [rbp + 0x1b0]
cmp qword [rbp + 0x1c8], 0x10
cmovae rcx, qword [rbp + 0x1b0]
mov r8, rbx
xor edx, edx
call fcn.140138ee0
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, edi
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14005fde2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x14006051b
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_read_in_host_file:__d
mov qword [rsp + 0x20], rax
lea r9d, [rbx + 0x42]
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
jmp 0x14006051b
cmp edi, dword [rsp + 0x40]
je 0x14005fe1d
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
lea edi, [rbx + 0x19]
test eax, eax
je 0x14006051b
mov dword [rsp + 0x30], edi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_read_in_hosts_file:__d
lea r9d, [rbx + 0x47]
jmp 0x140060500
xorps xmm0, xmm0
cvtsi2ss xmm0, rdi
mulss xmm0, dword [0x14037f8f8]
xor eax, eax
movss xmm1, dword [0x14037f960]
comiss xmm0, xmm1
jb 0x14005fe52
subss xmm0, xmm1
comiss xmm0, xmm1
jae 0x14005fe52
movabs rcx, 0x8000000000000000
mov rax, rcx
cvttss2si rdx, xmm0
add rdx, rax
mov qword [rbp + 0x160], r15
mov qword [rbp + 0x168], r13
mov byte [rbp + 0x150], r15b
cmp rdx, 0x10
jb 0x14005fe8b
mov r8b, r15b
lea rcx, [rbp + 0x150]
call fcn.14004a254
mov qword [rbp + 0x160], r15
mov r14b, r15b
mov qword [rbp + 0x180], r15
mov rbx, r13
mov qword [rbp + 0x188], rbx
mov byte [rbp + 0x170], r15b
lea rdx, [rbp + 0x1b0]
lea rcx, [rsp + 0x70]
call fcn.140060c70
nop
mov r8d, 0x401
lea rdx, str._..__mcafee.com_
lea rcx, [rsp + 0x48]
call fcn.14006060c
nop
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov r13d, 1
test byte [rbp + rcx - 0x80], r13b
jne 0x140060459
lea edi, [r13 + 7]
lea rsi, vtable.std::ios_base.0
lea rax, [rsp + 0x70]
add rcx, rax
mov dl, 0xa
call fcn.1400583ec
mov r8b, al
lea rdx, [rbp + 0x170]
lea rcx, [rsp + 0x70]
call fcn.140061040
mov rcx, qword [rax]
movsxd rdx, dword [rcx + 4]
test byte [rdx + rax + 0x10], 6
jne 0x140060229
lea rdx, [rbp + 0x170]
mov r9, qword [rbp + 0x170]
mov r10, qword [rbp + 0x188]
cmp r10, 0x10
cmovae rdx, r9
mov r8, qword [rbp + 0x180]
cmp r8, r13
jb 0x14005ffb7
lea rax, [r8 - 1]
or rcx, 0xffffffffffffffff
cmp rax, rcx
cmovb rcx, rax
add rcx, rdx
cmp byte [rcx], 0xd
jne 0x14005ff71
mov eax, r15d
test eax, eax
je 0x14005ff7b
cmp rcx, rdx
je 0x14005ffb7
sub rcx, r13
jmp 0x14005ff65
sub rcx, rdx
cmp rcx, 0xffffffffffffffff
je 0x14005ffb7
lea rcx, [r8 - 1]
lea rax, [rbp + 0x170]
cmp r10, 0x10
cmovae rax, r9
mov qword [rbp + 0x180], rcx
mov byte [rax + rcx], r15b
mov r10, qword [rbp + 0x188]
mov r8, qword [rbp + 0x180]
mov r9, qword [rbp + 0x170]
test r8, r8
je 0x1400601e1
lea rax, [rbp + 0x170]
cmp r10, 0x10
cmovae rax, r9
cmp byte [rax], 0x23
je 0x1400601e1
lea rdx, [rbp + 0x170]
lea rcx, [rbp + 0x60]
call fcn.140060c70
nop
mov qword [rbp + 0x1e0], r15
mov ebx, 0xf
mov qword [rbp + 0x1e8], rbx
mov byte [rbp + 0x1d0], r15b
add dword [rax], eax
add byte [rax - 0x73], cl
xchg ebp, eax
rol byte [rcx], 1
add byte [rax], al
lea rcx, [rbp + 0x60]
call fcn.140060e18
lea rdx, [rbp + 0x1d0]
mov rcx, rax
call fcn.140060e18
lea rdx, [rbp + 0x1d0]
lea rcx, [rbp + 0x190]
call fcn.140052048
nop
lea rcx, [rbp + 0x190]
call fcn.140041b4c
lea rcx, [rbp + 0x190]
call fcn.140031f64
lea rax, [rbp + 0x190]
mov r8, qword [rbp + 0x190]
cmp qword [rbp + 0x1a8], rdi
cmovae rax, r8
mov rcx, qword [rbp + 0x1a0]
lea r9, [rax + rcx*2]
lea rax, [rbp + 0x190]
cmovae rax, r8
lea r10, [rax + rcx*2]
lea rax, [rbp + 0x190]
cmovae rax, r8
jmp 0x140060098
cmp r15w, word [rax]
je 0x14006009d
add rax, 2
cmp rax, r10
jne 0x14006008e
cmp rax, r10
je 0x1400600c1
lea rcx, [rax + 2]
jmp 0x1400600bc
movzx edx, word [rcx]
cmp r15w, dx
je 0x1400600b8
mov word [rax], dx
add rax, 2
add rcx, 2
cmp rcx, r10
jne 0x1400600a8
mov r8, rax
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x190]
call fcn.140031be4
xor r8d, r8d
lea rdx, [rsp + 0x48]
lea rcx, [rbp + 0x190]
call fcn.14004c41c
test al, al
je 0x140060140
mov r14b, r13b
mov rcx, qword [rbp + 0x160]
cmp rcx, qword [rbp + 0x168]
jae 0x14006012a
lea rax, [rcx + 1]
mov qword [rbp + 0x160], rax
lea rax, [rbp + 0x150]
cmp qword [rbp + 0x168], 0x10
cmovae rax, qword [rbp + 0x150]
mov word [rax + rcx], 0x23
jmp 0x140060140
mov r9b, 0x23
mov r8b, r15b
mov rdx, r13
lea rcx, [rbp + 0x150]
call fcn.14004a34c
nop
mov rdx, qword [rbp + 0x1a8]
cmp rdx, rdi
jb 0x140060160
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x190]
call fcn.1400331fc
mov qword [rbp + 0x1a0], r15
mov qword [rbp + 0x1a8], 7
mov word [rbp + 0x190], r15w
mov rdx, qword [rbp + 0x1e8]
cmp rdx, 0x10
jb 0x140060196
inc rdx
mov rcx, qword [rbp + 0x1d0]
call fcn.1400331fc
mov qword [rbp + 0x1e0], r15
mov qword [rbp + 0x1e8], rbx
mov byte [rbp + 0x1d0], r15b
lea rcx, [rbp + 0xf0]
call fcn.140060bf4
nop
mov qword [rbp + 0xf0], rsi
lea rcx, [rbp + 0xf0]
call fcn.1400f77dc
nop
mov r10, qword [rbp + 0x188]
mov r8, qword [rbp + 0x180]
mov r9, qword [rbp + 0x170]
lea rdx, [rbp + 0x170]
cmp r10, 0x10
cmovae rdx, r9
lea rcx, [rbp + 0x150]
call fcn.140049b60
mov r8d, 2
lea rdx, [0x14035ec28]
lea rcx, [rbp + 0x150]
call fcn.140049b60
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
test byte [rbp + rcx - 0x80], r13b
je 0x14005fef5
test r14b, r14b
mov rsi, qword [rsp + 0x38]
je 0x140060452
xor r9d, r9d
xor r8d, r8d
mov edx, dword [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x14006028d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060449
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_set_seek_position_to_new_end_of_file:__d
lea r9d, [rbx + 0x79]
jmp 0x14006042f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1400602d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060449
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_set_the_new_end_of_file:__d
lea r9d, [rbx + 0x7f]
jmp 0x14006042f
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
jne 0x140060325
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060449
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_set_seek_position_to_beginning_of_file:__d
mov r9d, 0x8b
jmp 0x14006042f
lea rdx, [rbp + 0x150]
cmp qword [rbp + 0x168], 0x10
cmovae rdx, qword [rbp + 0x150]
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x38]
mov r8d, dword [rbp + 0x160]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140060396
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060449
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_write_out_cleaned_hosts_file:__d
mov r9d, 0x93
jmp 0x14006042f
mov eax, dword [rsp + 0x38]
cmp rax, qword [rbp + 0x160]
je 0x1400603ef
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
lea edi, [rbx + 0x18]
test eax, eax
je 0x140060449
mov dword [rsp + 0x30], edi
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_write_out_cleaned_hosts_file:__d
mov qword [rsp + 0x20], rax
lea r9d, [rdi + 0x7b]
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
jmp 0x140060449
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x140060452
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [rsp + 0x30], eax
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
test eax, eax
je 0x140060449
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, str.Failed_to_flush_hosts_file_to_disk:__d
mov r9d, 0x9f
mov qword [rsp + 0x20], rax
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
mov rbx, qword [rbp + 0x188]
jmp 0x14006045c
mov rbx, qword [rbp + 0x188]
mov edi, r15d
lea rcx, [rsp + 0x48]
call fcn.14004c308
nop
lea rcx, [rbp]
call fcn.140060bf4
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp], rax
lea rcx, [rbp]
call fcn.1400f77dc
nop
cmp rbx, 0x10
jb 0x14006049d
lea rdx, [rbx + 1]
mov rcx, qword [rbp + 0x170]
call fcn.1400331fc
nop
mov rdx, qword [rbp + 0x168]
cmp rdx, 0x10
jb 0x1400604b9
inc rdx
mov rcx, qword [rbp + 0x150]
call fcn.1400331fc
mov qword [rbp + 0x160], r15
mov qword [rbp + 0x168], 0xf
mov byte [rbp + 0x150], r15b
jmp 0x14006051b
mov ebx, 5
mov ecx, ebx
call fcn.1400e2070
lea edi, [rbx + 3]
test eax, eax
je 0x14006051b
mov dword [rsp + 0x38], edi
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, str.Unable_to_allocate_input_buffer_for_file:__d
lea r9d, [rbx + 0x39]
mov qword [rsp + 0x20], rax
lea r8, str._anonymous_namespace::_CleanHostsFile
lea rdx, str.E:BT98e4b0b8_6261_4b66_a156_8e0ef62b3d71UBF_1CSIS_srcCSISCommonHostFileLocker.cpp
mov ecx, ebx
call fcn.140032100
nop
mov rdx, qword [rbp + 0x1c8]
cmp rdx, 0x10
jb 0x140060537
inc rdx
mov rcx, qword [rbp + 0x1b0]
call fcn.1400331fc
mov eax, edi
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.140119fe0
lea r11, [rsp + 0x300]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret