Spaces:
Running
on
Zero
Running
on
Zero
__int64 __fastcall sub_4085E9(__int64 a1, int a2, __int64 a3, __int64 a4)\n{\n__int64 result; // rax\ndouble v5; // [rsp+20h] [rbp-30h]\n__int64 v6; // [rsp+28h] [rbp-28h]\nint v7; // [rsp+38h] [rbp-18h]\nint v8; // [rsp+3Ch] [rbp-14h]\ndouble v9; // [rsp+40h] [rbp-10h]\nint j; // [rsp+48h] [rbp-8h]\nint i; // [rsp+4Ch] [rbp-4h]\n\nv9 = 0.0;\nv8 = -1;\nv7 = -1;\nfor ( i = 0; ; ++i )\n{\nresult = *(unsigned int *)(a3 + 512);\nif ( i >= (int)result )\nbreak;\nfor ( j = 0; j < *(_DWORD *)(a4 + 512); ++j )\n{\nv6 = 16LL * j + a4;\nv5 = fabs(1.0 - *(double *)(16LL * i + a3 + 8) / *(double *)(v6 + 8));\nif ( v5 <= 2.5 && (v8 < 0 || v9 > v5) )\n{\nv8 = *(_DWORD *)(16LL * i + a3);\nv7 = *(_DWORD *)v6;\nv9 = v5;\n}\n}\n}\nif ( v8 >= 0 && v7 >= 0 )\nresult = sub_408140(a1, v8, a2, v7);\nreturn result;\n} | |
unsigned __int64 __fastcall sub_40B9AE(__int64 a1)\n{\n return (sub_40B911(a1) + 7) >> 3;\n} | |
__int64 __fastcall sub_40FD86(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\nunsigned int v3; // [rsp+3Ch] [rbp-14h] BYREF\n__int64 v4; // [rsp+40h] [rbp-10h]\nunsigned int v5; // [rsp+4Ch] [rbp-4h]\n\nif ( !*(_QWORD *)(a1 + 4728) )\nreturn 8195LL;\npthread_mutex_lock((pthread_mutex_t *)(a1 + 5304));\nv5 = sub_408505(a2, 12, 4);\nif ( (unsigned int)sub_40BD3C(a1, 0LL, v5, 1, &v3) )\n{\npthread_mutex_unlock((pthread_mutex_t *)(a1 + 5304));\nresult = v3;\n}\nelse\n{\nv3 = 8205;\nv4 = sub_4035A4(*(__int64 **)(a1 + 4728), v5);\nif ( v4 )\n{\nif ( !(unsigned int)sub_40894E(a1, *(_DWORD *)(v4 + 8)) )\n{\nif ( (unsigned int)sub_4103A1(a1, v5) )\nv3 = 8205;\nelse\nv3 = 8193;\n}\n}\nelse\n{\nv3 = 8201;\n}\nsub_40891E(a1);\npthread_mutex_unlock((pthread_mutex_t *)(a1 + 5304));\nresult = v3;\n}\nreturn result;\n} | |
__int64 __fastcall sub_4706DF(__int64 a1)\n{\nreturn sub_471728(a1);\n} | |
signed __int64 __fastcall sub_4027FF(unsigned __int64 a1, size_t a2)\n{\nreturn sys_munmap(a1, a2);\n} | |
__int64 __fastcall sub_4110C8(__int64 a1)\n{\n__int64 result; // rax\n\nresult = a1;\n*(_DWORD *)(a1 + 440) = 1;\nreturn result;\n} | |
_BYTE *__fastcall sub_40F27D(_BYTE *a1)\n{\n_BYTE *result; // rax\n\nswitch ( (unsigned int)sub_40F030(a1) )\n{\ncase 0u:\nresult = 0LL;\nbreak;\ncase 1u:\nresult = a1 + 44;\nbreak;\ncase 2u:\nresult = 0LL;\nbreak;\ncase 3u:\nresult = 0LL;\nbreak;\ncase 8u:\nresult = a1 + 44;\nbreak;\ncase 9u:\nresult = a1 + 54;\nbreak;\ncase 0xAu:\nresult = a1 + 54;\nbreak;\ncase 0xBu:\nresult = a1 + 64;\nbreak;\ncase 0xCu:\nresult = a1 + 44;\nbreak;\ncase 0xDu:\nresult = a1 + 48;\nbreak;\ndefault:\nresult = 0LL;\nbreak;\n}\nreturn result;\n} | |
_QWORD *__fastcall sub_40305C(_QWORD *a1, _QWORD *a2, __int64 a3)\n{\n_QWORD *result; // rax\n\n*(_QWORD *)(a3 + 8) = a1;\n*a1 = a3;\na1[1] = a2;\nresult = a2;\n*a2 = a1;\nreturn result;\n} | |
_BOOL8 __fastcall sub_40C1F3(__int64 a1, unsigned int a2)\n{\n*(_DWORD *)(a1 + 32) = 0;\nreturn sub_40C933(a1, a2) != 0;\n} | |
__int64 __fastcall sub_40FAC9(__int64 a1, __int64 a2, char *a3)\n{\n _DWORD v5[4]; // [rsp+20h] [rbp-120h] BYREF\n _QWORD *v6; // [rsp+30h] [rbp-110h]\n _QWORD v7[4]; // [rsp+40h] [rbp-100h] BYREF\n _DWORD v8[4]; // [rsp+60h] [rbp-E0h] BYREF\n _QWORD *v9; // [rsp+70h] [rbp-D0h]\n char v10[32]; // [rsp+80h] [rbp-C0h] BYREF\n _DWORD v11[4]; // [rsp+A0h] [rbp-A0h] BYREF\n _QWORD *v12; // [rsp+B0h] [rbp-90h]\n _DWORD v13[4]; // [rsp+C0h] [rbp-80h] BYREF\n _QWORD *v14; // [rsp+D0h] [rbp-70h]\n _QWORD v15[4]; // [rsp+E0h] [rbp-60h] BYREF\n char v16[32]; // [rsp+100h] [rbp-40h] BYREF\n _QWORD v17[3]; // [rsp+120h] [rbp-20h] BYREF\n unsigned int v18; // [rsp+13Ch] [rbp-4h]\n\n v18 = -110;\n if ( (int)sub_40D171(a3, 1LL) <= 0 )\n return 4294967292LL;\n sub_40AEAB((__int64)v16);\n sub_40AEAB((__int64)v15);\n sub_40AEAB((__int64)v13);\n sub_40AEAB((__int64)v11);\n sub_40AEAB((__int64)v17);\n sub_40AEAB((__int64)v10);\n sub_40AEAB((__int64)v8);\n sub_40AEAB((__int64)v7);\n sub_40AEAB((__int64)v5);\n v18 = sub_40F762((__int64)v17, a2, (__int64)a3);\n if ( !v18 )\n {\n if ( (unsigned int)sub_40D171(v17, 1LL) )\n {\n v18 = -14;\n }\n else\n {\n v18 = sub_40E8A2(v16, a2, a3);\n if ( !v18 )\n {\n v18 = sub_40B15B((__int64)v15, (__int64)v16);\n if ( !v18 )\n {\n v18 = sub_40B15B((__int64)v10, (__int64)a3);\n if ( !v18 )\n {\n v18 = sub_40B15B((__int64)v8, (__int64)a3);\n if ( !v18 )\n {\n v18 = sub_40B64B((__int64)v13, 1LL);\n if ( !v18 )\n {\n v18 = sub_40B64B((__int64)v11, 0LL);\n if ( !v18 )\n {\n v18 = sub_40B64B((__int64)v7, 0LL);\n if ( !v18 )\n {\n v18 = sub_40B64B((__int64)v5, 1LL);\n if ( !v18 )\n {\n do\n {\n while ( (*(_QWORD *)v15[2] & 1LL) == 0 )\n {\n v18 = sub_40CAE4((__int64)v15, 1uLL);\n if ( !v18\n && ((*v14 & 1LL) == 0 && (*v12 & 1LL) == 0\n || (v18 = sub_40D60B(v13, (char *)v13, v10)) == 0\n && (v18 = sub_40D6E3(v11, (char *)v11, v16)) == 0) )\n {\n v18 = sub_40CAE4((__int64)v13, 1uLL);\n if ( !v18 )\n {\n v18 = sub_40CAE4((__int64)v11, 1uLL);\n if ( !v18 )\n continue;\n }\n }\n goto LABEL_48;\n }\n while ( (*v9 & 1LL) == 0 )\n {\n v18 = sub_40CAE4((__int64)v8, 1uLL);\n if ( !v18\n && ((*(_QWORD *)v7[2] & 1LL) == 0 && (*v6 & 1LL) == 0\n || (v18 = sub_40D60B(v7, (char *)v7, v10)) == 0\n && (v18 = sub_40D6E3(v5, (char *)v5, v16)) == 0) )\n {\n v18 = sub_40CAE4((__int64)v7, 1uLL);\n if ( !v18 )\n {\n v18 = sub_40CAE4((__int64)v5, 1uLL);\n if ( !v18 )\n continue;\n }\n }\n goto LABEL_48;\n }\n if ( (int)sub_40CE1D(v15, (__int64)v8) < 0 )\n {\n v18 = sub_40D6E3(v8, (char *)v8, (char *)v15);\n if ( v18 )\n goto LABEL_48;\n v18 = sub_40D6E3(v7, (char *)v7, (char *)v13);\n if ( v18 )\n goto LABEL_48;\n v18 = sub_40D6E3(v5, (char *)v5, (char *)v11);\n if ( v18 )\n goto LABEL_48;\n }\n else\n {\n v18 = sub_40D6E3(v15, (char *)v15, (char *)v8);\n if ( v18 )\n goto LABEL_48;\n v18 = sub_40D6E3(v13, (char *)v13, (char *)v7);\n if ( v18 )\n goto LABEL_48;\n v18 = sub_40D6E3(v11, (char *)v11, (char *)v5);\n if ( v18 )\n goto LABEL_48;\n }\n }\n while ( (unsigned int)sub_40D171(v15, 0LL) );\n while ( (int)sub_40D171(v7, 0LL) < 0 )\n {\n v18 = sub_40D60B(v7, (char *)v7, a3);\n if ( v18 )\n goto LABEL_48;\n }\n while ( (int)sub_40CE1D(v7, (__int64)a3) >= 0 )\n {\n v18 = sub_40D6E3(v7, (char *)v7, a3);\n if ( v18 )\n goto LABEL_48;\n }\n v18 = sub_40B15B(a1, (__int64)v7);\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\nLABEL_48:\n sub_40AED8((__int64)v16);\n sub_40AED8((__int64)v15);\n sub_40AED8((__int64)v13);\n sub_40AED8((__int64)v11);\n sub_40AED8((__int64)v17);\n sub_40AED8((__int64)v10);\n sub_40AED8((__int64)v8);\n sub_40AED8((__int64)v7);\n sub_40AED8((__int64)v5);\n return v18;\n} | |
__int64 __fastcall sub_404613(char *a1, __int64 a2, _DWORD *a3)\n{\n*a3 = 0;\nif ( toupper(*a1) != 85 && toupper(*a1) == 83 )\n*a3 = 1;\nreturn __isoc99_sscanf();\n} | |
__int64 __fastcall sub_40D3B8(__int64 a1, _DWORD *a2)\n{\n__int64 result; // rax\nchar v3; // [rsp+1Eh] [rbp-2h] BYREF\nunsigned __int8 v4; // [rsp+1Fh] [rbp-1h] BYREF\n\nsub_40D2EF(a1, &v4, &v3);\nif ( v4 <= 0x3Fu )\n{\nif ( v4 <= 0x20u )\n{\nresult = 0xFFFFFFFFLL;\n}\nelse\n{\n*a2 = 0;\nresult = 1LL;\n}\n}\nelse\n{\n*a2 = 1;\nresult = 1LL;\n}\nreturn result;\n} | |
__int64 __fastcall sub_44B14B(__int64 a1)\n{\n__int64 result; // rax\n\nif ( *(_DWORD *)(a1 + 24) )\nresult = sub_44B04C((_QWORD *)a1);\nelse\nresult = sub_44AF2A((_QWORD *)a1);\nreturn result;\n} | |
__int64 __fastcall sub_44509B(__int64 a1, char *a2, char *a3, char *a4, const void *a5, unsigned __int64 a6, unsigned int a7, __int64 a8, __int64 a9)\n{\nreturn sub_444D95(a1, a2, a3, a4, a5, a6, a7, a8, a9);\n} | |
__int64 __fastcall sub_4A612D(__int64 a1, const void **a2, __int64 a3)\n{\nunsigned int v5; // [rsp+2Ch] [rbp-4h]\nunsigned int v6; // [rsp+2Ch] [rbp-4h]\n\nv5 = sub_4A5F97(a1 + 8, a2, a3);\nif ( v5 )\nreturn v5;\nv5 = sub_4A5F97(a1 + 32, a2, a3);\nif ( v5 )\nreturn v5;\nv5 = sub_4A5F97(a1 + 104, a2, a3);\nif ( v5 )\nreturn v5;\nv6 = sub_4A607A((_QWORD *)(a1 + 104), (int *)(a1 + 8));\nif ( v6 )\nreturn v6;\n*(_QWORD *)a1 = sub_43ED3D(a1 + 8);\nreturn 0LL;\n} | |
__int64 __fastcall sub_42FB0A(unsigned __int8 *a1)\n{\nint v2; // [rsp+14h] [rbp-4h]\nunsigned int v3; // [rsp+14h] [rbp-4h]\nunsigned int v4; // [rsp+14h] [rbp-4h]\n\nv2 = (a1[1] << 8) + *a1 + (a1[2] << 16);\nv3 = (((8 * v2) ^ (unsigned int)v2) >> 5) + ((8 * v2) ^ v2);\nv4 = (((16 * v3) ^ v3) >> 17) + ((16 * v3) ^ v3);\nreturn (((v4 << 25) ^ v4) >> 6) + ((v4 << 25) ^ v4);\n} | |
_BOOL8 __fastcall sub_4189C9(const char *a1)\n{\n_BOOL8 result; // rax\n\nif ( *a1 == 47 )\nresult = 0LL;\nelse\nresult = !sub_418934(a1);\nreturn result;\n} | |
__int64 __fastcall sub_4091E3(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5, int a6)\n{\n int v7; // er9\n int v8; // er9\n __int64 v9; // [rsp+10h] [rbp-20h]\n __int64 v10; // [rsp+20h] [rbp-10h]\n unsigned int i; // [rsp+28h] [rbp-8h]\n unsigned int v12; // [rsp+2Ch] [rbp-4h]\n\n v10 = *(_QWORD *)(a1 + 112);\n v12 = 0;\n if ( !v10 )\n return 0xFFFFFFFFLL;\n sub_41E681(a1, 2, (unsigned int)\"ssl_msg.c\", 4108, (unsigned int)\"=> ssl_load_buffered_messsage\", a6);\n if ( *(_DWORD *)(a1 + 8) == 10 || *(_DWORD *)(a1 + 8) == 12 )\n {\n if ( *(_BYTE *)(v10 + 1024) )\n {\n sub_41E681(a1, 2, (unsigned int)\"ssl_msg.c\", 4122, (unsigned int)\"Injecting buffered CCS message\", v7);\n *(_DWORD *)(a1 + 232) = 20;\n *(_QWORD *)(a1 + 240) = 1LL;\n **(_BYTE **)(a1 + 216) = 1;\n *(_QWORD *)(a1 + 248) = 0LL;\n *(_QWORD *)(a1 + 264) = 0LL;\n *(_BYTE *)(v10 + 1024) = 0;\n }\n else\n {\n sub_41E681(a1, 2, (unsigned int)\"ssl_msg.c\", 4117, (unsigned int)\"CCS not seen in the current flight\", v7);\n v12 = -1;\n }\n }\n else\n {\n for ( i = 1; i <= 3; ++i )\n {\n if ( (*(_BYTE *)(24LL * i + 1024 + v10 + 8) & 1) != 0 )\n sub_41E681(\n a1,\n 2,\n (unsigned int)\"ssl_msg.c\",\n 4144,\n (unsigned int)\"Future message with sequence number %u %s buffered.\",\n i + *(_DWORD *)(v10 + 940));\n }\n if ( (*(_BYTE *)(v10 + 1032) & 1) != 0 && (*(_BYTE *)(v10 + 1032) & 4) != 0 )\n {\n v9 = (*(unsigned __int8 *)(*(_QWORD *)(v10 + 1040) + 2LL) << 8) | (*(unsigned __int8 *)(*(_QWORD *)(v10 + 1040)\n + 1LL) << 16) | (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(v10 + 1040) + 3LL);\n if ( (unsigned __int64)(v9 + 12) > 0x4000 )\n {\n sub_41E681(a1, 1, (unsigned int)\"ssl_msg.c\", 4166, (unsigned int)\"should never happen\", v7);\n return 4294939648LL;\n }\n sub_41E681(\n a1,\n 2,\n (unsigned int)\"ssl_msg.c\",\n 4170,\n (unsigned int)\"Next handshake message has been buffered - load\",\n v7);\n sub_41E8E1(\n a1,\n 3,\n (unsigned int)\"ssl_msg.c\",\n 4171,\n (unsigned int)\"Buffered handshake message (incl. header)\",\n *(_QWORD *)(v10 + 1040),\n v9 + 12);\n *(_DWORD *)(a1 + 232) = 22;\n *(_QWORD *)(a1 + 288) = v9 + 12;\n *(_QWORD *)(a1 + 240) = v9 + 12;\n memcpy(*(void **)(a1 + 216), *(const void **)(v10 + 1040), *(_QWORD *)(a1 + 288));\n v12 = 0;\n }\n else\n {\n sub_41E681(\n a1,\n 2,\n (unsigned int)\"ssl_msg.c\",\n 4184,\n (unsigned int)\"Next handshake message %u not or only partially bufffered\",\n *(_DWORD *)(v10 + 940));\n v12 = -1;\n }\n }\n sub_41E681(a1, 2, (unsigned int)\"ssl_msg.c\", 4192, (unsigned int)\"<= ssl_load_buffered_message\", v8);\n return v12;\n} | |
__int64 __fastcall sub_40C07F(unsigned __int64 *a1, char *a2)\n{\n __int64 v2; // rax\n __int64 result; // rax\n char v4[16]; // [rsp+10h] [rbp-10h] BYREF\n\n v2 = sub_41CF11(a2);\n if ( !(unsigned int)sub_40AAD1(a1, a2, v2) )\n return 0xFFFFFFFFLL;\n if ( (unsigned int)sub_41D312(v4, a2) )\n {\n if ( (unsigned int)sub_41CBB6(a1 + 4, v4, 16LL) )\n result = 0LL;\n else\n result = 0xFFFFFFFFLL;\n }\n else\n {\n if ( !(unsigned int)sub_41CC08(a1 + 4, &unk_41F463) )\n return 0xFFFFFFFFLL;\n if ( (unsigned int)sub_40DED0(*a1, &unk_41F45D) == -1 )\n return 0xFFFFFFFFLL;\n if ( (unsigned int)sub_40B589((__int64)a1, qword_541E10, qword_541E18) == -1 )\n return 0xFFFFFFFFLL;\n sub_40F7B7(&unk_541E00);\n if ( a1[2] )\n goto LABEL_18;\n if ( !(unsigned int)sub_41CC08(a1 + 1, a2) )\n return 0xFFFFFFFFLL;\n if ( (unsigned int)sub_41CCCD(a1 + 1) )\n {\nLABEL_18:\n sub_40E0B2(a1[4], a1[5]);\n result = 0LL;\n }\n else\n {\n result = 0xFFFFFFFFLL;\n }\n }\n return result;\n} | |
int __fastcall sub_406122(int a1)\n{\nif ( ptr )\n{\nfree(ptr);\nptr = 0LL;\ndword_40E428 = 0;\n}\nreturn sub_40605E(a1);\n} | |
void __fastcall __noreturn sub_401E55(signed int a1, int a2)\n{\nint i; // [rsp+18h] [rbp-8h]\nint j; // [rsp+1Ch] [rbp-4h]\n\nsub_401B7E(a1);\nfor ( i = 0; i <= 127; ++i )\n*(_QWORD *)&stru_4079A0[2].__size[64 * (__int64)i + 16] = 0LL;\nfor ( j = 0; j < a1; ++j )\nsub_401508((void *(*)(void *))sub_4019E6, (void *)(a2 * j));\nsub_401BED(j, a1, 0);\n} | |
__int64 __fastcall sub_419145(_DWORD *a1, unsigned __int8 *a2, __int64 a3)\n{\n unsigned __int8 *v4; // [rsp+28h] [rbp-48h] BYREF\n _DWORD v5[6]; // [rsp+30h] [rbp-40h] BYREF\n size_t v6; // [rsp+48h] [rbp-28h] BYREF\n int v7; // [rsp+54h] [rbp-1Ch] BYREF\n unsigned __int8 *v8; // [rsp+58h] [rbp-18h]\n unsigned __int8 *v9; // [rsp+60h] [rbp-10h]\n int v10; // [rsp+68h] [rbp-8h]\n unsigned int v11; // [rsp+6Ch] [rbp-4h]\n\n v11 = -110;\n v4 = a2;\n v9 = &a2[a3];\n v11 = sub_40A461(&v4, (__int64)&a2[a3], &v6, 48);\n if ( v11 )\n return v11 - 15616;\n v9 = &v4[v6];\n v11 = sub_40A686((char **)&v4, (__int64)&v4[v6], &v7);\n if ( v11 )\n return v11 - 15616;\n if ( v7 != 1 )\n return 4294951552LL;\n v11 = sub_40A461(&v4, (__int64)v9, &v6, 4);\n if ( v11 )\n return v11 - 15616;\n v11 = sub_40C5A6((__int64)(a1 + 62), v4, v6);\n if ( v11 )\n goto LABEL_30;\n v4 += v6;\n v10 = 0;\n if ( v9 != v4 )\n {\n v11 = sub_40A461(&v4, (__int64)v9, &v6, 160);\n if ( v11 )\n {\n if ( v11 != -98 )\n goto LABEL_30;\n }\n else\n {\n v11 = sub_417FA5(&v4, (__int64)&v4[v6], (__int64)v5);\n if ( v11 )\n goto LABEL_32;\n v11 = sub_41875F(v5, a1);\n if ( v11 )\n goto LABEL_32;\n }\n }\n if ( v9 == v4 )\n goto LABEL_28;\n v11 = sub_40A461(&v4, (__int64)v9, &v6, 161);\n if ( v11 )\n {\n if ( v11 == -98 )\n goto LABEL_28;\nLABEL_30:\n sub_4305D1(a1);\n return v11 - 15616;\n }\n v8 = &v4[v6];\n v11 = sub_40A97A(&v4, (__int64)&v4[v6], &v6);\n if ( v11 )\n return v11 - 15616;\n if ( v8 != &v4[v6] )\n return 4294951578LL;\n v11 = sub_418804(&v4, (__int64)v8, (__int64)a1);\n if ( v11 )\n {\n if ( v11 != -20096 )\n return 4294951680LL;\n }\n else\n {\n v10 = 1;\n }\nLABEL_28:\n if ( !v10 )\n {\n v11 = sub_4340BE(a1, a1 + 68, a1 + 62, a1 + 20, 0LL, 0LL);\n if ( v11 )\n goto LABEL_30;\n }\n v11 = sub_43466B(a1, a1 + 62);\n if ( v11 )\n {\nLABEL_32:\n sub_4305D1(a1);\n return v11;\n }\n return 0LL;\n} | |
__int64 __fastcall sub_408A72(__int64 a1, int a2, _DWORD *a3)\n{\n__int64 result; // rax\n__int64 v5; // [rsp+28h] [rbp-18h]\nint j; // [rsp+34h] [rbp-Ch]\nint v7; // [rsp+38h] [rbp-8h]\nint i; // [rsp+3Ch] [rbp-4h]\n\nresult = ((__int64)a2 << 7) + 7952 + a1;\nv5 = result;\nv7 = 0;\nif ( a2 >= 0 )\n{\nresult = *(unsigned int *)(a1 + 7944);\nif ( a2 <= (int)result )\n{\nmemset(a3, 0, 0xF74uLL);\nsub_405E82((double *)(v5 + 64), a3, 0.0, 0.0);\nsub_405E82((double *)(v5 + 64), a3 + 2, (double)*(int *)(v5 + 56), 0.0);\nsub_405E82((double *)(v5 + 64), a3 + 4, (double)*(int *)(v5 + 56), (double)*(int *)(v5 + 56));\nsub_405E82((double *)(v5 + 64), a3 + 6, 0.0, (double)*(int *)(v5 + 56));\na3[8] = *(_DWORD *)(v5 + 56);\nfor ( i = 0; ; ++i )\n{\nresult = *(unsigned int *)(v5 + 56);\nif ( i >= (int)result )\nbreak;\nfor ( j = 0; j < *(_DWORD *)(v5 + 56); ++j )\n{\nif ( (int)sub_4076D1(a1, a2, j, i) > 0 )\n*((_BYTE *)a3 + (v7 >> 3) + 36) |= 1 << (v7 & 7);\n++v7;\n}\n}\n}\n}\nreturn result;\n} | |
_BOOL8 __fastcall sub_40C783(unsigned __int64 a1, unsigned __int64 *a2, unsigned __int64 *a3, unsigned __int64 a4)\n{\nunsigned __int128 v4; // rax\nbool v5; // cf\nunsigned __int128 v6; // rax\nunsigned __int128 v7; // rax\nunsigned __int128 v8; // rax\nunsigned __int128 v9; // rax\nunsigned __int128 v10; // rax\nunsigned __int128 v11; // rax\nunsigned __int128 v12; // rax\nunsigned __int128 v13; // rax\nunsigned __int128 v14; // rax\nunsigned __int128 v15; // rax\nunsigned __int128 v16; // rax\nunsigned __int128 v17; // rax\nunsigned __int128 v18; // rax\nunsigned __int128 v19; // rax\nunsigned __int128 v20; // rax\nunsigned __int128 v21; // rax\nunsigned __int128 v22; // rax\nunsigned __int128 v23; // rax\nunsigned __int128 v24; // rax\nunsigned __int128 v25; // rax\nunsigned __int128 v26; // rax\nunsigned __int128 v27; // rax\nunsigned __int128 v28; // rax\nunsigned __int128 v29; // rax\n_BOOL8 result; // rax\nunsigned __int64 v34; // [rsp+28h] [rbp-10h]\n\nv34 = 0LL;\nwhile ( a1 > 0xF )\n{\nv4 = a4 * (unsigned __int128)*a2 + v34;\nv5 = __CFADD__((_QWORD)v4, *a3);\n*a3 += v4;\nv6 = a4 * (unsigned __int128)a2[1] + *((_QWORD *)&v4 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v6, a3[1]);\na3[1] += v6;\nv7 = a4 * (unsigned __int128)a2[2] + *((_QWORD *)&v6 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v7, a3[2]);\na3[2] += v7;\nv8 = a4 * (unsigned __int128)a2[3] + *((_QWORD *)&v7 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v8, a3[3]);\na3[3] += v8;\nv9 = a4 * (unsigned __int128)a2[4] + *((_QWORD *)&v8 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v9, a3[4]);\na3[4] += v9;\nv10 = a4 * (unsigned __int128)a2[5] + *((_QWORD *)&v9 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v10, a3[5]);\na3[5] += v10;\nv11 = a4 * (unsigned __int128)a2[6] + *((_QWORD *)&v10 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v11, a3[6]);\na3[6] += v11;\nv12 = a4 * (unsigned __int128)a2[7] + *((_QWORD *)&v11 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v12, a3[7]);\na3[7] += v12;\nv13 = a4 * (unsigned __int128)a2[8] + *((_QWORD *)&v12 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v13, a3[8]);\na3[8] += v13;\nv14 = a4 * (unsigned __int128)a2[9] + *((_QWORD *)&v13 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v14, a3[9]);\na3[9] += v14;\nv15 = a4 * (unsigned __int128)a2[10] + *((_QWORD *)&v14 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v15, a3[10]);\na3[10] += v15;\nv16 = a4 * (unsigned __int128)a2[11] + *((_QWORD *)&v15 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v16, a3[11]);\na3[11] += v16;\nv17 = a4 * (unsigned __int128)a2[12] + *((_QWORD *)&v16 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v17, a3[12]);\na3[12] += v17;\nv18 = a4 * (unsigned __int128)a2[13] + *((_QWORD *)&v17 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v18, a3[13]);\na3[13] += v18;\nv19 = a4 * (unsigned __int128)a2[14] + *((_QWORD *)&v18 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v19, a3[14]);\na3[14] += v19;\nv20 = a4 * (unsigned __int128)a2[15] + *((_QWORD *)&v19 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v20, a3[15]);\na3[15] += v20;\nv34 = *((_QWORD *)&v20 + 1) + v5;\na3 += 16;\na2 += 16;\na1 -= 16LL;\n}\nwhile ( a1 > 7 )\n{\nv21 = a4 * (unsigned __int128)*a2 + v34;\nv5 = __CFADD__((_QWORD)v21, *a3);\n*a3 += v21;\nv22 = a4 * (unsigned __int128)a2[1] + *((_QWORD *)&v21 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v22, a3[1]);\na3[1] += v22;\nv23 = a4 * (unsigned __int128)a2[2] + *((_QWORD *)&v22 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v23, a3[2]);\na3[2] += v23;\nv24 = a4 * (unsigned __int128)a2[3] + *((_QWORD *)&v23 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v24, a3[3]);\na3[3] += v24;\nv25 = a4 * (unsigned __int128)a2[4] + *((_QWORD *)&v24 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v25, a3[4]);\na3[4] += v25;\nv26 = a4 * (unsigned __int128)a2[5] + *((_QWORD *)&v25 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v26, a3[5]);\na3[5] += v26;\nv27 = a4 * (unsigned __int128)a2[6] + *((_QWORD *)&v26 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v27, a3[6]);\na3[6] += v27;\nv28 = a4 * (unsigned __int128)a2[7] + *((_QWORD *)&v27 + 1) + (unsigned __int64)v5;\nv5 = __CFADD__((_QWORD)v28, a3[7]);\na3[7] += v28;\nv34 = *((_QWORD *)&v28 + 1) + v5;\na3 += 8;\na2 += 8;\na1 -= 8LL;\n}\nwhile ( a1 )\n{\nv29 = a4 * (unsigned __int128)*a2 + v34;\nv5 = __CFADD__((_QWORD)v29, *a3);\n*a3 += v29;\nv34 = *((_QWORD *)&v29 + 1) + v5;\n++a3;\n++a2;\n--a1;\n}\ndo\n{\n*a3 += v34;\nresult = v34 > *a3;\nv34 = result;\n++a3;\n}\nwhile ( result );\nreturn result;\n} | |
char __fastcall sub_444B56(__int64 a1, int *a2, int *a3, int *a4, int a5)\n{\nchar result; // al\nint v6; // eax\n\nif ( __readfsdword(0xFFFFFFEC) )\nresult = __readfsdword(0xFFFFFFE8) != 0;\nelse\nresult = dword_489CA8 != 0;\nif ( result && a1 )\n{\nif ( a5 )\nv6 = a5;\nelse\nv6 = *a4;\nresult = sub_444772(a1, *a2, *a3, 4 * v6);\n}\nreturn result;\n} | |
__int64 __fastcall sub_411670(__int64 a1)\n{\nreturn *(_QWORD *)(a1 + 16);\n} | |
__int64 __fastcall sub_41239D(int a1, int a2, int a3, _DWORD *a4, __int64 a5, int *a6)\n{\nint s[4]; // [rsp+30h] [rbp-80h] BYREF\n__int64 v12; // [rsp+40h] [rbp-70h]\nint v13; // [rsp+48h] [rbp-68h]\nunsigned int v14; // [rsp+ACh] [rbp-4h]\n\nmemset(s, 0, 0x70uLL);\ns[0] = a1;\ns[1] = a2;\ns[2] = a3;\nv13 = *a6;\nv12 = sub_4114DB(a5);\nv14 = sub_4114E9(0x10u, (__int64)s, 0x70u);\nif ( a4 )\n*a4 = s[3];\n*a6 = v13;\nreturn v14;\n} | |
__int64 __fastcall sub_44A3A1(__int64 a1, _QWORD *a2, char *a3, char *a4, void (__fastcall *a5)(__int64, unsigned __int64, unsigned __int64), char *a6)\n{\nunsigned int v11; // [rsp+3Ch] [rbp-4h]\n\nv11 = sub_44A128(a1, a3, a5, (__int64)a6);\nif ( !v11 )\nv11 = sub_449A73(a1, a4, a3, a2, a5, a6);\nreturn v11;\n} | |
__int64 __fastcall sub_43BE0E(_QWORD *a1, __int64 a2, char a3)\n{\n if ( *a1 - a2 <= 0 )\n return 4294967188LL;\n *(_BYTE *)--*a1 = a3;\n return 1LL;\n} | |
void __fastcall sub_402630(FILE *a1, const char *a2, const char *a3)\n{\n if ( a1 )\n {\n if ( !qword_40E228 )\n {\n qword_40E228 = (__int64)getenv(\"MBEDTLS_TEST_PLATFORM\");\n if ( !qword_40E228 )\n qword_40E228 = (__int64)\"unknown\";\n }\n if ( !qword_40E230 )\n {\n qword_40E230 = (__int64)getenv(\"MBEDTLS_TEST_CONFIGURATION\");\n if ( !qword_40E230 )\n qword_40E230 = (__int64)\"unknown\";\n }\n if ( !qword_40E238 )\n {\n qword_40E238 = (__int64)strrchr(a2, 47);\n if ( qword_40E238 )\n ++qword_40E238;\n else\n qword_40E238 = (__int64)a2;\n }\n fprintf(a1, \"%s;%s;%s;%s;\", (const char *)qword_40E228, (const char *)qword_40E230, (const char *)qword_40E238, a3);\n }\n} | |
__int64 __fastcall sub_436ADF(unsigned __int64 a1)\n{\nunsigned __int64 v2; // [rsp+18h] [rbp-18h]\n\nif ( a1 < 0x18 )\n__ubsan_handle_pointer_overflow();\nv2 = a1 - 24;\nif ( a1 == 24 || (((_BYTE)a1 - 24) & 7) != 0 )\n__ubsan_handle_type_mismatch_v1();\nif ( v2 >= 0xFFFFFFFFFFFFFFD8LL )\n__ubsan_handle_pointer_overflow();\nif ( a1 == -16LL )\n__ubsan_handle_nonnull_arg();\nmemset((void *)(v2 + 40), 0, 0x40uLL);\nif ( a1 == 24 || (v2 & 7) != 0 )\n__ubsan_handle_type_mismatch_v1();\nif ( v2 >= 0xFFFFFFFFFFFFFF98LL )\n__ubsan_handle_pointer_overflow();\nif ( a1 == -80LL )\n__ubsan_handle_nonnull_arg();\nmemset((void *)(v2 + 104), 0, 0x18uLL);\nif ( a1 == 24 || (v2 & 7) != 0 )\n__ubsan_handle_type_mismatch_v1();\nif ( v2 >= 0xFFFFFFFFFFFFFFE8LL )\n__ubsan_handle_pointer_overflow();\nsub_434D99(a1);\nreturn sub_446A86(qword_4B8C40, v2);\n} | |
__int64 __fastcall sub_405DC9(__int64 a1)\n{\n return sub_405DE4(a1);\n} | |
void __fastcall __noreturn sub_426521(__int64 a1, __int64 a2, __int64 a3)\n{\nsub_431F7A(a3, a2 + 216);\n} | |
int sub_410D39()\n{\nint result; // eax\n__int16 v1; // ax\n_BOOL4 v2; // [rsp+Ch] [rbp-14h]\ntime_t v3; // [rsp+10h] [rbp-10h]\nint i; // [rsp+1Ch] [rbp-4h]\n\nwhile ( 1 )\n{\nresult = *((_DWORD *)qword_423180 + 15);\nif ( !result )\nbreak;\nresult = poll(&fd, dword_4235A0, 1000);\nif ( result < 0 )\nbreak;\nv3 = time(0LL);\nv2 = v3 > *(_QWORD *)qword_423180;\n*(_QWORD *)qword_423180 = v3;\nfor ( i = 0; i < dword_4235A0; ++i )\n{\nv1 = *(&fd.revents + 4 * i);\nif ( v1 || v2 )\n{\nif ( qword_423520[i] )\n((void (__fastcall *)(_QWORD, _QWORD))qword_423520[i])((unsigned int)v1, *((unsigned int *)&fd.fd + 2 * i));\n}\n}\nif ( dword_4235A4 )\n{\nsub_410C91();\ndword_4235A4 = 0;\n}\n}\nreturn result;\n} | |
_WORD *__fastcall sub_4DEF95(__int64 a1)\n{\n__int16 v1; // dx\n__int16 v2; // dx\n_WORD *result; // rax\nunsigned int v4; // [rsp+10h] [rbp-18h]\nunsigned int v5; // [rsp+10h] [rbp-18h]\nunsigned int v6; // [rsp+14h] [rbp-14h]\n_WORD *v7; // [rsp+18h] [rbp-10h]\n_WORD *v8; // [rsp+18h] [rbp-10h]\nunsigned int v9; // [rsp+24h] [rbp-4h]\nunsigned int v10; // [rsp+24h] [rbp-4h]\n\nv6 = *(_DWORD *)(a1 + 80);\nv9 = *(_DWORD *)(a1 + 132);\nv7 = (_WORD *)(*(_QWORD *)(a1 + 120) + 2LL * v9);\ndo\n{\nv4 = (unsigned __int16)*--v7;\nif ( v4 < v6 )\nv1 = 0;\nelse\nv1 = v4 - v6;\n*v7 = v1;\n--v9;\n}\nwhile ( v9 );\nv10 = v6;\nv8 = (_WORD *)(*(_QWORD *)(a1 + 112) + 2LL * v6);\ndo\n{\nv5 = (unsigned __int16)*--v8;\nif ( v5 < v6 )\nv2 = 0;\nelse\nv2 = v5 - v6;\nresult = v8;\n*v8 = v2;\n--v10;\n}\nwhile ( v10 );\nreturn result;\n} | |
_QWORD *__fastcall sub_425107(__int64 a1, _QWORD *a2)\n{\n_QWORD *result; // rax\n\n*a2 = a1;\na2[1] = 0LL;\na2[2] = *(_QWORD *)(*(_QWORD *)(a1 + 48) + 8LL);\nresult = a2;\na2[3] = **(_QWORD **)(a1 + 48);\nreturn result;\n} | |
__int64 __fastcall sub_40B8A6(__int64 a1, __int64 a2, double a3)\n{\n __int64 result; // rax\n\n *(_DWORD *)(a1 + 1660) = ((unsigned __int8)*(_DWORD *)(a1 + 1660) + 1) & 0x3F;\n *(_QWORD *)(a1 + 24LL * *(unsigned int *)(a1 + 1660) + 96) = *(_QWORD *)(a1 + 1632);\n *(_QWORD *)(a1 + 24LL * *(unsigned int *)(a1 + 1660) + 104) = *(_QWORD *)(a1 + 1640) - a2;\n *(double *)(a1 + 24LL * *(unsigned int *)(a1 + 1660) + 112) = a3;\n result = *(unsigned int *)(a1 + 1656);\n if ( (unsigned int)result <= 0x3F )\n {\n result = a1;\n ++*(_DWORD *)(a1 + 1656);\n }\n return result;\n} | |
__int64 __fastcall sub_402802(void *a1)\n{\nif ( !a1 )\nreturn 0LL;\nsub_4025ED(a1, 0, 0x58u);\nreturn 1LL;\n} | |
__int64 __fastcall sub_40C934(_DWORD *a1, unsigned int *a2)\n{\n return sub_40AFEC(a1, a2);\n} | |
__int64 __fastcall sub_424B2A(__int64 a1, __int64 a2, int a3, __int64 a4)\n{\n__int64 v7; // [rsp+28h] [rbp-8h]\n\nv7 = sub_424A38(a1);\nreturn sub_424A74(v7, a2, a3, a4);\n} | |
__int64 __fastcall sub_436042(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\nchar v7[16]; // [rsp+20h] [rbp-10h] BYREF\n\nsub_44B212(v7, a1);\nreturn sub_436087(v7, a2, a3, a4);\n} | |
__int64 __fastcall sub_44E5C0(__int64 a1)\n{\nreturn *(_QWORD *)(a1 + 8);\n} | |
__int64 __fastcall sub_4AD56C(__int64 a1, __int64 a2, _QWORD *a3, __int64 a4)\n{\n_BOOL4 v4; // eax\nint v5; // edx\nint v6; // eax\n__int64 v7; // rbx\n_QWORD *v9; // rbx\n_QWORD *v10; // rbx\n_QWORD *v11; // rbx\nunsigned int v12; // eax\n_QWORD *v13; // rbx\n_QWORD *v14; // rbx\n_QWORD *v15; // rbx\n_QWORD *v16; // rbx\n_QWORD *v17; // rsi\n__int64 v18; // rdi\nint v19; // edx\n__int64 v20; // rax\n__int64 v21; // rbx\n__int64 v26; // [rsp+20h] [rbp-50h] BYREF\nunsigned int v27; // [rsp+28h] [rbp-48h]\nunsigned int v28; // [rsp+2Ch] [rbp-44h]\n__int64 v29; // [rsp+30h] [rbp-40h]\n__int64 v30; // [rsp+38h] [rbp-38h]\nint v31; // [rsp+40h] [rbp-30h]\n_BOOL4 v32; // [rsp+44h] [rbp-2Ch]\nint v33; // [rsp+48h] [rbp-28h]\nint v34; // [rsp+4Ch] [rbp-24h]\nint l; // [rsp+50h] [rbp-20h]\nint j; // [rsp+54h] [rbp-1Ch]\nunsigned int i; // [rsp+58h] [rbp-18h]\nint k; // [rsp+5Ch] [rbp-14h]\n\nv33 = 0;\nv4 = *(_DWORD *)(a1 + 536) && *(_DWORD *)(*(_QWORD *)a4 + 4LL) != -1;\nv32 = v4;\nif ( v4 )\nv5 = 10;\nelse\nv5 = -1;\n*(_DWORD *)(*(_QWORD *)a4 + 56LL) = v5;\n*(_QWORD *)(*(_QWORD *)a4 + 32LL) = *(int *)(a2 + 40) + *(_QWORD *)(a2 + 24);\n*(_DWORD *)(a2 + 40) += *(_DWORD *)(*(_QWORD *)a4 + 24LL);\nif ( *(_QWORD *)(a2 + 592) )\nv6 = *(_DWORD *)(*(_QWORD *)(a2 + 592) + 8LL);\nelse\nv6 = 0;\nv31 = v6;\n*(_QWORD *)(a4 + 16) = calloc(v6 + 47, 8uLL);\nv7 = *(_QWORD *)a4;\n*(_QWORD *)(v7 + 48) = malloc(0xBCuLL);\nif ( !*(_QWORD *)(a4 + 16) || !*(_QWORD *)(*(_QWORD *)a4 + 48LL) )\nreturn 0xFFFFFFFFLL;\nv9 = *(_QWORD **)(a4 + 16);\n*v9 = sub_4BAF72(5LL, 0LL);\nif ( !*v9 )\nreturn 0xFFFFFFFFLL;\nif ( *(int *)(a1 + 12) >> 8 == 1 )\n{\nif ( *(_DWORD *)a3[118] == 1 )\n{\nv10 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 312LL);\n*v10 = sub_4BAF72(4LL, 39LL);\nif ( !*v10 )\nreturn 0xFFFFFFFFLL;\n*(_DWORD *)(a3[118] + 48LL) = 39;\n}\nelse\n{\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 312LL) = **(_QWORD **)(a4 + 16);\n}\n}\nif ( !v32 )\ngoto LABEL_26;\nv11 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 80LL);\n*v11 = sub_4BAF72(4LL, 10LL);\nif ( !*v11 )\nreturn 0xFFFFFFFFLL;\n*(_DWORD *)(a4 + 192) = 10;\nif ( (int)sub_4A9CEB(\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 80LL),\n(const void *)(*(_QWORD *)(*(_QWORD *)a4 + 8LL) - *(int *)(a2 + 180) + *(_QWORD *)(a2 + 200)),\n*(_QWORD *)(*(_QWORD *)a4 + 16LL)) < 0 )\nreturn 0xFFFFFFFFLL;\nLABEL_26:\nfor ( i = 15; i <= 0x26; ++i )\n{\nif ( a3[i + 79] && (*(_DWORD *)a3[i + 79] == 1 || *(_DWORD *)a3[i + 79] == 5 || *(_DWORD *)a3[i + 79] == 4) )\n{\nv12 = *(_DWORD *)a3[i + 79];\nif ( v12 == 5 )\n{\nv14 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i);\n*v14 = sub_4BAF72(4LL, i);\nif ( !*v14 )\nreturn 0xFFFFFFFFLL;\n*(_DWORD *)(a3[i + 79] + 52LL) = i;\n}\nelse if ( v12 <= 5 )\n{\nif ( v12 == 1 )\n{\nv13 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i);\n*v13 = sub_4BAF72(4LL, i);\nif ( !*v13 )\nreturn 0xFFFFFFFFLL;\n*(_DWORD *)(a3[i + 79] + 48LL) = i;\n}\nelse if ( v12 == 4 )\n{\nv29 = *(_QWORD *)(a3[i + 79] + 72LL);\nif ( *(_DWORD *)v29 == 1 )\n{\nv28 = *(_DWORD *)(v29 + 48);\nv15 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * (int)v28);\n*v15 = sub_4BAF72(4LL, v28);\nif ( !*v15 )\nreturn 0xFFFFFFFFLL;\n*(_DWORD *)(v29 + 48) = v28;\n*(_QWORD *)(v29 + 8) = *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * (int)v28);\n}\nv29 = *(_QWORD *)(a3[i + 79] + 80LL);\nif ( *(_DWORD *)v29 == 1 )\n{\nv27 = *(_DWORD *)(v29 + 48);\nif ( !*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * (int)v27) )\n{\nv16 = (_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * (int)v27);\n*v16 = sub_4BAF72(4LL, v27);\nif ( !*v16 )\nreturn 0xFFFFFFFFLL;\n}\n*(_DWORD *)(v29 + 48) = v27;\n*(_QWORD *)(v29 + 8) = *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * (int)v27);\n}\n}\n}\n}\nelse if ( i != 37 || a3[116] )\n{\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i) = **(_QWORD **)(a4 + 16);\n}\nif ( a3[i + 79] )\n*(_QWORD *)(a3[i + 79] + 8LL) = *(_QWORD *)(8LL * i + *(_QWORD *)(a4 + 16));\n}\nif ( *(_QWORD *)(a2 + 592) )\n{\n*(_DWORD *)(*(_QWORD *)a4 + 40LL) = 47;\nfor ( j = 0; j < *(_DWORD *)(a4 + 196); ++j )\n{\nv17 = (_QWORD *)(*(_QWORD *)(a4 + 200) + 8LL * j);\nv18 = *(_QWORD *)(a4 + 16);\nv19 = *(_DWORD *)(*(_QWORD *)a4 + 40LL);\n*(_DWORD *)(*(_QWORD *)a4 + 40LL) = v19 + 1;\n*(_QWORD *)(v18 + 8LL * v19) = *v17;\n}\n}\nv26 = *(_QWORD *)(*(_QWORD *)a4 + 8LL);\nfor ( k = 0; k < *(_DWORD *)(*(_QWORD *)a4 + 24LL); ++k )\n{\nv30 = *(_QWORD *)(a4 + 48) + 136LL * k;\nif ( (unsigned int)sub_4AC615(a1, a2, a3, (_QWORD *)a4, v30, &v26) == -1 )\nreturn 0xFFFFFFFFLL;\n}\n*(_DWORD *)(**(_QWORD **)(a4 + 16) + 20LL) = (*(_DWORD *)(**(_QWORD **)(a4 + 16) + 56LL) <= 6)\n+ (unsigned int)*(_QWORD *)(**(_QWORD **)(a4 + 16) + 48LL);\n*(_DWORD *)(**(_QWORD **)(a4 + 16) + 16LL) = *(_DWORD *)(**(_QWORD **)(a4 + 16) + 20LL);\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 104LL) = *(_QWORD *)(a4 + 128);\n*(_QWORD *)(a4 + 128) = 0LL;\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 96LL) = *(_QWORD *)(a4 + 120);\n*(_QWORD *)(a4 + 120) = 0LL;\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 88LL) = *(_QWORD *)(a4 + 104);\n*(_QWORD *)(a4 + 104) = 0LL;\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 112LL) = *(_QWORD *)(a4 + 136);\n*(_QWORD *)(a4 + 136) = 0LL;\nfor ( i = 1; i < *(_DWORD *)(*(_QWORD *)a4 + 40LL); ++i )\n{\nif ( *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i)\n&& *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i) != **(_QWORD **)(a4 + 16)\n&& !*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i) + 20LL) )\n{\nv20 = *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i);\n*(_DWORD *)(v20 + 20) = *(_QWORD *)(v20 + 48);\n*(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * i) + 16LL) = *(_DWORD *)(v20 + 20);\n}\n}\nif ( (unsigned int)sub_4ACE5B(a1, a2, a4) == -1 )\nreturn 0xFFFFFFFFLL;\nv21 = *(_QWORD *)a4;\n*(_QWORD *)(v21 + 48) = realloc(*(void **)(*(_QWORD *)a4 + 48LL), 4LL * *(int *)(*(_QWORD *)a4 + 40LL));\nif ( !*(_QWORD *)(*(_QWORD *)a4 + 48LL) )\nreturn 0xFFFFFFFFLL;\nv34 = 1;\nfor ( l = 1; l < *(_DWORD *)(*(_QWORD *)a4 + 40LL); ++l )\n{\nif ( *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l)\n&& *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l) != **(_QWORD **)(a4 + 16) )\n{\nif ( *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l) + 20LL) )\n{\n*(_QWORD *)(8LL * v34 + *(_QWORD *)(a4 + 16)) = *(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l);\n*(_DWORD *)(*(_QWORD *)(*(_QWORD *)a4 + 48LL) + 4LL * v34++ - 4) = *(_DWORD *)(*(_QWORD *)(*(_QWORD *)(a4 + 16)\n+ 8LL * l)\n+ 12LL);\n}\nelse\n{\nsub_4BB8F5(*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l));\n*(_QWORD *)(*(_QWORD *)(a4 + 16) + 8LL * l) = 0LL;\n}\n}\n}\n*(_DWORD *)(*(_QWORD *)a4 + 44LL) = v34 - 1;\n*(_DWORD *)(*(_QWORD *)a4 + 40LL) = v34;\n*(_QWORD *)(a4 + 8) = sub_4AC363(a1, a4);\nif ( !*(_QWORD *)(a4 + 8) )\nreturn 0xFFFFFFFFLL;\nif ( v33 )\nreturn 0xFFFFFFFFLL;\nreturn 0LL;\n} | |
int __fastcall sub_405F0D(__int64 *a1)\n{\n__int64 v2; // [rsp+20h] [rbp-10h]\n__int64 v3; // [rsp+28h] [rbp-8h]\n\nv2 = qword_413508;\nwhile ( 1 )\n{\nsub_404D9E();\nsub_4049C7();\nif ( !a1[2] )\nbreak;\nv3 = a1[2];\nwhile ( v3 && *(_BYTE *)(v3 + 19) < *(_BYTE *)(v2 + 19) )\n{\n*(_BYTE *)(v3 + 19) = *(_BYTE *)(v2 + 19);\nif ( (*(_BYTE *)(v3 + 16) & 0xF) == 4 || (*(_BYTE *)(v3 + 16) & 0xF) == 6 )\n{\n*(_QWORD *)(v3 + 32) = 1LL;\nif ( *(__int64 **)(v3 + 24) == &qword_413520 )\nsub_4053C3((__int64 **)v3);\nsub_404C23(v3);\nv3 = 0LL;\n}\nelse\n{\nv3 = sub_405DD5(v3);\n}\n}\nif ( *(char *)(v2 + 16) < 0 )\nsub_4053C3((__int64 **)v2);\nsub_404B2E(v2, a1);\n*(_BYTE *)(v2 + 16) = *(_BYTE *)(v2 + 16) & 0xF0 | 2;\nsub_4049D2();\nsub_4050D5(0);\n}\na1[2] = v2;\na1[3] = *(_QWORD *)(v2 + 1008);\n*(_QWORD *)(v2 + 1008) = a1;\nsub_4049D2();\nreturn sub_404DCB();\n} | |
__int64 __fastcall sub_40D1A6(_BYTE *a1, unsigned int a2)\n{\n_BYTE *v2; // rax\nunsigned int i; // [rsp+18h] [rbp-4h]\n\nfor ( i = 5381; ; i = 33 * i + (char)*v2 )\n{\nv2 = a1++;\nif ( !*v2 )\nbreak;\n}\nreturn i % a2;\n} | |
__int64 __fastcall sub_4188FF(int a1, int a2, int a3, __int64 (__fastcall *a4)(char *, __int64, __int64), __int64 a5, __int64 a6)\n{\nint v6; // eax\nunsigned int v8; // eax\nchar buf[4096]; // [rsp+30h] [rbp-1020h] BYREF\nint *v14; // [rsp+1030h] [rbp-20h]\nunsigned int v15; // [rsp+1038h] [rbp-18h]\nunsigned int v16; // [rsp+103Ch] [rbp-14h]\nchar *i; // [rsp+1040h] [rbp-10h]\nchar v18; // [rsp+104Fh] [rbp-1h]\n\nv18 = 1;\nwhile ( v18 )\n{\nv18 = 0;\nv16 = recv(a1, buf, 0x1000uLL, 0);\nif ( (v16 & 0x80000000) != 0 )\nreturn (unsigned int)-*__errno_location();\nif ( !v16 )\nbreak;\nfor ( i = buf; (int)v16 > 15 && *(_DWORD *)i > 0xFu && *(_DWORD *)i <= v16; i += (*(_DWORD *)i + 3) & 0xFFFFFFFC )\n{\nif ( a2 != *((_DWORD *)i + 3) )\nreturn (unsigned int)-4011;\nif ( *((_DWORD *)i + 2) != a3 )\nreturn (unsigned int)-4012;\nif ( (*((_WORD *)i + 3) & 2) != 0 )\nv18 = 1;\nv6 = *((unsigned __int16 *)i + 2);\nif ( v6 == 2 )\n{\nv14 = (int *)(i + 16);\nif ( *((_DWORD *)i + 4) )\n{\nv15 = *v14;\nsub_412E6F((__int64)i);\nreturn v15;\n}\n}\nelse\n{\nif ( v6 == 3 )\nreturn 0LL;\nif ( a4 )\n{\nv8 = a4(i, a5, a6);\nv15 = v8;\nif ( v8 )\nreturn v15;\n}\n}\nv16 -= (*(_DWORD *)i + 3) & 0xFFFFFFFC;\n}\n}\nreturn 0;\n} | |
void *__fastcall sub_45749C(unsigned __int64 a1, size_t a2)\n{\n void *v3; // [rsp+18h] [rbp-8h]\n\n if ( (a1 > 0xFFFFFFFF || a2 > 0xFFFFFFFF) && a2 && a1 >= 0xFFFFFFFFFFFFFFFFLL / a2 )\n {\n fwrite(\"[-] alloc too large, aborting\\n\", 1uLL, 0x1EuLL, stderr);\n abort();\n }\n v3 = calloc(a1, a2);\n if ( !v3 && a2 * a1 )\n {\n fwrite(\"[-] out of memory, aborting\\n\", 1uLL, 0x1CuLL, stderr);\n abort();\n }\n return v3;\n} | |
__int64 __fastcall sub_4388DA(__int64 a1, __int64 a2, __int64 a3)\n{\nreturn sub_438672(a1, a2, a3, 0LL, 0LL);\n} | |
_BOOL8 __fastcall sub_418FC4(int a1)\n{\n return a1 == 2 || a1 == 3;\n} | |
__int64 __fastcall sub_4017CE(__int64 a1, __int64 a2, unsigned __int64 a3)\n{\nunsigned __int64 i; // [rsp+28h] [rbp-8h]\n\nfor ( i = 0LL; i < a3; ++i )\n*(_BYTE *)(a2 + i) = rand();\nreturn 0LL;\n} | |
__int64 __fastcall sub_434C14(_QWORD *a1)\n{\n if ( !*a1 )\n return 0LL;\n if ( a1[9] )\n return a1[9];\n return *(unsigned int *)(*a1 + 24LL);\n} | |
__int64 __fastcall sub_4052A4(__int64 a1)\n{\nint v2; // [rsp+Ch] [rbp-Ch]\nint v3; // [rsp+Ch] [rbp-Ch]\nint v4; // [rsp+Ch] [rbp-Ch]\n__int64 v5; // [rsp+10h] [rbp-8h]\n\nif ( !*(_QWORD *)(a1 + 80) || !*(_QWORD *)(a1 + 56) || !*(_QWORD *)(a1 + 168) )\nreturn 4294967274LL;\nv5 = 64LL;\nif ( (*(_DWORD *)(a1 + 192) & 0x400) != 0 )\nv5 = 128LL;\nv2 = sub_404D24(*(_QWORD *)(a1 + 56), *(unsigned int *)(a1 + 92) * v5, 10);\nif ( v2 < 0 )\nreturn (unsigned int)v2;\nv3 = sub_404D24(*(_QWORD *)(a1 + 80), *(_QWORD *)(a1 + 72), 10);\nif ( v3 < 0 )\nreturn (unsigned int)v3;\nif ( *(_QWORD *)(a1 + 168) == *(_QWORD *)(a1 + 80) )\nreturn 0LL;\nv4 = sub_404D24(*(_QWORD *)(a1 + 168), *(_QWORD *)(a1 + 160), 10);\nif ( v4 >= 0 )\nreturn 0LL;\nreturn (unsigned int)v4;\n} | |
__int64 __fastcall sub_40184C(unsigned int a1)\n{\nunsigned int *v1; // rdx\n__int64 result; // rax\n\nv1 = &dword_406580[16 * (__int64)(int)sub_4014EA()];\nresult = a1;\n*v1 = a1;\nreturn result;\n} | |
__int64 __fastcall sub_405396(unsigned int a1)\n{\nif ( !(unsigned int)sub_40519B(a1) )\nreturn 0LL;\nsub_404E7B(a1);\nreturn 1LL;\n} | |
__int64 __fastcall sub_4324D2(__int64 a1, __int64 a2)\n{\nchar v3[16]; // [rsp+10h] [rbp-10h] BYREF\n\nsub_44B17E(v3, a1);\nreturn sub_4325EA(v3, a2);\n} | |
__int64 __fastcall sub_44403B(__int64 a1)\n{\n__int64 result; // rax\n__int64 v2; // rax\n__int64 v3[2]; // [rsp+10h] [rbp-40h] BYREF\n_QWORD *v4; // [rsp+20h] [rbp-30h] BYREF\n__int64 v5; // [rsp+28h] [rbp-28h] BYREF\n__int64 v6; // [rsp+30h] [rbp-20h]\nunsigned __int64 v7; // [rsp+38h] [rbp-18h]\n__int64 v8; // [rsp+40h] [rbp-10h]\nunsigned __int64 i; // [rsp+48h] [rbp-8h]\n\nif ( sub_4411B4(a1) == 1 )\n{\nv6 = sub_4412C5(a1, 0LL);\nresult = sub_448C68(v6);\n}\nelse\n{\n*(_QWORD *)(sub_441529(a1) + 8) = 0LL;\nv7 = sub_4411B4(a1);\nv4 = 0LL;\nsub_44321F(a1, v3);\nwhile ( 1 )\n{\nresult = sub_443245(v3, &v5, &v4);\nif ( !(_DWORD)result )\nbreak;\nv8 = 0LL;\nfor ( i = 0LL; i < v7; ++i )\n{\nv2 = sub_41675D(*(_QWORD *)(v5 + 8 * i));\nv8 += v2;\n}\n*v4 = v8;\nsub_441705(a1, v8);\n}\n}\nreturn result;\n} | |
int sub_406A52()\n{\n double v0; // xmm0_8\n long double v1; // fst7\n int result; // eax\n unsigned __int64 v3; // [rsp+18h] [rbp-48h]\n float v4; // [rsp+4Ch] [rbp-14h]\n unsigned __int64 v5; // [rsp+50h] [rbp-10h]\n\n printf(\"la=%Ld ula=%Lu\\n\", 0x1234567812345LL, 0xE468ACF000000000LL);\n printf(\"lltof: %f %f %Lf\\n\", (float)1736516421, (double)1736516421, (long double)0x1234567812345LL);\n printf(\n \"ftoll: %Ld %Ld %Ld\\n\",\n (unsigned int)(int)(float)1736516421,\n (unsigned int)(int)(double)1736516421,\n (__int64)(long double)0x1234567812345LL);\n v4 = (float)0 + (float)0;\n v0 = (double)0 + (double)0;\n v1 = (long double)0xE468ACF000000000LL;\n printf(\"ulltof: %f %f %Lf\\n\", v4, v0, v1);\n if ( v4 >= 9.223372e18 )\n v5 = (unsigned int)(int)(float)(v4 - 9.223372e18) ^ 0x8000000000000000LL;\n else\n v5 = (unsigned int)(int)v4;\n if ( v0 >= 9.223372036854776e18 )\n v3 = (unsigned int)(int)(v0 - 9.223372036854776e18) ^ 0x8000000000000000LL;\n else\n v3 = (unsigned int)(int)v0;\n if ( v1 >= 9.223372036854775808e18 )\n result = printf(\"ftoull: %Lu %Lu %Lu\\n\", v5, v3, (__int64)(v1 - 9.223372036854775808e18) ^ 0x8000000000000000LL);\n else\n result = printf(\"ftoull: %Lu %Lu %Lu\\n\", v5, v3, (__int64)v1);\n return result;\n} | |
__int64 __fastcall sub_42943F(__int64 a1, unsigned int a2, unsigned __int16 a3, void *a4, size_t a5)\n{\n__int64 result; // rax\n\nif ( a3 == 516 )\nreturn sub_429174(a1, a4, a5);\nif ( a3 > 0x204u )\ngoto LABEL_9;\nif ( a3 == 257 )\nreturn sub_42920A(a1, a2, a4, a5);\nif ( a3 == 513 )\nresult = sub_4293A8(a1, a4, a5);\nelse\nLABEL_9:\nresult = 4294967161LL;\nreturn result;\n} | |
__int64 __fastcall sub_440FB1(__int64 a1, _QWORD *a2, char *a3, char *a4, void (__fastcall *a5)(__int64, unsigned __int64, unsigned __int64), char *a6)\n{\n unsigned int v11; // [rsp+3Ch] [rbp-4h]\n\n v11 = sub_440D38(a1, a3, a5, (__int64)a6);\n if ( !v11 )\n v11 = sub_440683(a1, a4, a3, a2, a5, a6);\n return v11;\n} | |
__int64 __fastcall sub_41EFC6(__int64 a1, int a2, int *a3, int a4, __int64 a5, int *a6, int a7, unsigned int a8)\n{\nreturn sub_41EEC2(a1, a2, 0LL, a3, a4, a5, a6, a7, a8);\n} | |
__int64 __fastcall sub_402A62(_QWORD *a1)\n{\n__int64 result; // rax\nint v2; // [rsp+14h] [rbp-1Ch]\nvoid *dest; // [rsp+18h] [rbp-18h]\n_QWORD *src; // [rsp+20h] [rbp-10h]\n\nresult = *a1 & 1LL;\nif ( !result )\n{\nresult = qword_4080A8;\nif ( *a1 >= (unsigned __int64)qword_4080A8 )\n{\nresult = qword_4080B0;\nif ( *a1 < (unsigned __int64)qword_4080B0 )\n{\nsrc = (_QWORD *)*a1;\nif ( *(_DWORD *)*a1 == -1 )\n{\nresult = (__int64)a1;\n*a1 = src[1];\n}\nelse\n{\ndest = (void *)qword_408098;\nv2 = sub_40296A(*(_DWORD *)src);\nqword_408098 += v2;\nmemcpy(dest, src, v2);\n*(_DWORD *)src = -1;\nsrc[1] = dest;\nresult = (__int64)a1;\n*a1 = dest;\n}\n}\n}\n}\nreturn result;\n} | |
__int64 __fastcall sub_40438E(__int64 a1, __int64 a2, unsigned int a3, int a4)\n{\nunsigned int i; // [rsp+20h] [rbp-8h]\nunsigned int v6; // [rsp+24h] [rbp-4h]\n\nv6 = 0;\nif ( a3 != a4 )\nreturn 0xFFFFFFFFLL;\nfor ( i = 0; i < a3; ++i )\n{\nif ( *(_BYTE *)(i + a1) != *(_BYTE *)(i + a2) )\nreturn (unsigned int)-1;\n}\nreturn v6;\n} | |
_QWORD *__fastcall gt_string_reverse_dup(__int64 a1)\n{\n__int64 v1; // rax\n_QWORD *v3; // [rsp+18h] [rbp-8h]\n\nv1 = gt_string_get_length(a1);\nv3 = gt_string_new(v1 + 1);\ngt_string_reverse_copy(v3, a1);\nreturn v3;\n} | |
int __fastcall sub_40F6DC(__int64 a1)\n{\nreturn close(*(_DWORD *)(a1 + 8));\n} | |
__int64 __fastcall sub_40EBB9(__int64 a1)\n{\n__int64 v2; // [rsp+10h] [rbp-8h]\n\nif ( !*(_QWORD *)(a1 + 8) )\nreturn 0LL;\nv2 = **(_QWORD **)(a1 + 8);\nif ( *(_QWORD *)a1 == *(_QWORD *)(a1 + 8) )\n{\n*(_QWORD *)(a1 + 8) = 0LL;\n*(_QWORD *)a1 = *(_QWORD *)(a1 + 8);\n}\nelse\n{\n*(_QWORD *)(a1 + 8) = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 32LL);\n*(_QWORD *)(*(_QWORD *)(a1 + 8) + 24LL) = 0LL;\n}\n--*(_DWORD *)(a1 + 16);\nreturn v2;\n} | |
__int64 __fastcall sub_401839(unsigned int a1)\n{\nunsigned int *v1; // rdx\n__int64 result; // rax\n\nv1 = &dword_405580[16 * (__int64)(int)sub_4014D7()];\nresult = a1;\n*v1 = a1;\nreturn result;\n} | |
__int64 __fastcall sub_4369A4(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n return sub_43828D(a1, a3, a4);\n} | |
__int64 __fastcall sub_42C559(__int64 a1, unsigned __int8 *a2, int a3)\n{\nint v4; // eax\nunsigned int v7; // [rsp+2Ch] [rbp-4h] BYREF\n\nv7 = -1;\nwhile ( 1 )\n{\nv4 = a3--;\nif ( v4 < 0 )\nbreak;\nv7 = *a2;\nif ( (int)v7 > 127 )\n{\na2 += (int)sub_4342DE(&v7, a2);\n}\nelse\n{\nif ( !v7 )\nreturn 0xFFFFFFFFLL;\n++a2;\n}\n}\nreturn v7;\n} | |
__int64 __fastcall sub_42BF51(unsigned int *a1, int *a2, int *a3, char *a4, const void *a5, unsigned __int64 a6, __int64 a7, __int64 a8)\n{\nreturn sub_42BB02(a1, a2, a3, a4, a5, a6, a7, a8, a7, a8);\n} | |
__int64 __fastcall sub_47084E(__int64 a1, __int64 a2, __int64 a3)\n{\nchar i; // al\n__int64 *v6; // [rsp+28h] [rbp-8h]\n\nv6 = (__int64 *)sub_47050F(a1);\nfor ( i = sub_471023(v6, a2, a3); i != 1; i = sub_471023(v6, a2, a3) )\n{\nif ( (unsigned __int64)(*(_QWORD *)(a1 + 16) - 1LL) <= *(_QWORD *)(a1 + 24) )\nreturn 0LL;\nsub_47117A(v6);\n++*(_QWORD *)(a1 + 24);\nv6 = (__int64 *)sub_47050F(a1);\n}\nsub_4711B6(v6, a2);\nsub_4711B6(v6, a3);\nsub_417377(a2, *v6);\nsub_417377(a3, *v6);\nreturn 1LL;\n} | |
__int64 __fastcall sub_4065CE(__int64 a1, __int64 a2)\n{\n__int64 result; // rax\nint v3; // [rsp+24h] [rbp-3Ch]\nunsigned int *v4; // [rsp+28h] [rbp-38h]\n__int64 v5; // [rsp+30h] [rbp-30h]\nbool v6; // [rsp+3Eh] [rbp-22h]\nbool v7; // [rsp+3Fh] [rbp-21h]\n_BYTE *j; // [rsp+40h] [rbp-20h]\n_DWORD *v9; // [rsp+48h] [rbp-18h]\nunsigned int *v10; // [rsp+50h] [rbp-10h]\nint k; // [rsp+58h] [rbp-8h]\nunsigned int i; // [rsp+5Ch] [rbp-4h]\n\nv7 = (*(_BYTE *)(a1 + 376) & 8) != 0;\nv6 = (*(_BYTE *)(a1 + 376) & 4) != 0;\nv5 = *(_QWORD *)(a1 + 344);\nresult = v5;\nif ( v5 && ((*(_BYTE *)(a1 + 376) & 4) == 0 || (*(_BYTE *)(a1 + 376) & 8) == 0) )\n{\nfor ( i = 1; ; ++i )\n{\nresult = sub_41377B(v5, a2);\nif ( (unsigned int)result < i )\nbreak;\na2 = i;\nv4 = (unsigned int *)sub_41378C(v5, i);\nif ( !v7 && sub_4034C0((__int64)v4) )\n{\nv4[1] = 0x1000000;\nv4[2] = 1;\nv4[3] = 8;\n}\nelse if ( !v7 && sub_4034E1((__int64)v4) )\n{\nv10 = (unsigned int *)sub_403621((__int64)v4);\nv9 = (_DWORD *)sub_40353F((__int64)v4);\na2 = *v4;\nfor ( j = (_BYTE *)sub_4145AA(v5, a2); *j; ++j )\n{\nif ( *j == 46 )\n*j = 95;\n}\nv3 = (unsigned __int16)sub_403353((__int64)v4);\nv4[1] = v3 | 0x4000000;\nfor ( k = 0; k < v3; ++k )\n{\nv9[2] = 8 * v10[1];\nv9[1] = *v10;\na2 = *v10;\n*v9 = *(_DWORD *)sub_41378C(v5, a2);\nv10 += 3;\nv9 += 3;\n}\n}\nelse if ( !v6 && sub_40349F((__int64)v4) )\n{\nv4[1] = (unsigned __int16)sub_403353((__int64)v4) | 0x6000000;\nv4[2] = 4;\n}\nelse if ( !v6 && sub_40347E((__int64)v4) )\n{\nv4[1] = 0x8000000;\n}\n}\n}\nreturn result;\n} | |
__int64 __fastcall sub_42880E(__int64 a1, unsigned __int64 a2)\n{\n__int64 result; // rax\n\nif ( a2 > 7 )\nresult = sub_43E74A(a1);\nif ( a2 > 0xF )\nresult = sub_43E74A(a1 + 8);\nif ( a2 > 0x17 )\nresult = sub_43E74A(a1 + 16);\nreturn result;\n} | |
char *__fastcall sub_4084D7(int a1, char *a2, size_t a3)\n{\n return strerror_r(a1, a2, a3);\n} | |
__int64 __fastcall sub_47042A(__int64 *a1, __int64 *a2, __int64 a3, __int64 a4, __int64 *a5)\n{\nsub_414856(a1, *a5, 0LL, (__int64)(a5 + 4186), a5[1], a5[4203]);\nsub_414856(a2, *a5, 0LL, (__int64)(a5 + 4186), 0LL, a5[4203]);\nsub_4147DF(a1, a3);\nreturn sub_4147DF(a2, a4);\n} | |
void __fastcall sub_4DD0F8(_QWORD *a1)\n{\nif ( a1 )\n{\nif ( a1[9] )\n(*(void (__fastcall **)(_QWORD))(a1[9] + 16LL))(a1[9]);\nif ( a1[10] )\n(*(void (__fastcall **)(_QWORD))(a1[10] + 16LL))(a1[10]);\nfree(a1);\n}\n} | |
__int64 __fastcall sub_441CF7(__int64 a1)\n{\n__int64 result; // rax\nint i; // [rsp+14h] [rbp-4h]\n\nfor ( i = 0; i <= 7; ++i )\n{\nresult = (unsigned __int8)byte_478000[*(_BYTE *)(i + a1) >> 1];\n*(_BYTE *)(i + a1) = result;\n}\nreturn result;\n} | |
__int64 __fastcall sub_40C43B(__int64 a1, __int64 a2, int a3)\n{\n__int64 result; // rax\n\n*(_QWORD *)(a1 + 4656) = a2;\nresult = a1;\n*(_DWORD *)(a1 + 4768) = a3;\nreturn result;\n} | |
void *__fastcall sub_414BAF(size_t a1, size_t a2)\n{\n __int64 v2; // rdx\n __int64 v3; // rcx\n __int64 v4; // r8\n __int64 v5; // r9\n void *v7; // [rsp+18h] [rbp-8h]\n\n v7 = calloc(a1, a2);\n if ( !v7 )\n {\n sub_40B47F(3, \"failed to allocate memory\", v2, v3, v4, v5, a2, a1);\n exit(1);\n }\n return v7;\n} | |
void __fastcall sub_4115EA(char *a1, int a2, __int64 a3)\n{\nint v3; // eax\nint v5; // [rsp+14h] [rbp-1Ch]\nchar *src; // [rsp+18h] [rbp-18h]\nint v7; // [rsp+2Ch] [rbp-4h]\nint v8; // [rsp+2Ch] [rbp-4h]\n\nsrc = a1;\nv5 = a2;\nif ( a2 == 1 )\n{\nsub_4116E1((unsigned int)*a1, a3);\n}\nelse\n{\nwhile ( v5 > 0 )\n{\nif ( *(_QWORD *)(a3 + 16) )\nv7 = *(_DWORD *)(a3 + 16) - *(_DWORD *)a3;\nelse\nv7 = v5;\nif ( v7 > 0 )\n{\nv3 = v7;\nif ( v5 <= v7 )\nv3 = v5;\nv8 = v3;\nmemmove(*(void **)a3, src, v3);\n*(_QWORD *)a3 += v8;\nsrc += v8;\nv5 -= v8;\n}\nelse\n{\nif ( !*(_QWORD *)(a3 + 24) )\n{\n*(_DWORD *)(a3 + 32) += v5;\nreturn;\n}\nsub_40FA30(a3);\n}\n}\n}\n} | |
__int64 __fastcall sub_401BE2(__int64 a1, char a2, unsigned __int64 a3)\n{\nunsigned __int64 i; // [rsp+20h] [rbp-8h]\n\nfor ( i = 0LL; i < a3; ++i )\n{\nif ( a2 != *(_BYTE *)(a1 + i) )\nreturn 0LL;\n}\nreturn 1LL;\n} | |
__int64 __fastcall sub_40D428(unsigned int a1)\n{\nreturn sub_40D449(a1, &unk_414480, 256LL);\n} | |
_QWORD *__fastcall sub_40222A(_QWORD *a1)\n{\n_QWORD *result; // rax\n\nif ( a1 )\n{\nmemset(a1 + 2, 0, 0xB0uLL);\nmemset(a1, 0, 0x10uLL);\nresult = a1;\na1[24] = 0LL;\n}\nreturn result;\n} | |
__int64 __fastcall sub_4408C0(__int64 a1, __int64 a2, unsigned int a3)\n{\n return sub_4292A2(a1, a2, a3);\n} | |
__int64 __fastcall sub_4291BB(unsigned int a1, unsigned int a2)\n{\n if ( a1 == a2 )\n return a1;\n if ( !a1 )\n return a2;\n if ( !a2 )\n return a1;\n if ( a1 == 1 || a2 == 1 )\n return 1LL;\n if ( a1 == 2 || a2 == 2 )\n return 2LL;\n if ( a1 == 4 || a2 == 4 )\n return 1LL;\n return 3LL;\n} | |
__int64 __fastcall sub_41CA94(__int64 a1, __int64 a2)\n{\ndouble v3; // xmm0_8\n\nif ( !*(_DWORD *)a1 )\nreturn 0xFFFFFFFFLL;\n*(_QWORD *)a2 = *(_QWORD *)(a1 + 8);\n*(_QWORD *)(a2 + 8) = *(_QWORD *)(a1 + 16);\nif ( *(double *)(a1 + 16) <= -*(double *)(a1 + 8) )\nv3 = -*(double *)(a1 + 8);\nelse\nv3 = *(double *)(a1 + 16);\n*(double *)(a2 + 16) = v3;\n*(_QWORD *)(a2 + 24) = *(_QWORD *)(a1 + 24);\n*(double *)(a2 + 32) = sqrt(*(double *)(a1 + 32) / (double)*(int *)a1);\n*(double *)(a2 + 40) = sqrt(*(double *)(a1 + 40) / (double)*(int *)a1);\nreturn 0LL;\n} | |
__int64 __fastcall sub_420208(__int64 a1, void *a2)\n{\nunsigned int v3; // [rsp+2Ch] [rbp-4h]\n\nv3 = 0;\nif ( *(_DWORD *)(a1 + 80) )\n{\nv3 = 16;\nmemcpy(a2, (const void *)(a1 + 96), 0x10uLL);\n}\nreturn v3;\n} | |
__int64 __fastcall sub_407EC7(_DWORD *a1, const void *a2, size_t a3)\n{\n__int64 v3; // rax\nvoid (__fastcall __noreturn *v4)(); // rbx\nvoid (__fastcall __noreturn *v5)(); // rbx\nvoid (__fastcall __noreturn *v6)(); // rbx\nvoid (__fastcall __noreturn *v7)(); // rbx\nvoid (__fastcall __noreturn *v8)(); // rbx\n\nsub_406E82((__int64)a1, 1);\nv3 = qword_868B78;\nv4 = off_818428[0];\n*(void (__fastcall __noreturn **)())qword_868B78 = off_818420[0];\n*(_QWORD *)(v3 + 8) = v4;\nv5 = off_818438[0];\n*(void (__fastcall __noreturn **)())(v3 + 16) = off_818430[0];\n*(_QWORD *)(v3 + 24) = v5;\nv6 = off_818448[0];\n*(void (__fastcall __noreturn **)())(v3 + 32) = off_818440[0];\n*(_QWORD *)(v3 + 40) = v6;\nv7 = off_818458[0];\n*(void (__fastcall __noreturn **)())(v3 + 48) = off_818450[0];\n*(_QWORD *)(v3 + 56) = v7;\nv8 = off_818468;\n*(void (__fastcall __noreturn **)())(v3 + 64) = off_818460[0];\n*(_QWORD *)(v3 + 72) = v8;\n*(_QWORD *)(v3 + 80) = qword_818470;\nreturn sub_4073B6(a1, a2, a3);\n} | |
__int64 __fastcall sub_4800D1(__int64 a1, unsigned __int64 a2, __int64 a3, __int64 a4)\n{\nunsigned int v7; // [rsp+2Ch] [rbp-4h]\nunsigned int v8; // [rsp+2Ch] [rbp-4h]\nunsigned int v9; // [rsp+2Ch] [rbp-4h]\nunsigned int v10; // [rsp+2Ch] [rbp-4h]\nunsigned int v11; // [rsp+2Ch] [rbp-4h]\n\nif ( *(_DWORD *)(a1 + 232) != 1 && *(_DWORD *)(a1 + 232) != 2 )\nreturn 4294967212LL;\nif ( *(_DWORD *)(a1 + 232) == 1 )\n{\n*(_DWORD *)(a1 + 232) = 2;\nv7 = sub_47FDA3(a1);\nif ( v7 )\nreturn v7;\n}\n*(_QWORD *)(a1 + 224) += a2;\nif ( *(_DWORD *)(a1 + 236) )\n{\nv10 = sub_481398(a1 + 136, a3, a2);\nif ( v10 )\nreturn v10;\nv11 = sub_47F7D0(a1, a2, a3, a4);\nif ( v11 )\nreturn v11;\n}\nelse\n{\nv8 = sub_47F7D0(a1, a2, a3, a4);\nif ( v8 )\nreturn v8;\nv9 = sub_481398(a1 + 136, a4, a2);\nif ( v9 )\nreturn v9;\n}\nreturn 0LL;\n} | |
__int64 __fastcall sub_408E19(__int64 a1, __int64 a2, __int64 a3, __int64 a4)\n{\n__int64 v7; // [rsp+28h] [rbp-8h]\n\nv7 = sub_40A9D9();\nsub_40AD12(a1, a2, a3, a4, v7);\nreturn sub_40AA9A(v7);\n} | |
unsigned __int64 __fastcall sub_40A903(unsigned __int64 *a1)\n{\n unsigned __int64 result; // rax\n\n result = *a1;\n if ( *a1 )\n {\n sub_4046DE(*a1);\n result = (unsigned __int64)a1;\n *a1 = 0LL;\n }\n return result;\n} | |
void __fastcall sub_40C40B(unsigned __int64 *a1, __int64 a2)\n{\n unsigned __int64 v2; // [rsp+18h] [rbp-18h]\n unsigned __int64 *i; // [rsp+20h] [rbp-10h]\n unsigned __int64 *v4; // [rsp+28h] [rbp-8h]\n\n if ( a2 )\n {\n v4 = a1;\n for ( i = &a1[a2 - 1]; v4 <= i; --i )\n {\n v2 = sub_40C3FA(*v4);\n *v4 = sub_40C3FA(*i);\n *i = v2;\n ++v4;\n }\n }\n} | |
__int64 __fastcall pqsignal(int a1, void (*a2)(int))\n{\n__int64 result; // rax\nstruct sigaction v3; // [rsp+10h] [rbp-140h] BYREF\nstruct sigaction v4; // [rsp+B0h] [rbp-A0h] BYREF\n\nv4.sa_handler = a2;\nsigemptyset(&v4.sa_mask);\nv4.sa_flags = 0x10000000;\nif ( a1 == 17 )\nv4.sa_flags |= 1u;\nif ( sigaction(a1, &v4, &v3) >= 0 )\nresult = (__int64)v3.sa_handler;\nelse\nresult = -1LL;\nreturn result;\n} | |
void *__fastcall sub_408D47(__int64 a1)\n{\n void *dest; // [rsp+18h] [rbp-8h]\n\n dest = sub_407492(&qword_461980, 0LL, 4 * *(_DWORD *)(a1 + 8));\n memcpy(dest, *(const void **)a1, 4LL * *(int *)(a1 + 8));\n return dest;\n} | |
bool __fastcall sub_402C03(__int64 a1)\n{\nreturn a1 == sub_402991(256LL);\n} | |
unsigned __int64 __fastcall sub_4014AA(unsigned __int64 a1)\n{\nunsigned __int64 result; // rax\nunsigned __int64 i; // [rsp+18h] [rbp-8h]\n\nfor ( i = 1LL; a1 / i > 9 && 10 * i > i; i *= 10LL )\n;\ndo\n{\nputchar((char)(a1 / i % 0xA + 48));\nresult = i / 0xA;\ni /= 0xAuLL;\n}\nwhile ( i );\nreturn result;\n} | |
__int64 __fastcall sub_462C0E(unsigned __int8 *a1)\n{\nreturn (a1[2] << 8) + (a1[1] << 16) + (*a1 << 24) + (unsigned int)a1[3];\n} | |
__int64 __fastcall sub_401946(unsigned int a1)\n{\n__int64 result; // rax\n\nresult = a1;\ndword_41F1EC = a1;\nreturn result;\n} | |
__int64 __fastcall sub_4296A0(__int64 a1, __int64 a2, __int64 a3)\n{\nint v4; // [rsp+28h] [rbp-8h]\nunsigned int v5; // [rsp+2Ch] [rbp-4h]\n\nif ( (*(_BYTE *)(a1 + 4) & 4) != 0 || (*(_BYTE *)(a1 + 4) & 2) == 0 )\nreturn 4294967159LL;\nif ( (*(_BYTE *)(a1 + 4) & 8) != 0 )\n{\nif ( a3 == *(unsigned __int8 *)(a1 + 5) )\n{\nv4 = sub_43E5CD(a1 + 8, a2, a3);\nv5 = sub_423AD3(v4);\n}\nelse\n{\nv5 = -135;\n}\n}\nelse\n{\nv5 = sub_42D26A(a1 + 8, a2, a3);\n}\nif ( v5 )\nsub_429CAB(a1);\nelse\n*(_BYTE *)(a1 + 4) |= 4u;\nreturn v5;\n} | |
__int64 __fastcall sub_4012DD(__int64 a1, int a2, __int64 a3)\n{\n__int64 result; // rax\n\ndword_40F1E4 = 2;\nqword_40F1E8 = a1;\ndword_40F1F8 = a2;\nresult = a3;\nqword_40F1F0 = a3;\nreturn result;\n} | |
__int64 __fastcall sub_42233A(__int64 a1)\n{\nint v1; // eax\nunsigned __int16 *v3; // [rsp+38h] [rbp-8h]\n\nv3 = *(unsigned __int16 **)(a1 + 16);\nv1 = *v3;\nif ( v1 == 7 )\n{\nif ( v3[1] <= 1u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\n}\nelse if ( *v3 <= 7u )\n{\nswitch ( v1 )\n{\ncase 6:\nif ( v3[1] <= 1u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nreturn 0LL;\ncase 4:\nif ( v3[1] <= 5u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nbreak;\ncase 5:\nif ( v3[1] <= 7u )\nreturn 4294967222LL;\nif ( !sub_4222F5(*((_BYTE *)v3 + 4)) )\nreturn 4294967222LL;\nbreak;\ndefault:\nreturn 0LL;\n}\n*(_DWORD *)(v3 + 3) = ntohl(*(_DWORD *)(v3 + 3));\n}\nreturn 0LL;\n} | |