Function at 0x140051190
Capabilities:
Delete file
Move file

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x168]
sub rsp, 0x268
mov rsi, rdx
mov r14, rcx
xor r12d, r12d
mov dword [rbp + 0x1c0], r12d
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], reloc.WS2_32.dll_ntohs
mov byte [rsp + 0x20], r12b
lea rax, [0x140171450]
mov qword [rsp + 0x40], 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
mov dword [rbp + 0x1c0], 1
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
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 + 0x40]
movsxd rcx, dword [rax + 4]
lea r13, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], r13
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x50]
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 + 0x50], rax
mov byte [rbp - 0x34], r12b
mov byte [rbp - 0x3f], r12b
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x30], r12
mov rax, qword [0x1401d4188]
mov qword [rbp - 0x3c], rax
mov qword [rbp - 0x48], r12
mov rdx, r14
cmp qword [r14 + 0x18], 0x10
jb 0x14005128a
mov rdx, qword [r14]
mov r8d, 1
lea rcx, [rsp + 0x50]
call fcn.14004af00
xor r8d, r8d
test rax, rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
je 0x1400512bd
add rcx, rax
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
jmp 0x1400512cb
add rcx, rax
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rcx, [rbp + 0x50]
call fcn.140057e20
nop
mov r8d, 2
lea rdx, str.temp.ini
lea rcx, [rbp + 0x58]
call fcn.14004af00
xor r8d, r8d
test rax, rax
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
je 0x14005130c
add rcx, rax
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
jmp 0x14005131a
add rcx, rax
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.140058800
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
je 0x140051408
nop
mov rdx, rsi
cmp qword [rsi + 0x18], 0x10
jb 0x14005136d
mov rdx, qword [rsi]
lea rcx, [rsp + 0x20]
cmp qword [rsp + 0x38], 0x10
setae r15b
mov rdi, qword [rsp + 0x20]
cmovae rcx, rdi
mov rbx, qword [rsp + 0x30]
cmp rbx, qword [rsi + 0x10]
jne 0x14005139c
mov r8, rbx
call sub.VCRUNTIME140.dll_memcmp
test eax, eax
je 0x1400513c4
lea rdx, [rsp + 0x20]
test r15b, r15b
cmovne rdx, rdi
mov r8, rbx
lea rcx, [rbp + 0x50]
call fcn.14004cb90
lea rdx, [0x140058040]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
add rcx, rax
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.140058800
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator_bool_void_const___ptr64]
test al, al
jne 0x140051360
lea rcx, [rbp + 0x58]
call fcn.14004ae40
test rax, rax
jne 0x140051432
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rbp + 0x50]
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]
cmp qword [rbp - 0x30], 0
je 0x1400514b6
mov rax, qword [rsp + 0x68]
lea rcx, [rbp - 0x40]
cmp qword [rax], rcx
jne 0x140051461
mov rdx, qword [rbp - 0x20]
mov rcx, qword [rbp - 0x28]
mov qword [rax], rcx
mov rax, qword [rbp - 0x78]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x60]
mov dword [rax], edx
lea rcx, [rsp + 0x50]
call fcn.14004ad60
lea rbx, [rsp + 0x50]
test al, al
cmove rbx, r12
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rdi, r12
test eax, eax
cmove rdi, rbx
mov byte [rbp - 0x34], 0
mov byte [rbp - 0x3f], 0
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x30], r12
mov rax, qword [0x1401d4188]
mov qword [rbp - 0x3c], rax
mov qword [rbp - 0x48], r12
test rdi, rdi
jne 0x1400514fa
jmp 0x1400514dc
mov byte [rbp - 0x34], 0
mov byte [rbp - 0x3f], 0
lea rcx, [rsp + 0x50]
call qword [sym.imp.MSVCP140.dll_protected:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void____ptr64]
mov qword [rbp - 0x30], r12
mov rax, qword [0x1401d4188]
mov qword [rbp - 0x3c], rax
mov qword [rbp - 0x48], r12
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
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 rbx, r14
cmp qword [r14 + 0x18], 0x10
jb 0x140051507
mov rbx, qword [r14]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
mov rdx, rbx
lea rcx, str.temp.ini
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
nop
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx + 0x50], rax
mov rax, qword [rbp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx + 0x4c], edx
lea rcx, [rbp + 0x58]
call fcn.14004a400
lea rcx, [rbp + 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xf8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x40], r13
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x50]
call fcn.14004a400
lea rcx, [rsp + 0x58]
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]
nop
mov rdx, qword [rsp + 0x38]
cmp rdx, 0x10
jb 0x1400515e9
inc rdx
mov rcx, qword [rsp + 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400515e4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400515e4
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401322f8
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], reloc.WS2_32.dll_ntohs
mov byte [rsp + 0x20], 0
mov rdx, qword [r14 + 0x18]
cmp rdx, 0x10
jb 0x140051632
mov rcx, qword [r14]
inc rdx
cmp rdx, 0x1000
jb 0x14005162d
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x14005169b
mov rcx, r8
call fcn.1401322f8
mov qword [r14 + 0x10], r12
mov qword [r14 + 0x18], reloc.WS2_32.dll_ntohs
mov byte [r14], 0
mov rdx, qword [rsi + 0x18]
cmp rdx, 0x10
jb 0x140051678
inc rdx
mov rcx, qword [rsi]
cmp rdx, 0x1000
jb 0x140051673
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x1400516a2
mov rcx, r8
call fcn.1401322f8
mov qword [rsi + 0x10], r12
mov qword [rsi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rsi], 0
add rsp, 0x268
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
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]
int3