Function at 0x1400509e0
Capabilities:
Copy file
Read file on windows
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x58]
sub rsp, 0x130
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov qword [rbp - 0x60], rcx
lea r13, vtable.micro::utils::QString.0
mov qword [rsp + 0x38], r13
mov rax, qword [rdx + 8]
mov qword [rsp + 0x40], rax
mov ebx, 1
test rax, rax
je 0x140050a40
lock add dword [rax - 0xc], ebx
or r8d, 0xffffffff
lea rdx, [0x14011aa58]
lea rcx, [rbp - 0x78]
call fcn.1400e6fc8
nop
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x50]
call fcn.1400e8e08
nop
mov qword [rbp - 0x78], r13
lea rcx, [rbp - 0x78]
call fcn.1400e712c
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x50]
call fcn.1400e8f80
nop
lea rcx, [rsp + 0x38]
call fcn.1400e7e20
xor r12d, r12d
mov esi, r12d
mov r15d, ebx
mov r14d, r12d
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x140050aa4
mov eax, dword [rdi - 8]
jmp 0x140050aa7
mov eax, r12d
cmp esi, eax
jge 0x140050b07
test rdi, rdi
je 0x140050ab6
mov r13d, dword [rdi - 8]
jmp 0x140050ab9
mov r13d, r12d
cmp word [r14 + rdi], 0x2d
jne 0x140050afc
mov eax, r13d
sub eax, esi
movsxd r8, eax
add r8, r8
movsxd rax, r15d
lea rdx, [rdi + rax*2]
movsxd rax, esi
lea rcx, [rdi + rax*2]
call qword [sym.imp.msvcrt.dll_memmove]
lea edx, [r13 - 1]
lea rcx, [rsp + 0x38]
call fcn.1400e71c4
sub esi, ebx
sub r15d, ebx
sub r14, 2
mov rdi, qword [rsp + 0x40]
add esi, ebx
add r15d, ebx
add r14, 2
jmp 0x140050a9a
test rdi, rdi
je 0x140050b11
mov eax, dword [rdi - 8]
jmp 0x140050b14
mov eax, r12d
cmp eax, 0x20
mov r12, qword [rbp - 0x60]
jl 0x140050cf8
xor r15d, r15d
mov word [rbp - 0x10], r15w
xor eax, eax
mov dword [rbp - 0xe], eax
mov esi, r15d
movzx eax, word [rdi]
mov word [rbp - 0x10], ax
movzx eax, word [rdi + 2]
mov word [rbp - 0xe], ax
mov dword [rsp + 0x30], r15d
lea r8, [rsp + 0x30]
lea rdx, [0x14011aa60]
lea rcx, [rbp - 0x10]
call qword [sym.imp.msvcrt.dll_swscanf]
mov al, byte [rsp + 0x30]
mov byte [rbp + rsi + 0x18], al
add rsi, rbx
lea rdi, [rdi + 4]
cmp rsi, 0x10
jl 0x140050b31
lea rdi, [0x14012da68]
mov rdx, rdi
mov rsi, qword [rsp + 0x70]
test rsi, rsi
cmovne rdx, rsi
lea r14, [r12 + 0x18]
mov rcx, rdi
cmp qword [r14 + 8], r15
cmovne rcx, qword [r14 + 8]
mov dword [rsp + 0x28], 0x1000
mov qword [rsp + 0x20], r15
xor r9d, r9d
xor r8d, r8d
call qword [sym.imp.KERNEL32.DLL_CopyFileExW]
test eax, eax
je 0x140050cfb
lea r12, vtable.micro::files::QFile.0
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], r15
test rsi, rsi
cmovne rdi, rsi
mov r8d, 2
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.1400e82c4
movzx eax, al
test eax, eax
je 0x140050cdd
mov byte [rbp - 8], r15b
xor eax, eax
mov qword [rbp - 7], rax
mov qword [rbp + 1], rax
mov qword [rbp + 9], rax
mov dword [rbp + 0x11], eax
mov word [rbp + 0x15], ax
mov byte [rbp + 0x17], al
mov dword [rsp + 0x34], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x34]
lea r8d, [rax + 0x20]
lea rdx, [rbp - 8]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.DLL_ReadFile]
cmp dword [rsp + 0x34], 0x20
jb 0x140050cdd
mov edx, r15d
lea r9, [rbp - 8]
mov ecx, edx
and ecx, 0x8000000f
jge 0x140050c4f
sub ecx, ebx
or ecx, 0xfffffff0
add ecx, ebx
mov eax, reloc.WS2_32.dll_ntohs
sub eax, ecx
cdqe
mov cl, byte [rbp + rax + 0x18]
xor byte [r9], cl
add edx, ebx
add r9, rbx
cmp edx, 0x20
jl 0x140050c3e
mov qword [rbp - 0x68], r15
lea r9, [rbp - 0x68]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x50]
mov rax, qword [rsp + 0x50]
call qword [rax + 0x28]
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x48]
mov r8d, 0x20
lea rdx, [rbp - 8]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.DLL_WriteFile]
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x78]
call fcn.1400ea694
nop
lea rdx, [rsp + 0x78]
mov rcx, r14
call fcn.1400e7b9c
nop
lea r13, vtable.micro::utils::QString.0
mov qword [rsp + 0x78], r13
lea rcx, [rsp + 0x78]
call fcn.1400e712c
jmp 0x140050ce7
mov bl, r15b
lea r13, vtable.micro::utils::QString.0
mov qword [rsp + 0x50], r12
lea rcx, [rsp + 0x50]
call fcn.1400e8500
jmp 0x140050d05
xor r15d, r15d
mov bl, r15b
lea r13, vtable.micro::utils::QString.0
mov qword [rsp + 0x68], r13
lea rcx, [rsp + 0x68]
call fcn.1400e712c
nop
lea rcx, [rbp - 0x50]
call fcn.1400e8f00
nop
mov qword [rsp + 0x38], r13
lea rcx, [rsp + 0x38]
call fcn.1400e712c
mov al, bl
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.140001010
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret