Files

507 lines
16 KiB
C

// 0005b390 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::ifstream(std::ifstream&&) */
void __thiscall std::ifstream::ifstream(ifstream *this,ifstream *param_1)
{
undefined2 uVar1;
int iVar2;
int iVar3;
undefined4 uVar4;
ios *this_00;
ios_base *piVar5;
int *in_stack_0000000c;
iVar2 = *(int *)(param_1 + 4);
iVar3 = *(int *)(iVar2 + -0xc);
uVar4 = *(undefined4 *)(param_1 + 8);
*(int *)this = iVar2;
*(undefined4 *)(this + iVar3) = uVar4;
*(int *)(this + 4) = in_stack_0000000c[1];
this_00 = (ios *)(this + *(int *)(iVar2 + -0xc));
piVar5 = (ios_base *)(*(int *)(*in_stack_0000000c + -0xc) + (int)in_stack_0000000c);
ios_base::_M_move((ios_base *)this_00,piVar5);
ios::_M_cache_locale(this_00,(locale *)&(this_00->data).field_0x68);
uVar4 = *(undefined4 *)(piVar5 + 0x70);
*(undefined4 *)(piVar5 + 0x70) = 0;
uVar1 = *(undefined2 *)(piVar5 + 0x74);
(this_00->data).offset_0xb = (streambuf *)0x0;
(this_00->data).offset_0x3 = uVar4;
(this_00->data).offset_0x7 = uVar1;
iVar2 = *(int *)param_1;
in_stack_0000000c[1] = 0;
uVar4 = *(undefined4 *)(param_1 + 0xc);
*(int *)this = iVar2;
*(undefined4 *)(this + *(int *)(iVar2 + -0xc)) = uVar4;
filebuf::filebuf((filebuf *)(this + 8),(filebuf *)(in_stack_0000000c + 2));
*(filebuf **)(this + *(int *)(*(int *)this + -0xc) + 0x78) = (filebuf *)(this + 8);
return;
}
// 0005b480 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.cx replaced with injection: get_pc_thunk_cx */
/* std::ifstream::ifstream(std::ifstream&&) */
void __thiscall std::ifstream::ifstream(ifstream *this,ifstream *param_1)
{
ios *this_00;
undefined4 uVar1;
int iVar2;
ios_base *piVar3;
this_00 = (ios *)(this + 0x90);
ios_base::ios_base((ios_base *)this_00);
*(undefined4 *)(this + 0x100) = 0;
*(undefined2 *)(this + 0x104) = 0;
*(undefined ***)this = istream-in-std::ifstream::construction_vftable;
*(undefined ***)(this + 0x90) = istream-in-std::ifstream::internal_construction_vftable;
uVar1 = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(this + 0x108) = 0;
*(undefined4 *)(this + 4) = uVar1;
iVar2 = *(int *)param_1;
*(undefined4 *)(this + 0x10c) = 0;
iVar2 = *(int *)(iVar2 + -0xc);
*(undefined4 *)(this + 0x110) = 0;
*(undefined4 *)(this + 0x114) = 0;
piVar3 = (ios_base *)(param_1 + iVar2);
ios_base::_M_move((ios_base *)this_00,piVar3);
ios::_M_cache_locale(this_00,(locale *)(this + 0xfc));
*(undefined4 *)(this + 0x108) = 0;
uVar1 = *(undefined4 *)(piVar3 + 0x70);
*(undefined4 *)(piVar3 + 0x70) = 0;
*(undefined4 *)(this + 0x100) = uVar1;
*(undefined2 *)(this + 0x104) = *(undefined2 *)(piVar3 + 0x74);
*(undefined4 *)(param_1 + 4) = 0;
*(undefined ***)(this + 0x90) = internal_vftable;
*(undefined ***)this = vftable;
filebuf::filebuf((filebuf *)(this + 8),(filebuf *)(param_1 + 8));
*(filebuf **)(this + 0x108) = (filebuf *)(this + 8);
return;
}
// 0005b5d0 std::ifstream::swap
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::swap(std::ifstream&) */
void __thiscall std::ifstream::swap(ifstream *this,ifstream *param_1)
{
undefined1 uVar1;
undefined1 uVar2;
undefined4 uVar3;
ios *this_00;
ios *this_01;
this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));
this_00 = (ios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
ios_base::_M_swap((ios_base *)this_01,(ios_base *)this_00);
ios::_M_cache_locale(this_01,(locale *)&(this_01->data).field_0x68);
ios::_M_cache_locale(this_00,(locale *)&(this_00->data).field_0x68);
uVar3 = (this_01->data).offset_0x3;
(this_01->data).offset_0x3 = (this_00->data).offset_0x3;
(this_00->data).offset_0x3 = uVar3;
uVar1 = *(undefined1 *)&(this_01->data).offset_0x7;
*(undefined1 *)&(this_01->data).offset_0x7 = *(undefined1 *)&(this_00->data).offset_0x7;
uVar2 = *(undefined1 *)((int)&(this_00->data).offset_0x7 + 1);
*(undefined1 *)&(this_00->data).offset_0x7 = uVar1;
uVar1 = *(undefined1 *)((int)&(this_01->data).offset_0x7 + 1);
*(undefined1 *)((int)&(this_01->data).offset_0x7 + 1) = uVar2;
uVar3 = *(undefined4 *)(this + 4);
*(undefined1 *)((int)&(this_00->data).offset_0x7 + 1) = uVar1;
*(undefined4 *)(this + 4) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(param_1 + 4) = uVar3;
filebuf::swap((filebuf *)(this + 8),(filebuf *)(param_1 + 8));
return;
}
// 0005b670 std::ifstream::rdbuf
/* std::ifstream::rdbuf() const */
ifstream * __thiscall std::ifstream::rdbuf(ifstream *this)
{
return this + 8;
}
// 0005b680 std::ifstream::is_open
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::is_open() */
void __thiscall std::ifstream::is_open(ifstream *this)
{
__basic_file<char>::is_open((__basic_file<char> *)(this + 0x40));
return;
}
// 0005b6b0 std::ifstream::is_open
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::is_open() const */
void __thiscall std::ifstream::is_open(ifstream *this)
{
__basic_file<char>::is_open((__basic_file<char> *)(this + 0x40));
return;
}
// 0005dc50 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::ifstream() */
void __thiscall std::ifstream::ifstream(ifstream *this)
{
int iVar1;
int iVar2;
int iVar3;
int *in_stack_00000008;
iVar1 = in_stack_00000008[1];
iVar2 = in_stack_00000008[2];
iVar3 = *(int *)(iVar1 + -0xc);
*(int *)this = iVar1;
*(int *)(this + iVar3) = iVar2;
*(undefined4 *)(this + 4) = 0;
ios::init((ios *)(this + *(int *)(iVar1 + -0xc)),(streambuf *)0x0);
iVar1 = *in_stack_00000008;
iVar2 = in_stack_00000008[3];
*(int *)this = iVar1;
*(int *)(this + *(int *)(iVar1 + -0xc)) = iVar2;
filebuf::filebuf((filebuf *)(this + 8));
ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)(this + 8));
return;
}
// 0005dec0 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::ifstream() */
void __thiscall std::ifstream::ifstream(ifstream *this)
{
ios *this_00;
this_00 = (ios *)(this + 0x90);
ios_base::ios_base((ios_base *)this_00);
*(undefined4 *)(this + 4) = 0;
*(undefined2 *)(this + 0x104) = 0;
*(undefined ***)this = istream-in-std::ifstream::construction_vftable;
*(undefined4 *)(this + 0x100) = 0;
*(undefined4 *)(this + 0x108) = 0;
*(undefined4 *)(this + 0x10c) = 0;
*(undefined4 *)(this + 0x110) = 0;
*(undefined4 *)(this + 0x114) = 0;
*(undefined ***)(this + 0x90) = istream-in-std::ifstream::internal_construction_vftable;
ios::init(this_00,(streambuf *)0x0);
*(undefined ***)this = vftable;
*(undefined ***)(this + 0x90) = internal_vftable;
filebuf::filebuf((filebuf *)(this + 8));
ios::init(this_00,(streambuf *)(this + 8));
return;
}
// 0005e3a0 std::ifstream::operator=
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::TEMPNAMEPLACEHOLDERVALUE(std::ifstream&&) */
ifstream * __thiscall std::ifstream::operator=(ifstream *this,ifstream *param_1)
{
undefined1 uVar1;
undefined1 uVar2;
undefined4 uVar3;
ios *this_00;
ios *this_01;
this_01 = (ios *)(this + *(int *)(*(int *)this + -0xc));
this_00 = (ios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
ios_base::_M_swap((ios_base *)this_01,(ios_base *)this_00);
ios::_M_cache_locale(this_01,(locale *)&(this_01->data).field_0x68);
ios::_M_cache_locale(this_00,(locale *)&(this_00->data).field_0x68);
uVar3 = (this_01->data).offset_0x3;
(this_01->data).offset_0x3 = (this_00->data).offset_0x3;
(this_00->data).offset_0x3 = uVar3;
uVar1 = *(undefined1 *)&(this_01->data).offset_0x7;
*(undefined1 *)&(this_01->data).offset_0x7 = *(undefined1 *)&(this_00->data).offset_0x7;
uVar2 = *(undefined1 *)((int)&(this_00->data).offset_0x7 + 1);
*(undefined1 *)&(this_00->data).offset_0x7 = uVar1;
uVar1 = *(undefined1 *)((int)&(this_01->data).offset_0x7 + 1);
*(undefined1 *)((int)&(this_01->data).offset_0x7 + 1) = uVar2;
uVar3 = *(undefined4 *)(this + 4);
*(undefined1 *)((int)&(this_00->data).offset_0x7 + 1) = uVar1;
*(undefined4 *)(this + 4) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(param_1 + 4) = uVar3;
filebuf::operator=((filebuf *)(this + 8),(filebuf *)(param_1 + 8));
return this;
}
// 0005e6c0 std::ifstream::open
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::open(std::string const&, std::_Ios_Openmode) */
void __thiscall std::ifstream::open(ifstream *this,undefined4 *param_1,uint param_3)
{
int iVar1;
iVar1 = filebuf::open((filebuf *)(this + 8),*param_1,param_3 | 8);
if (iVar1 != 0) {
ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),0);
return;
}
ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),
(((ios *)(this + *(int *)(*(int *)this + -0xc)))->data).offset_0x10 | 4);
return;
}
// 0005e810 std::ifstream::open
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::open(char const*, std::_Ios_Openmode) */
void __thiscall std::ifstream::open(ifstream *this,undefined4 param_1,uint param_3)
{
int iVar1;
iVar1 = filebuf::open((filebuf *)(this + 8),param_1,param_3 | 8);
if (iVar1 != 0) {
ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),0);
return;
}
ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),
(((ios *)(this + *(int *)(*(int *)this + -0xc)))->data).offset_0x10 | 4);
return;
}
// 0005f1e0 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::ifstream(char const*, std::_Ios_Openmode) */
void __thiscall std::ifstream::ifstream(ifstream *this,undefined4 param_1,uint param_3)
{
filebuf *this_00;
int iVar1;
ios *piVar2;
piVar2 = (ios *)(this + 0x90);
ios_base::ios_base((ios_base *)piVar2);
*(undefined4 *)(this + 0x100) = 0;
*(undefined2 *)(this + 0x104) = 0;
*(undefined4 *)(this + 0x108) = 0;
*(undefined4 *)(this + 0x10c) = 0;
*(undefined4 *)(this + 0x110) = 0;
*(undefined4 *)(this + 0x114) = 0;
*(undefined ***)this = istream-in-std::ifstream::construction_vftable;
*(undefined ***)(this + 0x90) = istream-in-std::ifstream::internal_construction_vftable;
*(undefined4 *)(this + 4) = 0;
ios::init(piVar2,(streambuf *)0x0);
this_00 = (filebuf *)(this + 8);
*(undefined ***)this = vftable;
*(undefined ***)(this + 0x90) = internal_vftable;
filebuf::filebuf(this_00);
ios::init(piVar2,(streambuf *)this_00);
iVar1 = filebuf::open(this_00,param_1,param_3 | 8);
piVar2 = (ios *)(this + *(int *)(*(int *)this + -0xc));
if (iVar1 != 0) {
ios::clear(piVar2,0);
return;
}
ios::clear(piVar2,(piVar2->data).offset_0x10 | 4);
return;
}
// 0005f5c0 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::ifstream(std::string const&, std::_Ios_Openmode) */
void __thiscall std::ifstream::ifstream(ifstream *this,undefined4 *param_1,uint param_3)
{
filebuf *this_00;
int iVar1;
ios *piVar2;
piVar2 = (ios *)(this + 0x90);
ios_base::ios_base((ios_base *)piVar2);
*(undefined4 *)(this + 0x100) = 0;
*(undefined2 *)(this + 0x104) = 0;
*(undefined4 *)(this + 0x108) = 0;
*(undefined4 *)(this + 0x10c) = 0;
*(undefined4 *)(this + 0x110) = 0;
*(undefined4 *)(this + 0x114) = 0;
*(undefined ***)this = istream-in-std::ifstream::construction_vftable;
*(undefined ***)(this + 0x90) = istream-in-std::ifstream::internal_construction_vftable;
*(undefined4 *)(this + 4) = 0;
ios::init(piVar2,(streambuf *)0x0);
this_00 = (filebuf *)(this + 8);
*(undefined ***)this = vftable;
*(undefined ***)(this + 0x90) = internal_vftable;
filebuf::filebuf(this_00);
ios::init(piVar2,(streambuf *)this_00);
iVar1 = filebuf::open(this_00,*param_1,param_3 | 8);
piVar2 = (ios *)(this + *(int *)(*(int *)this + -0xc));
if (iVar1 != 0) {
ios::clear(piVar2,0);
return;
}
ios::clear(piVar2,(piVar2->data).offset_0x10 | 4);
return;
}
// 0005f740 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::ifstream(char const*, std::_Ios_Openmode) */
void __thiscall std::ifstream::ifstream(ifstream *this,int *param_1,undefined4 param_3,uint param_4)
{
filebuf *this_00;
int iVar1;
int iVar2;
int iVar3;
ios *piVar4;
iVar3 = param_1[1];
iVar1 = param_1[2];
iVar2 = *(int *)(iVar3 + -0xc);
*(int *)this = iVar3;
*(int *)(this + iVar2) = iVar1;
*(undefined4 *)(this + 4) = 0;
ios::init((ios *)(this + *(int *)(iVar3 + -0xc)),(streambuf *)0x0);
iVar3 = *param_1;
iVar1 = param_1[3];
*(int *)this = iVar3;
*(int *)(this + *(int *)(iVar3 + -0xc)) = iVar1;
this_00 = (filebuf *)(this + 8);
filebuf::filebuf(this_00);
ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);
iVar3 = filebuf::open(this_00,param_3,param_4 | 8);
piVar4 = (ios *)(this + *(int *)(*(int *)this + -0xc));
if (iVar3 != 0) {
ios::clear(piVar4,0);
return;
}
ios::clear(piVar4,(piVar4->data).offset_0x10 | 4);
return;
}
// 0005f860 std::ifstream::ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::ifstream(std::string const&, std::_Ios_Openmode) */
void __thiscall
std::ifstream::ifstream(ifstream *this,int *param_1,undefined4 *param_3,uint param_4)
{
filebuf *this_00;
int iVar1;
int iVar2;
int iVar3;
ios *piVar4;
iVar3 = param_1[1];
iVar1 = param_1[2];
iVar2 = *(int *)(iVar3 + -0xc);
*(int *)this = iVar3;
*(int *)(this + iVar2) = iVar1;
*(undefined4 *)(this + 4) = 0;
ios::init((ios *)(this + *(int *)(iVar3 + -0xc)),(streambuf *)0x0);
iVar3 = *param_1;
iVar1 = param_1[3];
*(int *)this = iVar3;
*(int *)(this + *(int *)(iVar3 + -0xc)) = iVar1;
this_00 = (filebuf *)(this + 8);
filebuf::filebuf(this_00);
ios::init((ios *)(this + *(int *)(*(int *)this + -0xc)),(streambuf *)this_00);
iVar3 = filebuf::open(this_00,*param_3,param_4 | 8);
piVar4 = (ios *)(this + *(int *)(*(int *)this + -0xc));
if (iVar3 != 0) {
ios::clear(piVar4,0);
return;
}
ios::clear(piVar4,(piVar4->data).offset_0x10 | 4);
return;
}
// 0005f980 std::ifstream::close
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::ifstream::close() */
void __thiscall std::ifstream::close(ifstream *this)
{
int iVar1;
iVar1 = filebuf::close((filebuf *)(this + 8));
if (iVar1 != 0) {
return;
}
ios::clear((ios *)(this + *(int *)(*(int *)this + -0xc)),
(((ios *)(this + *(int *)(*(int *)this + -0xc)))->data).offset_0x10 | 4);
return;
}
// 00060690 std::ifstream::~ifstream
/* WARNING: Function: __x86.get_pc_thunk.di replaced with injection: get_pc_thunk_di */
/* std::ifstream::~ifstream() */
void __thiscall std::ifstream::~ifstream(ifstream *this)
{
int iVar1;
int *in_stack_00000008;
iVar1 = *in_stack_00000008;
*(int *)this = iVar1;
*(int *)(this + *(int *)(iVar1 + -0xc)) = in_stack_00000008[3];
*(filebuf_vftable **)(this + 8) = &filebuf::vftable;
filebuf::close((filebuf *)(this + 8));
__basic_file<char>::~__basic_file((__basic_file<char> *)(this + 0x40));
*(streambuf_vftable **)(this + 8) = &streambuf::vftable;
locale::~locale((locale *)(this + 0x24));
iVar1 = in_stack_00000008[1];
*(int *)this = iVar1;
*(int *)(this + *(int *)(iVar1 + -0xc)) = in_stack_00000008[2];
*(undefined4 *)(this + 4) = 0;
return;
}