Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int __thiscall sub_844BF0(void *this, int a2)
- {
- int v2; // edi@1
- int v3; // eax@1
- int v4; // edx@1
- int v5; // eax@1
- int v6; // ecx@2
- int v7; // eax@3
- int v8; // eax@6
- int v9; // eax@9
- char *v10; // eax@11
- signed int v11; // ecx@11
- unsigned int v12; // eax@13
- float v13; // ST28_4@13
- char v14; // si@13
- float v15; // ST30_4@13
- float v16; // ST30_4@13
- int v17; // ecx@14
- void *v18; // esi@23
- time_t v19; // qax@23
- void *v20; // esi@25
- int v21; // edi@27
- int v22; // ecx@31
- int v23; // eax@32
- int v24; // esi@32
- int v25; // edx@36
- int v26; // ebx@37
- int v27; // esi@38
- int v28; // eax@40
- int v29; // ecx@50
- int v30; // eax@51
- int v31; // esi@53
- int v32; // edi@54
- int result; // eax@59
- int v34; // [sp+2Ch] [bp-A4h]@13
- float v35[2]; // [sp+30h] [bp-A0h]@13
- int v36; // [sp+38h] [bp-98h]@39
- int v37; // [sp+3Ch] [bp-94h]@1
- double v38; // [sp+40h] [bp-90h]@13
- int v39; // [sp+48h] [bp-88h]@17
- unsigned int v40; // [sp+4Ch] [bp-84h]@17
- double v41; // [sp+50h] [bp-80h]@17
- int v42; // [sp+58h] [bp-78h]@13
- unsigned int v43; // [sp+5Ch] [bp-74h]@13
- double v44; // [sp+60h] [bp-70h]@13
- int v45; // [sp+68h] [bp-68h]@1
- int v46; // [sp+6Ch] [bp-64h]@1
- int (__thiscall **v47)(void *, char); // [sp+70h] [bp-60h]@2
- unsigned int v48; // [sp+74h] [bp-5Ch]@2
- int v49; // [sp+78h] [bp-58h]@22
- int v50; // [sp+7Ch] [bp-54h]@36
- int v51; // [sp+88h] [bp-48h]@36
- int (__thiscall **v52)(void *, char); // [sp+90h] [bp-40h]@11
- char v53[48]; // [sp+98h] [bp-38h]@11
- unsigned int v54; // [sp+C8h] [bp-8h]@13
- v2 = (int)this;
- v3 = *(_DWORD *)(*MK_FP(__FS__, 44) + 4 * TlsIndex);
- v4 = *(_DWORD *)(v3 + 1196);
- v45 = *(_DWORD *)(*MK_FP(__FS__, 44) + 4 * TlsIndex);
- *(_DWORD *)(v3 + 1196) = 67;
- v5 = *(_DWORD *)(a2 + 4) - 1;
- v46 = v4;
- v37 = 0;
- switch ( v5 )
- {
- case 0:
- sub_866DD0(1);
- v6 = *(_DWORD *)(v2 + 8);
- v47 = 0;
- v48 = 0;
- (*(void (__stdcall **)(_DWORD, int (__thiscall ***)(void *, char), _DWORD, _DWORD))(*(_DWORD *)v6 + 92))(
- "_root.GetInventoryItemList",
- &v47,
- 0,
- 0);
- if ( Heap__Allocate(0x38u, 0, 0) )
- v7 = sub_843110(v2 + 8, &v47);
- else
- v7 = 0;
- *(_DWORD *)(v2 + 28) = v7;
- if ( Heap__Allocate(0x28u, 0, 0) )
- v8 = sub_86CBF0(v2 + 8);
- else
- v8 = 0;
- *(_DWORD *)(v2 + 32) = v8;
- if ( Heap__Allocate(0x10u, 0, 0) )
- v9 = sub_87D160(v2 + 8);
- else
- v9 = 0;
- *(_DWORD *)(v2 + 36) = v9;
- v52 = &FxResponseArgs_2____vftable_;
- v10 = v53;
- v11 = 2;
- do
- {
- *(_DWORD *)v10 = 0;
- *((_DWORD *)v10 + 1) = 0;
- v10 += 16;
- --v11;
- }
- while ( v11 >= 0 );
- v54 = 1;
- LODWORD(v35[0]) = 1065353216;
- LODWORD(v35[1]) = 1065353216;
- v13 = sub_5AF5B0(17);
- sub_59AA20(v13, (int)v35, (int)&v35[1]);
- v34 = 0;
- sub_65C920(&dword_1B3D808, &v34);
- v14 = v34;
- sub_54A8D0(8, SLODWORD(PlayerCharacter), v34);
- sub_54A8D0(60, SLODWORD(PlayerCharacter), v14);
- v15 = sub_4028A0(*(float *)&dword_1B173E0, v35[0]);
- v35[0] = sub_4028A0(1.0, v15);
- v16 = sub_496350(*(float *)&dword_1B173EC, v35[1]);
- v35[1] = sub_496350(1.0, v16);
- v12 = v54;
- v38 = v35[0];
- v42 = 0;
- v43 = 3;
- v44 = v35[0];
- if ( v54 <= 2 )
- {
- v17 = (int)&v53[16 * v54++];
- sub_841C50(v17, (int)&v42);
- v12 = v54;
- }
- if ( (v43 >> 6) & 1 )
- {
- GFxValue__ObjectInterface__ReleaseManaged_Internal(&v42, LODWORD(v44));
- v12 = v54;
- v42 = 0;
- }
- v39 = 0;
- v38 = v35[1];
- v40 = 3;
- v41 = v35[1];
- if ( v12 <= 2 )
- {
- v54 = v12 + 1;
- sub_841C50((int)&v53[16 * v12], (int)&v39);
- }
- if ( (v40 >> 6) & 1 )
- {
- GFxValue__ObjectInterface__ReleaseManaged_Internal(&v39, LODWORD(v41));
- v39 = 0;
- }
- sub_A632E0(*(_DWORD *)(v2 + 8), "SetBarterMultipliers", &v52);
- sub_844960((void *)v2);
- sub_844AE0(v2);
- sub_843490((void *)v2);
- sub_893FE0(247);
- sub_423620(&v34);
- sub_841D30(&v52);
- if ( (v48 >> 6) & 1 )
- GFxValue__ObjectInterface__ReleaseManaged_Internal(&v47, v49);
- goto LABEL_59;
- case 2:
- v19 = _mkgmtime(&stru_10E2894);
- sub_867700(Inventory3DManager, HIDWORD(v19));
- v18 = *(void **)(v2 + 28);
- if ( v18 )
- {
- sub_8447E0(*(_DWORD *)(v2 + 28));
- Heap__Free(v18, 0);
- }
- v20 = *(void **)(v2 + 32);
- if ( v20 )
- {
- sub_8423F0(*(_DWORD *)(v2 + 32));
- Heap__Free(v20, 0);
- }
- v21 = *(_DWORD *)(v2 + 36);
- if ( v21 )
- {
- if ( (*(_DWORD *)(v21 + 4) >> 6) & 1 )
- {
- GFxValue__ObjectInterface__ReleaseManaged_Internal(v21, *(_DWORD *)(v21 + 8));
- *(_DWORD *)v21 = 0;
- }
- Heap__Free((void *)v21, 0);
- }
- goto LABEL_59;
- case 6:
- v22 = *(_DWORD *)(a2 + 8);
- if ( v22 )
- {
- v23 = *(_DWORD *)(v22 + 12);
- v24 = Inventory3DManager;
- if ( v23 == *(_DWORD *)(LODWORD(dword_1B2D678) + 412)
- || v23 == *(_DWORD *)(LODWORD(dword_1B2D678) + 152) && (unsigned __int8)sub_841B90(Inventory3DManager) )
- {
- if ( (unsigned __int8)sub_866AB0(v24) )
- {
- v25 = *(_DWORD *)(v2 + 8);
- v47 = &FxResponseArgs_0____vftable_;
- v49 = 0;
- v50 = 0;
- v51 = 1;
- sub_A632E0(v25, "ToggleMenuFade", &v47);
- sub_841D70(&v47);
- }
- }
- }
- goto LABEL_59;
- case 11:
- v26 = *(_DWORD *)(a2 + 8);
- if ( !v26 )
- goto LABEL_59;
- v27 = v26 + 8;
- *(double *)&v35[1] = sub_868320(v26 + 8);
- LOBYTE(v34) = 1;
- if ( -1.0 == *(double *)&v35[1] )
- {
- v28 = *(_DWORD *)v27;
- if ( *(_DWORD *)v27 != *(_DWORD *)(LODWORD(UIStringHolder) + 264) )
- {
- if ( v28 == dword_1B3D7F8 )
- {
- *(_DWORD *)(v2 + 96) = 2 - (*(_DWORD *)(v2 + 96) != 1);
- }
- else
- {
- if ( v28 == dword_1B3D7FC )
- {
- *(_DWORD *)(v2 + 96) = (*(_DWORD *)(v2 + 96) != 4) + 3;
- }
- else
- {
- if ( v28 != dword_1B3D800 )
- goto LABEL_49;
- *(_DWORD *)(v2 + 96) = (*(_DWORD *)(v2 + 96) != 6) + 5;
- }
- }
- sub_844AE0(v2);
- goto LABEL_49;
- }
- UIManager__AddMessage(LODWORD(UIStringHolder) + 124, 3, 0);
- }
- else
- {
- LOBYTE(v34) = sub_868C50(v2 + 40, LODWORD(v35[1]), v36);
- }
- LABEL_49:
- sub_897C30(v26 + 12, v34);
- goto LABEL_59;
- case 7:
- v29 = *(_DWORD *)(a2 + 8);
- if ( v29 )
- {
- v30 = *(_DWORD *)(v29 + 8);
- if ( v30 == dword_1B2DBD8 || v30 == dword_1B3D808 )
- {
- v31 = *(_DWORD *)(v29 + 12);
- if ( v31 )
- {
- v32 = v2 + 76;
- v34 = *(_DWORD *)(v29 + 12);
- if ( !(unsigned __int8)sub_843840(v32, &v34) )
- {
- v34 = v31;
- sub_55A6E0(v32, &v34);
- }
- }
- else
- {
- sub_844AE0(v2);
- sub_843490((void *)v2);
- }
- }
- }
- goto LABEL_59;
- default:
- if ( 0.0 == *(float *)(Inventory3DManager + 212) )
- v37 = sub_A63FE0(a2);
- LABEL_59:
- result = v37;
- *(_DWORD *)(v45 + 1196) = v46;
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement