Function at 0x40baf0
Capabilities:
Delete file
Move file
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x422812
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x98], ebx
jne 0x40bb1c
call fcn.0040beb0
add esi, 0x90
push str.cookie.info
lea eax, [esp + 0x28]
push esi
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
mov edi, dword [esp + 0x44]
mov dword [esp + 0x3c], ebx
cmp dword [edi + 8], ebx
jne 0x40bb6f
mov eax, dword [esp + 0x28]
cmp eax, ebx
jne 0x40bb4f
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x40bcb6
lea ecx, [esp + 0x24]
push str..tmp
lea edx, [esp + 0x18]
push ecx
push edx
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
mov eax, dword [esp + 0x18]
mov byte [esp + 0x3c], 1
cmp eax, ebx
jne 0x40bb98
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebx
push ebx
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40bbe7
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], esi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
add esp, 0x34
ret 4
mov eax, dword [edi + 8]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x10]
push ebx
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push esi
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ebx
call ebp
mov eax, dword [edi + 8]
mov edi, dword [edi + 4]
cmp edi, ebx
jne 0x40bc19
mov edi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x10]
push ebx
push ecx
push eax
push edi
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x2c]
pop ebp
cmp eax, ebx
jne 0x40bc39
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x28]
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp ecx, ebx
jne 0x40bc50
mov ecx, edx
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x40bc5a
mov eax, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x40bc86
mov al, byte [ecx - 1]
cmp al, bl
je 0x40bc7c
cmp al, 0xff
je 0x40bc7c
dec al
mov byte [ecx - 1], al
jmp 0x40bc86
dec ecx
push ecx
call fcn.004218a8
add esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], ebx
cmp ecx, ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
je 0x40bcb6
mov al, byte [ecx - 1]
cmp al, bl
je 0x40bcac
cmp al, 0xff
je 0x40bcac
dec al
mov byte [ecx - 1], al
jmp 0x40bcb6
dec ecx
push ecx
call fcn.004218a8
add esp, 4
mov ecx, dword [esp + 0x34]
pop edi
pop esi
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x34
ret 4