Function at 0x14005fa70
Capabilities:
Delete file
Encode data using xor
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r15
lea rbp, [rsp - 0x400]
sub rsp, 0x500
mov r15, rcx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rdi, [r15 + 0xb00]
xor r12d, r12d
mov rsi, rdi
cmp qword [rdi], r12
jne 0x14005fad6
lea rdx, [0x14014fdc0]
mov ecx, 0x3b58
call fcn.14002e8b8
mov qword [rbp + 0x430], rax
test rax, rax
je 0x14005fac9
mov rcx, rax
call fcn.14005f090
jmp 0x14005facc
mov rax, r12
mov qword [rdi], rax
lea rsi, [r15 + 0xb00]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rdi]
test rcx, rcx
je 0x14006011a
mov rax, qword [rcx]
mov qword [rsp + 0x4f8], rbx
mov qword [rsp + 0x4f0], r13
mov qword [rsp + 0x4e8], r14
call qword [rax + 0x68]
movzx eax, byte [r15 + 0xb38]
test al, al
jne 0x14005fdf2
mov rcx, qword [rdi]
lea rdx, str.https:__download.mql5.com_cdn_dns_dns.dat
mov rax, qword [rcx]
call qword [rax + 0x78]
cmp eax, 0xc8
jne 0x14005fdf2
mov rcx, qword [rdi]
lea rdx, [rbp + 0x448]
mov qword [rbp + 0x448], r12
mov rax, qword [rcx]
call qword [rax + 0xa8]
mov r14, qword [rbp + 0x448]
mov rbx, rax
test rax, rax
je 0x1400600f5
cmp r14, 0xf8
jb 0x1400600f5
lea r13, [r15 + 0x120]
cmp word [r13], r12w
je 0x1400600f5
lea rdi, [rbp + 0x1e0]
mov rsi, rax
mov ecx, 0x3e
rep movsd dword [rdi], dword [rsi]
cmp dword [rbp + 0x1e0], 2
jne 0x1400600f5
mov rdx, r12
mov ecx, 9
lea r12, [0x140000000]
nop dword [rax]
movzx eax, word [rdx + r12 + 0x1b91b0]
cmp word [rbp + rdx + 0x1e4], ax
jne 0x1400600f5
add rdx, 2
sub rcx, 1
jne 0x14005fbb0
lea rdx, [0x1401b91c8]
lea rcx, [rbp + 0x264]
call fcn.14003e590
test eax, eax
jne 0x1400600f5
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test r13, r13
je 0x14005fcc9
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov rcx, r13
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x440], rax
cmp rax, 0xffffffffffffffff
je 0x14005fcd2
xor ecx, ecx
mov rsi, r14
mov edi, ecx
nop dword [rax]
nop dword [rax + rax]
mov r8d, 0xfffffff
mov dword [rbp + 0x430], ecx
cmp rsi, r8
mov qword [rsp + 0x20], rcx
lea rdx, [rdi + rbx]
mov rcx, rax
cmovb r8d, esi
lea r9, [rbp + 0x430]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14005fc9c
mov eax, dword [rbp + 0x430]
mov ecx, 0
add rdi, rax
sub rsi, rax
mov rax, qword [rbp + 0x440]
jne 0x14005fc50
jmp 0x14005fca6
mov dword [rbp + 0x430], 0
lock add qword [0x1401f3d68], rdi
mov rcx, qword [rbp + 0x440]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rdi, r14
je 0x14005fcc9
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r13, 0xffffffffffffffff
jmp 0x14005fcd5
mov r13, rax
xor ecx, ecx
call fcn.140035ae0
add rbx, 0xf8
mov qword [rbp + 0x430], rax
sub r14, 0xf8
mov dword [r15 + 0x550], 0
mov r9, rax
cmp r14, 0x288
jbe 0x1400600dd
add r14, 0xfffffffffffffd77
movabs rax, 0x948b0fcd6e9e0653
mul r14
sub r14, rdx
shr r14, 1
add r14, rdx
shr r14, 9
inc r14
lea rdi, [rsp + 0x50]
mov rsi, rbx
mov ecx, 0xa2
xor dl, dl
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x50]
xor esi, esi
mov r8d, 0x288
nop
movzx ecx, byte [rdi]
lea rdi, [rdi + 1]
mov rax, rsi
inc rsi
and eax, 0xf
add dl, byte [r12 + rax*4 + 0x1bd1e0]
xor dl, cl
mov byte [rdi - 1], dl
movzx edx, cl
sub r8, 1
jne 0x14005fd50
cmp word [rsp + 0x50], r8w
je 0x14005fddc
cmp word [rbp - 0x30], r8w
jne 0x14005fd8f
cmp word [rbp + 0xd0], r8w
je 0x14005fddc
mov rax, qword [rbp + 0x1d0]
test rax, rax
je 0x14005fda0
cmp rax, r9
jle 0x14005fddc
lea rdi, [r15 + 0x538]
mov edx, dword [rdi + 0x18]
mov rcx, rdi
inc edx
call fcn.140003020
test al, al
je 0x14005fdd5
mov eax, dword [rdi + 0x20]
lea rdx, [rsp + 0x50]
mov r8d, eax
imul eax, dword [rdi + 0x18]
mov ecx, eax
add rcx, qword [rdi + 0x10]
call fcn.14014cbf0
inc dword [rdi + 0x18]
mov r9, qword [rbp + 0x430]
add rbx, 0x288
sub r14, 1
jne 0x14005fd30
jmp 0x1400600dd
mov rcx, qword [rsi]
mov rax, qword [rcx]
call qword [rax + 0x68]
movzx eax, byte [r15 + 0xb38]
test al, al
jne 0x1400600f5
mov rcx, qword [rsi]
lea rdx, str.https:__download.metatrader.com_cdn_dns_dns.dat
mov rax, qword [rcx]
call qword [rax + 0x78]
cmp eax, 0xc8
jne 0x1400600f5
mov rcx, qword [rsi]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], r12
mov rax, qword [rcx]
call qword [rax + 0xa8]
mov r14, qword [rsp + 0x40]
mov rbx, rax
test rax, rax
je 0x1400600f5
cmp r14, 0xf8
jb 0x1400600f5
lea r13, [r15 + 0x120]
cmp word [r13], r12w
je 0x1400600f5
lea rdi, [rbp + 0x2e0]
mov rsi, rax
mov ecx, 0x3e
rep movsd dword [rdi], dword [rsi]
cmp dword [rbp + 0x2e0], 2
jne 0x1400600f5
mov rdx, r12
mov ecx, 9
lea r12, [0x140000000]
nop dword [rax]
movzx eax, word [rdx + r12 + 0x1b91b0]
cmp word [rbp + rdx + 0x2e4], ax
jne 0x1400600f5
add rdx, 2
sub rcx, 1
jne 0x14005fea0
lea rdx, [0x1401b91c8]
lea rcx, [rbp + 0x364]
call fcn.14003e590
test eax, eax
jne 0x1400600f5
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test r13, r13
je 0x14005ffb9
xor r9d, r9d
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov edx, 0x40000000
mov rcx, r13
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbp + 0x440], rax
cmp rax, 0xffffffffffffffff
je 0x14005ffc2
xor ecx, ecx
mov rsi, r14
mov edi, ecx
nop dword [rax]
nop dword [rax + rax]
mov r8d, 0xfffffff
mov dword [rbp + 0x438], ecx
cmp rsi, r8
mov qword [rsp + 0x20], rcx
lea rdx, [rdi + rbx]
mov rcx, rax
cmovb r8d, esi
lea r9, [rbp + 0x438]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x14005ff8c
mov eax, dword [rbp + 0x438]
mov ecx, 0
add rdi, rax
sub rsi, rax
mov rax, qword [rbp + 0x440]
jne 0x14005ff40
jmp 0x14005ff96
mov dword [rbp + 0x438], 0
lock add qword [0x1401f3d68], rdi
mov rcx, qword [rbp + 0x440]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp rdi, r14
je 0x14005ffb9
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r13, 0xffffffffffffffff
jmp 0x14005ffc5
mov r13, rax
xor ecx, ecx
call fcn.140035ae0
add rbx, 0xf8
mov qword [rbp + 0x430], rax
sub r14, 0xf8
mov dword [r15 + 0x550], 0
mov r9, rax
cmp r14, 0x288
jbe 0x1400600dd
add r14, 0xfffffffffffffd77
movabs rax, 0x948b0fcd6e9e0653
mul r14
sub r14, rdx
shr r14, 1
add r14, rdx
shr r14, 9
inc r14
lea rdi, [rsp + 0x50]
mov rsi, rbx
mov ecx, 0xa2
xor dl, dl
rep movsd dword [rdi], dword [rsi]
lea rdi, [rsp + 0x50]
xor esi, esi
mov r8d, 0x288
nop
movzx ecx, byte [rdi]
lea rdi, [rdi + 1]
mov rax, rsi
inc rsi
and eax, 0xf
add dl, byte [r12 + rax*4 + 0x1bd1e0]
xor dl, cl
mov byte [rdi - 1], dl
movzx edx, cl
sub r8, 1
jne 0x140060040
cmp word [rsp + 0x50], r8w
je 0x1400600cc
cmp word [rbp - 0x30], r8w
jne 0x14006007f
cmp word [rbp + 0xd0], r8w
je 0x1400600cc
mov rax, qword [rbp + 0x1d0]
test rax, rax
je 0x140060090
cmp rax, r9
jle 0x1400600cc
lea rdi, [r15 + 0x538]
mov edx, dword [rdi + 0x18]
mov rcx, rdi
inc edx
call fcn.140003020
test al, al
je 0x1400600c5
mov eax, dword [rdi + 0x20]
lea rdx, [rsp + 0x50]
mov r8d, eax
imul eax, dword [rdi + 0x18]
mov ecx, eax
add rcx, qword [rdi + 0x10]
call fcn.14014cbf0
inc dword [rdi + 0x18]
mov r9, qword [rbp + 0x430]
add rbx, 0x288
sub r14, 1
jne 0x140060020
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp r13, 0xffffffffffffffff
je 0x1400600f5
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [r15 + 0xb00]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov r13, qword [rsp + 0x4f0]
mov rbx, qword [rsp + 0x4f8]
mov r14, qword [rsp + 0x4e8]
add rsp, 0x500
pop r15
pop r12
pop rdi
pop rsi
pop rbp
ret