Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // <"Pin: checksum failed.", "Pin: no data received.", "Succeeded=", "StatusCode=", "2.093.001">
- int __usercall m_login<eax>(int this<ecx>)
- {
- login_st *v1; // esi@1
- int result; // eax@4
- int i; // esi@8
- const char **v4; // eax@8
- int v5; // edi@10
- int v6; // esi@11
- const char **v7; // eax@12
- int v8; // esi@13
- int v9; // eax@13
- char v10; // bl@13
- int v11; // edi@14
- const char *v12; // ebx@15
- int v13; // esi@15
- int v14; // eax@17
- char *v15; // eax@29
- char *v16; // ebp@29
- void (__thiscall *String_destructor)(_DWORD); // esi@29
- int v18; // edi@29
- int v19; // eax@29
- int v20; // edi@32
- int v21; // ebp@41
- unsigned __int8 v22; // sf@42
- unsigned __int8 v23; // of@42
- signed int v24; // ebp@50
- int *v25; // edi@50
- int *v26; // eax@52
- int v27; // ecx@53
- int v28; // edi@53
- int v29; // ecx@64
- int v30; // edx@64
- int v31; // edx@69
- void *v32; // eax@70
- void *v33; // eax@70
- void *v34; // eax@70
- int *v35; // ecx@72
- int v36; // ecx@79
- int *v37; // ecx@84
- char v38; // al@84
- char v39; // al@87
- char v40; // al@90
- char v41; // al@93
- char v42; // al@96
- int v43; // eax@112
- int v44; // ebp@112
- int v45; // edi@119
- int *v46; // [sp+58h] [bp-FCh]@79
- int v47; // [sp+5Ch] [bp-F8h]@29
- int v48; // [sp+5Ch] [bp-F8h]@108
- int v49; // [sp+60h] [bp-F4h]@29
- int v50; // [sp+6Ch] [bp-E8h]@31
- int v51; // [sp+70h] [bp-E4h]@37
- int v52; // [sp+74h] [bp-E0h]@14
- int *v53; // [sp+78h] [bp-DCh]@14
- const char *v54; // [sp+7Ch] [bp-D8h]@13
- char v55; // [sp+80h] [bp-D4h]@8
- int tok; // [sp+84h] [bp-D0h]@6
- int v57; // [sp+88h] [bp-CCh]@54
- char v58; // [sp+8Fh] [bp-C5h]@70
- int v59; // [sp+90h] [bp-C4h]@29
- char v60; // [sp+94h] [bp-C0h]@55
- int v61; // [sp+98h] [bp-BCh]@10
- int v62; // [sp+9Ch] [bp-B8h]@29
- char v63; // [sp+A4h] [bp-B0h]@122
- char v64; // [sp+A8h] [bp-ACh]@122
- int pass; // [sp+ACh] [bp-A8h]@6
- char *username; // [sp+B0h] [bp-A4h]@6
- const char *executable; // [sp+B4h] [bp-A0h]@6
- int v68; // [sp+B8h] [bp-9Ch]@1
- int v69; // [sp+BCh] [bp-98h]@29
- char v70; // [sp+C0h] [bp-94h]@122
- int lang; // [sp+C4h] [bp-90h]@6
- int md5; // [sp+C8h] [bp-8Ch]@1
- int v73; // [sp+CCh] [bp-88h]@6
- int v74; // [sp+D0h] [bp-84h]@6
- int v75; // [sp+D4h] [bp-80h]@6
- char v76; // [sp+D8h] [bp-7Ch]@13
- int v77; // [sp+DCh] [bp-78h]@57
- int v78; // [sp+E0h] [bp-74h]@58
- int v79; // [sp+E4h] [bp-70h]@59
- int v80; // [sp+E8h] [bp-6Ch]@60
- int v81; // [sp+ECh] [bp-68h]@61
- char v82; // [sp+F0h] [bp-64h]@122
- int v83; // [sp+F8h] [bp-5Ch]@6
- some_struct sysinfo; // [sp+FCh] [bp-58h]@10
- int v85; // [sp+144h] [bp-10h]@10
- int v86; // [sp+148h] [bp-Ch]@10
- const char *v87; // [sp+14Ch] [bp-8h]@10
- int v88; // [sp+150h] [bp-4h]@10
- const char *v89; // [sp+154h] [bp+0h]@10
- char v90; // [sp+154h] [bp+0h]@29
- const char *v91; // [sp+158h] [bp+4h]@10
- v68 = this;
- v1 = m_login_st_new((void *)this);
- md5 = (int)v1;
- if ( v1 )
- InterlockedIncrement((volatile LONG *)v1 - 4);
- if ( WaitForSingleObject(v1->handle, 0xFFFFFFFFu) )
- {
- result = InterlockedDecrement((volatile LONG *)v1 - 4);
- if ( result <= 0 )
- result = (*(int (__cdecl **)(login_st *))(*((_DWORD *)v1 - 3) + 8))(v1);
- return result;
- }
- TX__Registry__Registry(&v74);
- sub_4A29C0(&tok);
- username = (char *)G_NullString_0;
- pass = G_NullString_0;
- executable = (const char *)G_NullString_0;
- v83 = G_NullString_0;
- v75 = G_NullString_0;
- lang = G_NullString_0;
- md5 = G_NullString_0;
- sub_496E30(v1);
- TX__String__operator_(&username, &v1->username);
- TX__String__operator_(&pass, &v1->pass);
- TX__String__operator_(&executable, &v1->executable);
- v73 = v1->field_1C;
- if ( v73 )
- InterlockedIncrement((volatile LONG *)(v73 - 16));
- TX__String__operator_(&lang, &v1->lang);
- TX__String__operator_(&md5, &v1->ExeMD5);
- sub_496E40(v1);
- m_create_token(&tok, AUTH_token);
- m_token_add_I32(&tok, 0xCEu);
- m_token_add_str((int)&tok, username);
- m_token_add_str((int)&tok, (const char *)pass);
- m_token_add_str((int)&tok, executable);
- v4 = (const char **)TX__String__String(&v55, "2.093.001");
- m_token_add_str((int)&tok, *v4);
- TX__String___String(&v55);
- m_token_add_str((int)&tok, (const char *)lang);
- m_token_add_str((int)&tok, (const char *)md5);
- m_random_seed((int)&tok, 8);
- for ( i = dword_68510C; i; i = *(_DWORD *)(i + 28) )
- m_token_add_U32((int)&tok, *(_DWORD *)(i + 4));
- v85 = G_NullString_0;
- v86 = G_NullString_0;
- v87 = (const char *)G_NullString_0;
- v88 = G_NullString_0;
- v89 = (const char *)G_NullString_0;
- v91 = (const char *)G_NullString_0;
- m_get_system_info(&sysinfo);
- m_token_add_str((int)&tok, v87);
- m_token_add_str((int)&tok, v89);
- m_token_add_str((int)&tok, v91);
- v61 = G_NullArray_1;
- m_netbios(&v61);
- m_token_add_I32(&tok, *(_DWORD *)(v61 - 4));
- v5 = *(_DWORD *)(v61 - 4);
- if ( v5 > 0 )
- {
- v6 = 0;
- do
- {
- v7 = (const char **)sub_57E5F0(&v55, v6 + v61);
- m_token_add_str((int)&tok, *v7);
- TX__String___String(&v55);
- v6 += 6;
- --v5;
- }
- while ( v5 );
- }
- v8 = G_NullArray_1;
- v68 = G_NullArray_1;
- v9 = TX__String__String(&v54, off_677B18);
- v10 = TX__Registry__TestOpenKey(&v76, *(_DWORD *)v9);
- TX__String___String(&v54);
- if ( v10 )
- {
- v53 = (int *)G_NullArray_1;
- TX__Registry__EnumerateValues(&v76, &v53, 1);
- v11 = 0;
- v52 = *(v53 - 1);
- if ( v52 > 0 )
- {
- do
- {
- v12 = (const char *)v53[v11];
- v13 = (int)lpScreen;
- if ( lpScreen[0] )
- {
- while ( !_strstr(v12, *(const char **)v13) )
- {
- v14 = *(_DWORD *)(v13 + 4);
- v13 += 4;
- if ( !v14 )
- goto LABEL_18;
- }
- }
- else
- {
- LABEL_18:
- TX__Registry__GetValueData(&v76, v53, &v54, v53[v11], G_NullString_0);
- if ( *((_DWORD *)v54 - 1) != 1 )
- {
- m_create_token(&tok, _DATA_token);
- m_token_add_str((int)&tok, (const char *)v53[v11]);
- m_token_add_str((int)&tok, v54);
- m_random_seed((int)&tok, 8);
- }
- TX__String___String(&v54);
- }
- ++v11;
- }
- while ( v11 < v52 );
- v8 = v68;
- }
- if ( InterlockedDecrement((volatile LONG *)v53 - 4) <= 0 )
- (*(void (__cdecl **)(int *))(*(v53 - 3) + 8))(v53);
- }
- m_create_token(&tok, END_token);
- if ( InterlockedDecrement((volatile LONG *)(v8 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v8 - 12) + 8))(v8);
- if ( InterlockedDecrement((volatile LONG *)(v61 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v61 - 12) + 8))(v61);
- String_destructor = TX__String___String;
- TX__String___String(&v91);
- TX__String___String(&v90);
- TX__String___String(&v88);
- TX__String___String(&v87);
- TX__String___String(&v86);
- TX__String___String(&v85);
- sub_496DC0(1);
- v69 = G_NullString_0;
- m_encrypt_smth((int)&tok, &TRIXXX_RSA_PRIVKEY_1_3, 609);
- v18 = *(_DWORD *)sub_402030(&tok);
- v19 = sub_4A2720(&tok);
- m_base64_enc(v18, v19, (int)&v69);
- v49 = dword_6828A0;
- v59 = G_NullArray_1;
- v47 = dword_6828A8;
- ((void (__thiscall *)(int *))TX__String__String)(&v62);
- TX__String__String(&v61, dword_682898, dword_6828A0);
- v15 = (char *)sub_4064B0(lang);
- v16 = v15;
- username = v15;
- if ( v15 )
- InterlockedIncrement((volatile LONG *)v15 - 4);
- v50 = 0;
- v52 = 0;
- do
- {
- v20 = (*(int (__thiscall **)(char *, int, int))(*(_DWORD *)v16 + 4))(v16, v47, v49);
- if ( v20 )
- InterlockedIncrement((volatile LONG *)(v20 - 16));
- if ( v52 )
- {
- if ( InterlockedDecrement((volatile LONG *)(v52 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v52 - 12) + 8))(v52);
- }
- v52 = v20;
- sub_4057C0((void *)v20);
- sub_405820(username, pass);
- sub_405880(v20, (int)&v59);
- TX__String__String(&v53, "D=", v69);
- sub_405890((void *)v20);
- String_destructor(&v51);
- sub_48D560((void *)v20);
- while ( m_download_crap(v16) > 0 && !*(_BYTE *)(v68 + 12) )
- ;
- v53 = (int *)sub_4058A0(v20);
- if ( TX__XlogLevel <= 2 )
- {
- TX__LogStream__pLockInfo(TX__Xerr, TX__XlogLevel);
- v21 = m_HttpQueryStatusCode(v20);
- TX__Stream__operator__("StatusCode=");
- TX__Stream__operator__(TX__Xerr, v21);
- TX__Stream__pWS(TX__Xerr);
- TX__Stream__operator__("Succeeded=");
- TX__Stream__operator__(v53);
- TX__Stream__pLF(TX__Xerr);
- TX__LogStream__pUnlockMessage(TX__Xerr);
- String_destructor = TX__String___String;
- v16 = username;
- }
- v23 = __SETO__(v52 + 1, 2);
- v22 = v52++ - 1 < 0;
- }
- while ( v22 ^ v23 && v53 );
- if ( v20 )
- {
- if ( InterlockedDecrement((volatile LONG *)(v20 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v20 - 12) + 8))(v20);
- }
- if ( v16 )
- {
- if ( InterlockedDecrement((volatile LONG *)v16 - 4) <= 0 )
- (*(void (__cdecl **)(char *))(*((_DWORD *)v16 - 3) + 8))(v16);
- }
- v25 = &v62;
- v24 = 2;
- do
- {
- --v25;
- String_destructor(v25);
- --v24;
- }
- while ( v24 );
- v26 = (int *)operator new(0x2Cu, &unk_685230);
- if ( v26 )
- {
- v27 = G_NullString_0;
- *v26 = -1;
- v26[1] = v27;
- v26[2] = v27;
- v26[3] = v27;
- v26[4] = 0;
- v26[5] = 0;
- v26[6] = v27;
- v26[7] = v27;
- v26[8] = v27;
- v26[9] = v27;
- v26[10] = v27;
- v28 = (int)v26;
- InterlockedIncrement((volatile LONG *)v26 - 4);
- }
- else
- {
- v28 = 0;
- }
- *(_DWORD *)v28 = -1;
- if ( (unsigned __int8)m_check_blocks_sha1_sum(&v57) )
- {
- m_decode_auth_response(&v57);
- sub_4A7CE0(&v60);
- sub_4A7D00((int)&v60, v57, *(_DWORD *)(v57 - 4));
- if ( !m_ShopPackCheck_token(AUTH_token)
- || !m_ShopPackCheck_I32(v28)
- || !m_ShopPackCheck_U32(&v60, (int)&v77)
- || !m_ShopPackCheck_U32(&v60, (int)&v78)
- || !m_ShopPackCheck_U32(&v60, (int)&v79)
- || !m_ShopPackCheck_U32(&v60, (int)&v80)
- || !m_ShopPackCheck_U32(&v60, (int)&v81)
- || *(_DWORD *)v28 <= 0 && !m_ShopPackCheck_str(&v60, v28 + 4) )
- goto LABEL_112;
- v29 = v77;
- v30 = v78;
- *(_DWORD *)(v28 + 20) = *(_DWORD *)v28;
- dw_AUTH_1 = v29;
- dw_AUTH_2 = v30;
- dw_AUTH_3 = v79;
- dw_AUTH_4 = v80;
- dw_AUTH_5 = v81;
- v52 = 0;
- if ( !m_ShopPackExpect_Token(&v60, (int)&v52) )
- goto LABEL_105;
- while ( 1 )
- {
- if ( v52 == _DATA_token )
- {
- v51 = G_NullString_0;
- v50 = G_NullString_0;
- if ( !m_ShopPackCheck_str(&v60, (int)&v51) || !m_ShopPackCheck_str(&v60, (int)&v50) )
- {
- String_destructor(&v50);
- v37 = &v51;
- goto LABEL_104;
- }
- if ( *(_DWORD *)(v51 - 4) != 1 )
- {
- v31 = TX__XlogLevel;
- if ( TX__XlogLevel <= 2 )
- {
- TX__LogStream__pLockInfo(TX__Xerr, TX__XlogLevel);
- v58 = 61;
- v32 = sub_4613E0(TX__Xerr, (int)"Set");
- v33 = sub_40E570(v32, (int)&v51);
- v34 = sub_4985A0(v33, (int)&v58);
- sub_4059B0(v34, (int)&v50);
- TX__LogStream__pUnlockMessage(TX__Xerr);
- }
- TX__Registry__SetValueData(&v74, v31, v51, v50);
- }
- String_destructor(&v50);
- v35 = &v51;
- }
- else
- {
- if ( v52 == _URL0_token )
- {
- if ( !m_ShopPackCheck_str(&v60, v28 + 8) )
- goto LABEL_105;
- goto LABEL_100;
- }
- if ( v52 == _URL2_token )
- {
- v50 = G_NullString_0;
- if ( !m_ShopPackCheck_str(&v60, (int)&v50) )
- {
- v37 = &v50;
- LABEL_104:
- String_destructor(v37);
- LABEL_105:
- m_ShopPackCheck_U32(&v60, (int)&v68);
- dword_685134 = v68;
- goto LABEL_112;
- }
- v46 = &v50;
- v36 = v28 + 12;
- }
- else
- {
- if ( v52 == _GEOK_token )
- {
- v53 = (int *)-1;
- if ( !m_ShopPackCheck_I32((int)&v53) )
- goto LABEL_105;
- *(_DWORD *)(v28 + 16) = v53;
- goto LABEL_100;
- }
- if ( v52 == _GEHA_token )
- {
- v50 = G_NullString_0;
- v38 = m_ShopPackCheck_str(&v60, (int)&v50);
- v37 = &v50;
- if ( !v38 )
- goto LABEL_104;
- v46 = &v50;
- v36 = v28 + 28;
- }
- else
- {
- if ( v52 == _EXIT_token )
- {
- v50 = G_NullString_0;
- v39 = m_ShopPackCheck_str(&v60, (int)&v50);
- v37 = &v50;
- if ( !v39 )
- goto LABEL_104;
- v46 = &v50;
- v36 = v28 + 24;
- }
- else
- {
- if ( v52 == _UURL_token )
- {
- v50 = G_NullString_0;
- v40 = m_ShopPackCheck_str(&v60, (int)&v50);
- v37 = &v50;
- if ( !v40 )
- goto LABEL_104;
- v46 = &v50;
- v36 = v28 + 32;
- }
- else
- {
- if ( v52 == _UMD5_token )
- {
- v50 = G_NullString_0;
- v41 = m_ShopPackCheck_str(&v60, (int)&v50);
- v37 = &v50;
- if ( !v41 )
- goto LABEL_104;
- v46 = &v50;
- v36 = v28 + 36;
- }
- else
- {
- if ( v52 != _INGN_token )
- goto LABEL_105;
- v50 = G_NullString_0;
- v42 = m_ShopPackCheck_str(&v60, (int)&v50);
- v37 = &v50;
- if ( !v42 )
- goto LABEL_104;
- v46 = &v50;
- v36 = v28 + 40;
- }
- }
- }
- }
- }
- TX__String__operator_(v36, v46);
- v35 = &v50;
- }
- String_destructor(v35);
- LABEL_100:
- v52 = 0;
- if ( !m_ShopPackExpect_Token(&v60, (int)&v52) )
- goto LABEL_105;
- }
- }
- if ( *(_DWORD *)(v57 - 4) )
- {
- if ( TX__XlogLevel > 5 )
- goto LABEL_112;
- TX__LogStream__pLockError(TX__Xerr, v57);
- v48 = (int)"Pin: checksum failed.";
- }
- else
- {
- if ( TX__XlogLevel > 5 )
- goto LABEL_112;
- TX__LogStream__pLockError(TX__Xerr, v57);
- v48 = (int)"Pin: no data received.";
- }
- TX__Stream__operator__(v48);
- TX__Stream__pLF(TX__Xerr);
- TX__LogStream__pUnlockMessage(TX__Xerr);
- LABEL_112:
- InterlockedIncrement((volatile LONG *)(v28 - 16));
- v44 = md5;
- v43 = *(_DWORD *)(md5 + 40);
- if ( v43 )
- {
- if ( InterlockedDecrement((volatile LONG *)(v43 - 16)) <= 0 )
- (*(void (__cdecl **)(_DWORD))(*(_DWORD *)(*(_DWORD *)(v44 + 40) - 12) + 8))(*(_DWORD *)(v44 + 40));
- }
- *(_DWORD *)(v44 + 40) = v28;
- sub_496DC0(3);
- TX__CriticalSection__Enter((login_st *)&unk_6876E0);
- dword_6876B8 |= 0x10u;
- TX__CriticalSection__Leave(&unk_6876E0);
- if ( InterlockedDecrement((volatile LONG *)(v28 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v28 - 12) + 8))(v28);
- if ( InterlockedDecrement((volatile LONG *)(v57 - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v57 - 12) + 8))(v57);
- String_destructor(&executable);
- v45 = lang;
- if ( lang )
- {
- if ( InterlockedDecrement((volatile LONG *)(lang - 16)) <= 0 )
- (*(void (__cdecl **)(int))(*(_DWORD *)(v45 - 12) + 8))(v45);
- }
- String_destructor(&v70);
- String_destructor(&v69);
- String_destructor(&v73);
- String_destructor(&v82);
- String_destructor(&pass);
- String_destructor(&v63);
- String_destructor(&v64);
- if ( InterlockedDecrement((volatile LONG *)v54 - 4) <= 0 )
- (*(void (__cdecl **)(const char *))(*((_DWORD *)v54 - 3) + 8))(v54);
- TX__Registry___Registry(&v74);
- result = InterlockedDecrement((volatile LONG *)(v44 - 16));
- if ( result <= 0 )
- result = (*(int (__cdecl **)(int))(*(_DWORD *)(v44 - 12) + 8))(v44);
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement