Function at 0x140004e40
Capabilities:
Delete file

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x550]
sub rsp, 0x650
mov rax, qword [0x140018af8]
xor rax, rsp
mov qword [rbp + 0x540], rax
mov r14, rcx
mov qword [rsp + 0x40], rcx
xor ebx, ebx
mov dword [rsp + 0x20], ebx
lea rcx, [rbp + 0x120]
call fcn.1400043a0
nop
mov dword [rsp + 0x28], ebx
lea rdx, [rbp + 0x120]
cmp qword [rbp + 0x138], 8
cmovae rdx, qword [rbp + 0x120]
xorps xmm0, xmm0
movups xmmword [rbp + 0xe0], xmm0
mov qword [rbp + 0xf0], rbx
mov qword [rbp + 0xf8], rbx
mov r8, qword [rbp + 0x130]
lea rcx, [rbp + 0xe0]
call fcn.1400015b0
mov r13d, 0xc
mov dword [rsp + 0x20], r13d
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x30], xmm0
xor r8d, r8d
lea rdx, [rbp + 0xe0]
lea rcx, [rsp + 0x30]
call fcn.140001c00
test eax, eax
jne 0x14000586e
mov rdx, qword [rbp + 0xf8]
cmp rdx, 8
jb 0x140004f52
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xe0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004f4d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004f4d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000cb60
mov r15, qword [rsp + 0x38]
test r15, r15
je 0x140004f6b
lock inc dword [r15 + 8]
mov r15, qword [rsp + 0x38]
mov r13d, dword [rsp + 0x20]
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x50], xmm0
test r15, r15
je 0x140004f8a
lock inc dword [r15 + 8]
mov r15, qword [rsp + 0x38]
mov r13d, dword [rsp + 0x20]
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x70], xmm1
mov r12, 0xffffffffffffffff
test r15, r15
je 0x140004fe0
mov eax, r12d
lock xadd dword [r15 + 8], eax
cmp eax, 1
jne 0x140004fd6
mov rbx, qword [rsp + 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140004fd6
mov r15, qword [rsp + 0x38]
mov rax, qword [r15]
mov rcx, r15
call qword [rax + 8]
jmp 0x140004fdb
mov r15, qword [rsp + 0x38]
mov r13d, dword [rsp + 0x20]
mov rax, qword [rsp + 0x50]
test rax, rax
je 0x140005763
lea rdi, [rax + 0x20]
mov rdx, rdi
lea rcx, [rbp + 0xa0]
call fcn.140002e00
or r13d, 1
mov dword [rsp + 0x20], r13d
lea r11, [rbp + 0xa0]
mov r10, qword [rbp + 0xa0]
mov rsi, qword [rbp + 0xb8]
cmp rsi, 8
cmovae r11, r10
mov rax, qword [rbp + 0xb0]
cmp rax, 4
jb 0x140005700
add rax, 0xfffffffffffffffd
lea rbx, [r11 + rax*2]
mov rax, r11
nop dword [rax]
nop word [rax + rax]
mov rcx, rbx
sub rcx, rax
sar rcx, 1
mov edx, 0
je 0x14000507c
cmp word [rax], 0x2e
je 0x140005079
cmp rcx, 1
je 0x14000507c
dec rcx
add rax, 2
cmp word [rax], 0x2e
jne 0x140005066
mov rdx, rax
mov rax, rdx
test rdx, rdx
je 0x140005700
mov r8d, 4
lea rcx, str..sys
mov rdx, rcx
mov r9, rax
sub r9, rcx
nop
movzx ecx, word [rdx + r9]
cmp cx, word [rdx]
jne 0x14000526b
add rdx, 2
sub r8, 1
jne 0x1400050a0
sub rax, r11
sar rax, 1
cmp rax, 0xffffffffffffffff
je 0x140005700
cmp qword [rdi + 0x18], 8
jb 0x1400050d2
mov rdi, qword [rdi]
lea rax, [0x14000fe18]
mov qword [rsp + 0x60], rax
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::constructor_void____ptr64]
nop
or r13d, 2
mov dword [rsp + 0x20], r13d
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char______ptr64__bool____ptr64]
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rbx, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rbx
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void____ptr64]
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x70], rax
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
xor esi, esi
mov qword [rbp - 0x10], rsi
mov rax, qword [0x140019418]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], rsi
lea r9d, [rsi + 0x40]
lea r8d, [rsi + 0x21]
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.14000a070
test rax, rax
jne 0x1400051a8
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [rsi + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x60], rbx
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
mov r8d, 0x400
lea rdx, [rbp + 0x140]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x10], 0
je 0x140005274
call qword [sym.imp.MSVCP140.dll_protected:_char____ptr64___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::eback_void_const___ptr64]
lea rcx, [rbp - 0x20]
cmp rax, rcx
jne 0x140005216
mov r9, qword [rbp]
mov rdx, qword [rbp - 8]
mov r8, rdx
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char____ptr64__char____ptr64__char____ptr64____ptr64]
lea rcx, [rsp + 0x70]
call fcn.1400089f0
lea rbx, [rsp + 0x70]
test al, al
cmove rbx, rsi
mov rcx, qword [rbp - 0x10]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, rsi
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
lea rcx, [rsp + 0x70]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x10], rsi
mov rax, qword [0x140019418]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], rsi
test rdi, rdi
jne 0x1400052b3
jmp 0x140005295
add rax, 2
jmp 0x140005050
mov byte [rbp - 0x14], 0
mov byte [rbp - 0x1f], 0
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x10], rsi
mov rax, qword [0x140019418]
mov qword [rbp - 0x1c], rax
mov qword [rbp - 0x28], rsi
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x60]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov r8d, 0x400
lea rdx, [rbp + 0x140]
mov rcx, r14
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
jne 0x1400056ab
lea rcx, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 8
cmovae rcx, qword [rbp + 0xa0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, eax
test eax, eax
setne dil
lea rdx, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 8
cmovae rdx, qword [rbp + 0xa0]
movzx r8d, dil
lea rcx, str.___DeleteFile___ls__:__x_n
call fcn.14000c800
test ebx, ebx
jne 0x1400056a0
lea r10, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 8
setae r14b
mov rsi, qword [rbp + 0xa0]
cmovae r10, rsi
mov rdi, qword [rbp + 0xb0]
xor ebx, ebx
cmp rdi, 4
jb 0x1400053d2
lea r11, [rdi - 3]
lea r11, [r10 + r11*2]
mov rdx, r10
mov rax, r11
sub rax, rdx
sar rax, 1
mov rcx, rbx
je 0x14000538a
cmp word [rdx], 0x2e
je 0x140005387
cmp rax, 1
je 0x14000538a
dec rax
add rdx, 2
cmp word [rdx], 0x2e
jne 0x140005374
mov rcx, rdx
mov rdx, rcx
test rcx, rcx
je 0x1400053d2
mov r8d, 4
lea rax, str..sys
mov rcx, rax
mov r9, rdx
sub r9, rax
nop dword [rax + rax]
movzx eax, word [rcx + r9]
cmp ax, word [rcx]
jne 0x1400053cc
add rcx, 2
sub r8, 1
jne 0x1400053b0
sub rdx, r10
sar rdx, 1
jmp 0x1400053d5
add rdx, 2
jmp 0x140005360
mov rdx, r12
lea r11, [rbp + 0xa0]
test r14b, r14b
cmovne r11, rsi
cmp rdi, 1
jb 0x140005452
lea rcx, [rdi - 1]
mov rax, rdx
cmp rcx, rdx
cmovb rax, rcx
lea r10, [r11 + rax*2]
mov r9, r10
lea rax, [0x14000fe3c]
sub r9, rax
cmp word [r10], 0x5c
jne 0x140005443
mov r8d, 1
mov rcx, rax
nop dword [rax + rax]
movzx eax, word [rcx + r9]
cmp ax, word [rcx]
jne 0x14000543c
add rcx, 2
sub r8, 1
jne 0x140005420
sub r10, r11
sar r10, 1
jmp 0x140005455
lea rax, [0x14000fe3c]
cmp r10, r11
je 0x140005452
sub r10, 2
sub r9, 2
jmp 0x140005408
mov r10, r12
lea rcx, [r10 + 1]
xorps xmm0, xmm0
movups xmmword [rbp + 0xc0], xmm0
mov qword [rbp + 0xd0], rbx
mov qword [rbp + 0xd8], rbx
cmp rdi, rcx
jb 0x140005859
sub rdx, r10
lea rbx, [rdx - 1]
sub rdi, rcx
cmp rdi, rbx
cmovb rbx, rdi
lea rax, [rbp + 0xa0]
test r14b, r14b
cmovne rax, rsi
lea r14, [rax + rcx*2]
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
ja 0x140005884
cmp rbx, 8
jae 0x1400054f7
mov qword [rbp + 0xd0], rbx
mov qword [rbp + 0xd8], 7
add rbx, rbx
mov r8, rbx
mov rdx, r14
lea rcx, [rbp + 0xc0]
call sub.VCRUNTIME140.dll_memcpy
xor eax, eax
mov word [rbp + rbx + 0xc0], ax
mov rdi, qword [rbp + 0xd8]
mov rsi, qword [rbp + 0xc0]
jmp 0x140005554
mov rdi, rbx
or rdi, 7
cmp rdi, rax
jbe 0x140005508
mov rdi, rax
jmp 0x140005515
cmp rdi, 0xa
mov eax, 0xa
cmovb rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rbp + 0xc0]
call fcn.140009980
mov rsi, rax
mov qword [rbp + 0xc0], rax
mov qword [rbp + 0xd0], rbx
mov qword [rbp + 0xd8], rdi
add rbx, rbx
mov r8, rbx
mov rdx, r14
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
xor eax, eax
mov word [rsi + rbx], ax
or r13d, 0x10
mov dword [rsp + 0x20], r13d
lea rdx, [rbp + 0xc0]
cmp rdi, 8
cmovae rdx, rsi
xorps xmm0, xmm0
movups xmmword [rbp + 0x100], xmm0
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x118], rax
mov r8, r12
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140005590
lea rcx, [rbp + 0x100]
call fcn.1400015b0
nop
mov rdx, qword [rbp + 0xd8]
cmp rdx, 8
jb 0x1400055ee
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400055e9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000574e
call fcn.14000cb60
lea rcx, [rbp + 0x100]
cmp qword [rbp + 0x118], 8
cmovae rcx, qword [rbp + 0x100]
call fcn.1400062d0
lea rcx, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 8
cmovae rcx, qword [rbp + 0xa0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
setne dil
lea rdx, [rbp + 0xa0]
cmp qword [rbp + 0xb8], 8
cmovae rdx, qword [rbp + 0xa0]
movzx r8d, dil
lea rcx, str.___DeleteFile2___ls__:__x_n
call fcn.14000c800
nop
mov rdx, qword [rbp + 0x118]
cmp rdx, 8
jb 0x14000569b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x100]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005696
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140005755
call fcn.14000cb60
mov r14, qword [rsp + 0x40]
movzx eax, dil
xor eax, 1
or dword [rsp + 0x28], eax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x60], rax
mov rax, qword [rsp + 0x60]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x5c], edx
lea rcx, [rsp + 0x70]
call fcn.140003680
lea rcx, [rsp + 0x78]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rsi, qword [rbp + 0xb8]
mov r10, qword [rbp + 0xa0]
cmp rsi, 8
jb 0x140005737
lea rdx, [rsi*2 + 2]
mov rax, r10
cmp rdx, 0x1000
jb 0x14000572f
add rdx, 0x27
mov r10, qword [r10 - 8]
sub rax, r10
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000575c
mov rcx, r10
call fcn.14000cb60
lea rcx, [rsp + 0x50]
call fcn.140008480
test eax, eax
jne 0x14000585f
jmp 0x140004fe0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400057a4
mov eax, r12d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14000579f
mov rbx, qword [rsp + 0x58]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, r12d
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x14000579f
mov rcx, qword [rsp + 0x58]
mov rax, qword [rcx]
call qword [rax + 8]
mov r15, qword [rsp + 0x38]
test r15, r15
je 0x1400057dc
mov eax, r12d
lock xadd dword [r15 + 8], eax
cmp eax, 1
jne 0x1400057dc
mov rbx, qword [rsp + 0x38]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], r12d
cmp r12d, 1
jne 0x1400057dc
mov rcx, qword [rsp + 0x38]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rbp + 0x138]
cmp rdx, 8
jb 0x140005825
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x120]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140005820
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140005820
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000cb60
mov eax, dword [rsp + 0x28]
mov rcx, qword [rbp + 0x540]
xor rcx, rsp
call fcn.14000cdc0
lea r11, [rsp + 0x650]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.140009900
nop
mov edx, eax
lea rcx, str.directory_iterator::operator
call fcn.1400096c0
nop
lea r8, [rbp + 0xe0]
mov edx, eax
lea rcx, str.directory_iterator::directory_iterator
call fcn.140009720
nop
call fcn.1400098c0
int3