Function at 0x180185cd0
Capabilities:
Clear file content

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x48
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov rsi, rdx
mov rdi, rcx
mov rax, qword [rcx + 8]
mov rbx, qword [rax + 0x80]
cmp rbx, 0xffffffffffffffff
jne 0x180185e7d
cmp dword [rax + 0xa0], ebx
jne 0x180185e4f
cmp qword [rax + 0x78], 0
jne 0x180185e4f
lea rcx, [rax + 0x20]
mov rax, qword [rcx]
cmp dword [rax + 4], 0
jne 0x180185d33
mov rax, qword [rcx + 8]
cmp dword [rax + 4], 0
je 0x180185ed4
lea rdx, [rsp + 0x80]
call fcn.180158200
nop
mov rdx, rax
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public:_void___cdecl_QFile::constructor_class_QString_const____ptr64____ptr64
nop
mov rax, qword [rsp + 0x80]
mov ecx, dword [rax]
mov ebx, 0xffffffff
test ecx, ecx
je 0x180185d79
cmp ecx, ebx
je 0x180185d8f
mov ecx, ebx
mov rax, qword [rsp + 0x80]
lock xadd dword [rax], ecx
cmp ecx, 1
jne 0x180185d8f
mov edx, 2
lea r8d, [rdx + 6]
mov rcx, qword [rsp + 0x80]
call sym.Qt5Core.dll_public:_static_void___cdecl_QArrayData::deallocate_struct_QArrayData____ptr64__unsigned_long_long_unsigned___int64___unsigned_long_long_unsigned___int64__
mov dword [rsp + 0x70], 3
mov edx, 3
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public_virtual:_bool___cdecl_QFile::open_class_QFlags_enum_QIODevice::OpenModeFlag_____ptr64
test al, al
je 0x180185e3a
mov rdx, qword [rsp + 0x78]
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public_virtual:_bool___cdecl_QFile::resize_long_long___int64_____ptr64
movzx esi, al
test al, al
jne 0x180185e23
lea rdx, [rsp + 0x88]
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public:_class_QString___cdecl_QIODevice::errorString_void____ptr64
nop
mov r8, rax
mov edx, 0xc
mov rcx, rdi
call sym.Qt5Core.dll_protected:_void___cdecl_QAbstractFileEngine::setError_enum_QFileDevice::FileError__class_QString_const____ptr64____ptr64
nop
mov rax, qword [rsp + 0x88]
mov ecx, dword [rax]
test ecx, ecx
je 0x180185e0c
cmp ecx, 0xffffffff
je 0x180185e23
mov rax, qword [rsp + 0x88]
lock xadd dword [rax], ebx
cmp ebx, 1
jne 0x180185e23
mov edx, 2
lea r8d, [rdx + 6]
mov rcx, qword [rsp + 0x88]
call sym.Qt5Core.dll_public:_static_void___cdecl_QArrayData::deallocate_struct_QArrayData____ptr64__unsigned_long_long_unsigned___int64___unsigned_long_long_unsigned___int64__
nop
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public_virtual:_void___cdecl_QFile::destructor_void____ptr64
movzx eax, sil
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rcx, [rsp + 0x28]
call sym.Qt5Core.dll_public_virtual:_void___cdecl_QFile::destructor_void____ptr64
xor al, al
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp rbx, 0xffffffffffffffff
jne 0x180185e7d
mov rcx, qword [rax + 0x78]
test rcx, rcx
je 0x180185e68
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fileno]
mov ecx, eax
jmp 0x180185e6e
mov ecx, dword [rax + 0xa0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x180185ed4
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x30]
mov rbp, rax
mov rcx, qword [rdi]
mov r8, qword [rcx + 0x38]
mov rdx, rsi
mov rcx, rdi
call r8
test al, al
je 0x180185ec8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x180185ec8
mov rax, qword [rdi]
cmp rbp, rsi
cmovl rsi, rbp
mov rdx, rsi
mov rcx, rdi
call qword [rax + gethostname]
mov al, 1
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rax, qword [rdi]
mov rdx, rbp
mov rcx, rdi
call qword [rax + gethostname]
xor al, al
add rsp, 0x48
pop rdi
pop rsi
pop rbp
pop rbx
ret