Function at 0x40a580
Capabilities:
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41398b
mov eax, dword fs:[0]
push eax
sub esp, 0x194
mov eax, dword [0x41d034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x5c], 0
push dword [edi + 0x58]
call dword [sym.imp.MSVCR120.dll__close]
add esp, 4
cmp dword [edi + 0x64], 0
jbe 0x40ada1
cmp dword [edi + 0x38], 0
mov ebx, dword [sym.imp.MSVCP120.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__]
jbe 0x40a965
push 1
push 2
lea ecx, [ebp - 0x19c]
call fcn.00409ac0
movzx eax, word [edi + 0x68]
cdq
push edx
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 4], 0
push eax
call ebx
add esp, 0xc
mov dword [ebp - 0x5c], eax
lea ebx, [edi + 0x28]
lea eax, [ebp - 0x19c]
push 0x417d40
push ebx
push eax
call fcn.00408cb0
add esp, 8
push eax
call fcn.004090a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40a634
xor ecx, ecx
jmp 0x40a63b
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov eax, dword [ebp - 0x5c]
push dword [eax + 0xc]
push dword [eax + 8]
mov eax, dword [eax]
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ecx, esi
mov eax, dword [eax + 4]
push 0x409990
mov byte [eax + esi + 0x40], 0x30
push dword [edi + 0x64]
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
mov ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x19c]
call fcn.0040b490
cmp dword [ebp - 0x44], 0x10
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.MSVCR120.dll_remove]
mov eax, dword [edi + 0x64]
add esp, 4
mov dword [ebp - 0x5c], eax
cmp eax, 1
jbe 0x40a862
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
test byte [ebp - 0x15c], 1
mov byte [ebp - 4], 2
je 0x40a6d0
mov eax, dword [ebp - 0x18c]
push dword [eax]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push 0
push 0
push 0
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [ebp - 0x188]
lea ecx, [ebp - 0x198]
mov dword [eax], 0
mov eax, dword [ebp - 0x178]
mov dword [eax], 0
mov eax, dword [ebp - 0x168]
mov dword [eax], 0
mov eax, dword [ebp - 0x15c]
and eax, 0xfffffffe
mov dword [ebp - 0x160], 0
push eax
mov dword [ebp - 0x15c], eax
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.00409e80
cmp dword [ebp - 0x2c], 0x10
mov byte [ebp - 4], 1
jb 0x40a746
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
movzx eax, word [edi + 0x68]
cdq
push edx
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.MSVCP120.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__]
add esp, 0xc
mov ebx, eax
lea eax, [edi + 0x28]
push 0x2e
push eax
lea eax, [ebp - 0x19c]
push eax
call fcn.00408cb0
add esp, 8
push eax
call fcn.00408ea0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40a787
xor ecx, ecx
jmp 0x40a78e
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ebx, dword [ebp - 0x5c]
mov ecx, esi
dec ebx
mov dword [ebp - 0x5c], ebx
mov eax, dword [eax + 4]
push 0x409990
push ebx
mov byte [eax + esi + 0x40], 0x30
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_int_]
mov ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x19c]
call fcn.0040b490
cmp dword [ebp - 0x44], 0x10
lea ecx, [ebp - 0x58]
cmovae ecx, dword [ebp - 0x58]
cmp dword [eax + 0x14], 0x10
jb 0x40a7e5
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.MSVCR120.dll_rename]
add esp, 8
cmp dword [ebp - 0x2c], 0x10
jb 0x40a801
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x19c]
call fcn.0040b490
mov esi, eax
lea eax, [ebp - 0x58]
cmp eax, esi
je 0x40a845
cmp dword [ebp - 0x44], 0x10
jb 0x40a82a
push dword [ebp - 0x58]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push esi
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
call fcn.004029c0
cmp dword [ebp - 0x2c], 0x10
jb 0x40a856
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp ebx, 1
ja 0x40a6a1
lea ebx, [edi + 0x28]
cmp dword [ebp - 0x44], 0x10
lea eax, [ebp - 0x58]
cmovae eax, dword [ebp - 0x58]
cmp dword [ebx + 0x14], 0x10
jb 0x40a875
mov ebx, dword [ebx]
push eax
push ebx
call dword [sym.imp.MSVCR120.dll_rename]
add esp, 8
cmp dword [ebp - 0x44], 0x10
jb 0x40a891
push dword [ebp - 0x58]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0x44], 0xf
mov dword [ebp - 0x48], 0
mov byte [ebp - 0x58], 0
mov eax, dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov dword [ebp + eax - method.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_ostringstream_char__struct_std::char_traits_char___class_std::allocator_char__.0
mov eax, dword [ebp - 0x19c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0x1a0], eax
test byte [ebp - 0x15c], 1
mov dword [ebp - method.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.virtual_0], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
je 0x40a8f4
mov eax, dword [ebp - 0x18c]
push dword [eax]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push 0
push 0
push 0
lea ecx, [ebp - 0x198]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::setg_char___char___char__]
mov eax, dword [ebp - 0x188]
lea ecx, [ebp - 0x198]
mov dword [eax], 0
mov eax, dword [ebp - 0x178]
mov dword [eax], 0
mov eax, dword [ebp - 0x168]
mov dword [eax], 0
and dword [ebp - 0x15c], 0xfffffffe
mov dword [ebp - 0x160], 0
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x194]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x14c]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov ebx, dword [sym.imp.MSVCP120.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__]
cmp dword [edi + 0x50], 0
jbe 0x40ada1
lea ecx, [ebp - 0xa4]
mov dword [ebp - 0xf4], 0x415688
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xf0]
mov dword [ebp - 4], 3
push eax
lea ecx, [ebp - 0xf4]
mov dword [ebp - 0x5c], 1
call dword [sym.imp.MSVCP120.dll_public:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::constructor_class_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t_____bool_]
mov eax, dword [ebp - 0xf4]
mov dword [ebp - 4], 4
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf4], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xf4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xf8], eax
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::constructor_void_]
mov dword [ebp - 0xf0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb4], 4
movzx eax, word [edi + 0x68]
cdq
push edx
push eax
lea eax, [ebp - 0x104]
mov dword [ebp - 4], 6
push eax
call ebx
add esp, 0xc
mov dword [ebp - 0x5c], eax
lea ebx, [edi + 0x40]
lea eax, [ebp - 0xf4]
push 0x417d44
push ebx
push eax
call fcn.00409790
add esp, 8
push eax
call fcn.00409540
mov esi, eax
add esp, 8
test esi, esi
jne 0x40aa4a
xor ecx, ecx
jmp 0x40aa51
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
mov eax, dword [ebp - 0x5c]
push dword [eax + 0xc]
push dword [eax + 8]
mov eax, dword [eax]
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ecx, 0x30
mov eax, dword [eax + 4]
push 0x4099b0
mov word [eax + esi + 0x40], cx
mov ecx, esi
push dword [edi + 0x64]
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_int_]
mov ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0xf4]
call fcn.0040b4b0
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.MSVCR120.dll__wremove]
mov eax, dword [edi + 0x64]
add esp, 4
mov dword [ebp - 0x5c], eax
cmp eax, 1
jbe 0x40acb6
lea esp, [esp]
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
test byte [ebp - 0xb4], 1
mov byte [ebp - 4], 8
je 0x40aaf1
mov eax, dword [ebp - 0xe4]
push dword [eax]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push 0
push 0
push 0
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setg_wchar_t___wchar_t___wchar_t__]
push 0
push 0
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setp_wchar_t___wchar_t__]
mov eax, dword [ebp - 0xb4]
lea ecx, [ebp - 0xf0]
and eax, 0xfffffffe
mov dword [ebp - 0xb8], 0
push eax
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0x40]
push 0
push eax
call fcn.00409f40
cmp dword [ebp - 0x2c], 8
mov byte [ebp - 4], 7
jb 0x40ab53
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
movzx eax, word [edi + 0x68]
cdq
push edx
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.MSVCP120.dll_struct_std::_Smanip_long_long___int64_____cdecl_std::setw_long_long___int64__]
add esp, 0xc
mov ebx, eax
lea eax, [edi + 0x40]
push 0x2e
push eax
lea eax, [ebp - 0xf4]
push eax
call fcn.00409790
add esp, 8
push eax
call fcn.004092d0
mov esi, eax
add esp, 8
test esi, esi
jne 0x40ab94
xor ecx, ecx
jmp 0x40ab9b
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
push dword [ebx + 0xc]
mov eax, dword [ebx]
push dword [ebx + 8]
push ecx
call eax
mov eax, dword [esi]
add esp, 0xc
mov ebx, dword [ebp - 0x5c]
mov ecx, 0x30
dec ebx
mov dword [ebp - 0x5c], ebx
mov eax, dword [eax + 4]
push 0x4099b0
push ebx
mov word [eax + esi + 0x40], cx
mov ecx, esi
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___unsigned_int_]
mov ecx, eax
call dword [sym.imp.MSVCP120.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0xf4]
call fcn.0040b4b0
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
cmovae ecx, dword [ebp - 0x28]
cmp dword [eax + 0x14], 8
jb 0x40abf7
mov eax, dword [eax]
push ecx
push eax
call dword [sym.imp.MSVCR120.dll__wrename]
add esp, 8
cmp dword [ebp - 0x2c], 8
jb 0x40ac13
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0xf4]
call fcn.0040b4b0
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x40ac99
cmp dword [ebp - 0x14], 8
jb 0x40ac3c
push dword [ebp - 0x28]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp dword [esi + 0x14], 8
jae 0x40ac6f
mov eax, dword [esi + 0x10]
inc eax
je 0x40ac7a
add eax, eax
push eax
lea eax, [ebp - 0x28]
push esi
push eax
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x40ac7a
mov eax, dword [esi]
mov dword [ebp - 0x28], eax
mov dword [esi], 0
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], ax
cmp dword [ebp - 0x2c], 8
jb 0x40acaa
push dword [ebp - 0x40]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp ebx, 1
ja 0x40aac0
lea ebx, [edi + 0x40]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
cmp dword [ebx + 0x14], 8
jb 0x40acc9
mov ebx, dword [ebx]
push eax
push ebx
call dword [sym.imp.MSVCR120.dll__wrename]
add esp, 8
cmp dword [ebp - 0x14], 8
jb 0x40ace5
push dword [ebp - 0x28]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp - 0xf4]
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xf4], vtable.std::basic_ostringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0xf4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ebp + ecx - 0xf8], eax
test byte [ebp - 0xb4], 1
mov dword [ebp - 0xf0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
je 0x40ad4a
mov eax, dword [ebp - 0xe4]
push dword [eax]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
push 0
push 0
push 0
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setg_wchar_t___wchar_t___wchar_t__]
push 0
push 0
lea ecx, [ebp - 0xf0]
call dword [sym.imp.MSVCP120.dll_protected:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::setp_wchar_t___wchar_t__]
and dword [ebp - 0xb4], 0xfffffffe
lea ecx, [ebp - 0xf0]
mov dword [ebp - 0xb8], 0
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_streambuf_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0xec]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
lea ecx, [ebp - 0xa4]
call dword [sym.imp.MSVCP120.dll_public_virtual:_void___thiscall_std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__::destructor_void_]
cmp dword [edi + 0x38], 0
jbe 0x40adc1
cmp dword [edi + 0x3c], 0x10
lea eax, [edi + 0x28]
jb 0x40adb2
mov eax, dword [eax]
push dword [edi + 0x60]
push dword [edi + 0x5c]
push eax
call dword [sym.imp.MSVCR120.dll__open]
jmp 0x40add9
cmp dword [edi + 0x54], 8
lea eax, [edi + 0x40]
jb 0x40adcc
mov eax, dword [eax]
push dword [edi + 0x60]
push dword [edi + 0x5c]
push eax
call dword [sym.imp.MSVCR120.dll_int___cdecl__wopen_wchar_t_const___int__int_]
mov dword [edi + 0x58], eax
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004122f2
mov esp, ebp
pop ebp
ret