Files
3d-pinball-space-cadet/pinball_27.c
T

2198 lines
69 KiB
C

#include "pinball.h"
// Address range: 0x1e42ee0 - 0x1e43113
int32_t function_1e42ee0(int32_t a1) {
int32_t v1 = g8; // 0x1e42ee0
g8 = a1;
int32_t result; // 0x1e43112
if (a1 == 0) {
// 0x1e42ee0
result = g2;
} else {
int32_t v2 = *(int32_t *)(a1 + 4); // 0x1e42eed
g2 = v2;
g2 = function_1e22600(v2);
int32_t v3 = *(int32_t *)(a1 + 8); // 0x1e42ef9
g2 = v3;
g2 = function_1e22600(v3);
int32_t v4 = *(int32_t *)(a1 + 12); // 0x1e42f05
g2 = v4;
g2 = function_1e22600(v4);
int32_t v5 = *(int32_t *)(a1 + 16); // 0x1e42f11
g2 = v5;
g2 = function_1e22600(v5);
int32_t v6 = *(int32_t *)(a1 + 20); // 0x1e42f1d
g2 = v6;
g2 = function_1e22600(v6);
int32_t v7 = *(int32_t *)(a1 + 24); // 0x1e42f29
g2 = v7;
g2 = function_1e22600(v7);
int32_t v8 = *(int32_t *)a1; // 0x1e42f35
g2 = v8;
g2 = function_1e22600(v8);
int32_t v9 = *(int32_t *)(a1 + 32); // 0x1e42f40
g2 = v9;
g2 = function_1e22600(v9);
int32_t v10 = *(int32_t *)(a1 + 36); // 0x1e42f4c
g2 = v10;
g2 = function_1e22600(v10);
int32_t v11 = *(int32_t *)(a1 + 40); // 0x1e42f58
g2 = v11;
g2 = function_1e22600(v11);
int32_t v12 = *(int32_t *)(a1 + 44); // 0x1e42f64
g2 = v12;
g2 = function_1e22600(v12);
int32_t v13 = *(int32_t *)(a1 + 48); // 0x1e42f70
g2 = v13;
g2 = function_1e22600(v13);
int32_t v14 = *(int32_t *)(a1 + 52); // 0x1e42f7c
g2 = v14;
g2 = function_1e22600(v14);
int32_t v15 = *(int32_t *)(a1 + 28); // 0x1e42f88
g2 = v15;
g2 = function_1e22600(v15);
int32_t v16 = *(int32_t *)(a1 + 56); // 0x1e42f94
g2 = v16;
g2 = function_1e22600(v16);
int32_t v17 = *(int32_t *)(a1 + 60); // 0x1e42fa0
g2 = v17;
g2 = function_1e22600(v17);
int32_t v18 = *(int32_t *)(a1 + 64); // 0x1e42fac
g2 = v18;
g2 = function_1e22600(v18);
int32_t v19 = *(int32_t *)(a1 + 68); // 0x1e42fb8
g2 = v19;
g2 = function_1e22600(v19);
int32_t v20 = *(int32_t *)(a1 + 72); // 0x1e42fc4
g2 = v20;
g2 = function_1e22600(v20);
int32_t v21 = *(int32_t *)(a1 + 76); // 0x1e42fd0
g2 = v21;
g2 = function_1e22600(v21);
int32_t v22 = *(int32_t *)(a1 + 80); // 0x1e42fdc
g2 = v22;
g2 = function_1e22600(v22);
int32_t v23 = *(int32_t *)(a1 + 84); // 0x1e42fe8
g2 = v23;
g2 = function_1e22600(v23);
int32_t v24 = *(int32_t *)(a1 + 88); // 0x1e42ff4
g2 = v24;
g2 = function_1e22600(v24);
int32_t v25 = *(int32_t *)(a1 + 92); // 0x1e43000
g2 = v25;
g2 = function_1e22600(v25);
int32_t v26 = *(int32_t *)(a1 + 96); // 0x1e4300c
g2 = v26;
g2 = function_1e22600(v26);
int32_t v27 = *(int32_t *)(a1 + 100); // 0x1e43018
g2 = v27;
g2 = function_1e22600(v27);
int32_t v28 = *(int32_t *)(a1 + 104); // 0x1e43024
g2 = v28;
g2 = function_1e22600(v28);
int32_t v29 = *(int32_t *)(a1 + 108); // 0x1e43030
g2 = v29;
g2 = function_1e22600(v29);
int32_t v30 = *(int32_t *)(a1 + 112); // 0x1e4303c
g2 = v30;
g2 = function_1e22600(v30);
int32_t v31 = *(int32_t *)(a1 + 116); // 0x1e43048
g2 = v31;
g2 = function_1e22600(v31);
int32_t v32 = *(int32_t *)(a1 + 120); // 0x1e43054
g2 = v32;
g2 = function_1e22600(v32);
int32_t v33 = *(int32_t *)(a1 + 124); // 0x1e43060
g2 = v33;
g2 = function_1e22600(v33);
int32_t v34 = *(int32_t *)(a1 + 128); // 0x1e4306c
g2 = v34;
g2 = function_1e22600(v34);
int32_t v35 = *(int32_t *)(a1 + 132); // 0x1e4307b
g2 = v35;
g2 = function_1e22600(v35);
int32_t v36 = *(int32_t *)(a1 + 136); // 0x1e4308a
g2 = v36;
g2 = function_1e22600(v36);
int32_t v37 = *(int32_t *)(a1 + 140); // 0x1e43099
g2 = v37;
g2 = function_1e22600(v37);
int32_t v38 = *(int32_t *)(a1 + 144); // 0x1e430a8
g2 = v38;
g2 = function_1e22600(v38);
int32_t v39 = *(int32_t *)(a1 + 148); // 0x1e430b7
g2 = v39;
g2 = function_1e22600(v39);
int32_t v40 = *(int32_t *)(a1 + 152); // 0x1e430c6
g2 = v40;
g2 = function_1e22600(v40);
int32_t v41 = *(int32_t *)(a1 + 156); // 0x1e430d5
g2 = v41;
g2 = function_1e22600(v41);
int32_t v42 = *(int32_t *)(a1 + 160); // 0x1e430e4
g2 = v42;
g2 = function_1e22600(v42);
int32_t v43 = *(int32_t *)(a1 + 164); // 0x1e430f3
g2 = v43;
g2 = function_1e22600(v43);
int32_t v44 = *(int32_t *)(a1 + 168); // 0x1e43102
g2 = v44;
int32_t v45 = function_1e22600(v44); // 0x1e43109
g2 = v45;
result = v45;
}
// 0x1e43111
g8 = v1;
return result;
}
// Address range: 0x1e43120 - 0x1e43213
int32_t function_1e43120(int32_t a1, int32_t a2) {
// 0x1e43120
char * v1; // bp-12
int32_t v2 = (int32_t)&v1; // 0x1e43120
int32_t v3; // bp-4
int32_t v4 = &v3; // 0x1e43123
g2 = v4;
v3 = 0;
int32_t v5 = 0; // bp-8
g6 = a1;
g8 = function_1e45150(0, a1, 35, v4);
int32_t v6 = &v5; // 0x1e4314d
g2 = v6;
g8 |= function_1e45150(0, g6, 37, v6);
g2 = v2;
int32_t v7 = function_1e45150(1, g6, 30, v2); // 0x1e4316b
g2 = v7;
int32_t result = g8 | v7; // 0x1e43173
g8 = result;
if (result != 0) {
// 0x1e43177
g2 = result;
return result;
}
// 0x1e4317f
g6 = a2;
int32_t v8 = function_1e22670(13); // 0x1e43185
g2 = v8;
int32_t v9 = v8; // edx
*(int32_t *)(g6 + 168) = v8;
char * v10 = (char *)v9; // 0x1e431ac
int32_t v11; // 0x1e431c73
if (v3 == 0) {
// 0x1e431ac
*v10 = 104;
int32_t v12 = v9 + 1; // 0x1e431af
v9 = v12;
if (v5 == 0) {
v11 = v12;
goto lab_0x1e431bb;
} else {
// 0x1e431b7
*(char *)v12 = 104;
goto lab_0x1e431ba;
}
} else {
// 0x1e4319c
*v10 = 72;
int32_t v13 = v9 + 1; // 0x1e4319f
v9 = v13;
if (v5 == 0) {
v11 = v13;
goto lab_0x1e431bb;
} else {
// 0x1e431a7
*(char *)v13 = 72;
goto lab_0x1e431ba;
}
}
lab_0x1e431bb:;
char * v14 = v1; // 0x1e431bb
int32_t v15 = (int32_t)v14; // 0x1e431bb
g2 = v15;
int32_t v16; // 0x1e431cf
if (*v14 != 0) {
unsigned char v17 = *(char *)v15; // 0x1e431c4
g5 = g5 & -256 | (int32_t)v17;
g2 = v15 + 1;
*(char *)v11 = v17;
int32_t v18 = v9 + 1; // 0x1e431c9
v9 = v18;
int32_t v19 = g2; // 0x1e431ca
v16 = v18;
while (*(char *)v19 != 0) {
// 0x1e431c4
v15 = v19;
v17 = *(char *)v15;
g5 = g5 & -256 | (int32_t)v17;
g2 = v15 + 1;
*(char *)v18 = v17;
v18 = v9 + 1;
v9 = v18;
v19 = g2;
v16 = v18;
}
} else {
v16 = v11;
}
// 0x1e431cf
*(char *)v16 = 109;
int32_t v20 = v9 + 1; // 0x1e431d2
v9 = v20;
int32_t v21; // 0x1e431dd
if (v5 != 0) {
// 0x1e431da
*(char *)v20 = 109;
v21 = v9 + 1;
v9 = v21;
} else {
v21 = v20;
}
char * v22 = v1; // 0x1e431de
int32_t v23 = (int32_t)v22; // 0x1e431de
g2 = v23;
int32_t v24; // 0x1e431f2
if (*v22 != 0) {
unsigned char v25 = *(char *)v23; // 0x1e431e7
g5 = g5 & -256 | (int32_t)v25;
g2 = v23 + 1;
*(char *)v21 = v25;
int32_t v26 = v9 + 1; // 0x1e431ec
v9 = v26;
int32_t v27 = g2; // 0x1e431ed
v24 = v26;
while (*(char *)v27 != 0) {
// 0x1e431e7
v23 = v27;
v25 = *(char *)v23;
g5 = g5 & -256 | (int32_t)v25;
g2 = v23 + 1;
*(char *)v26 = v25;
v26 = v9 + 1;
v9 = v26;
v27 = g2;
v24 = v26;
}
} else {
v24 = v21;
}
// 0x1e431f2
*(char *)v24 = 115;
*(char *)(v9 + 1) = 115;
*(char *)(v9 + 2) = 0;
int32_t v28 = (int32_t)v1; // 0x1e431fe
g2 = v28;
function_1e22600(v28);
g2 = g8;
return g8;
lab_0x1e431ba:;
int32_t v29 = v9 + 1; // 0x1e431ba
v9 = v29;
v11 = v29;
goto lab_0x1e431bb;
}
// Address range: 0x1e43220 - 0x1e43436
int32_t function_1e43220(void) {
// 0x1e43220
g8 = 0;
int32_t v1 = g467; // 0x1e4322d
g6 = v1;
if (g128 != 0) {
int32_t v2 = function_1e45150(1, v1, 14, (int32_t)&g459); // 0x1e43244
g2 = v2;
g4 = v2;
int32_t v3 = function_1e45150(1, g6, 15, (int32_t)&g460); // 0x1e43258
g2 = v3;
g4 |= v3;
int32_t v4 = function_1e45150(1, g6, 16, (int32_t)&g461); // 0x1e4326c
int32_t v5 = g4 | v4; // 0x1e43274
g4 = v5;
int32_t v6 = g461; // 0x1e43276
g2 = v6;
g2 = function_1e43440(v6);
if (v5 != 0) {
int32_t v7 = g459; // 0x1e43288
g2 = v7;
function_1e22600(v7);
int32_t v8 = g460; // 0x1e43296
g2 = v8;
function_1e22600(v8);
int32_t v9 = g461; // 0x1e432a4
g2 = v9;
function_1e22600(v9);
g2 = -1;
g459 = g8;
g460 = g8;
g461 = g8;
return -1;
}
int32_t v10 = *(int32_t *)0x1e537c8; // 0x1e432cd
g2 = v10;
int32_t v11 = *(int32_t *)v10; // 0x1e432d2
g2 = v11;
if (v11 != 0x1e53790) {
// 0x1e432db
function_1e22600(v11);
int32_t v12 = (int32_t)g479; // 0x1e432e4
g2 = v12;
int32_t v13 = *(int32_t *)(v12 + 4); // 0x1e432e9
g5 = v13;
g2 = function_1e22600(v13);
int32_t v14 = (int32_t)g479; // 0x1e432f5
g5 = v14;
g2 = function_1e22600(*(int32_t *)(v14 + 8));
}
// 0x1e43307
*(int32_t *)g479 = g459;
*(int32_t *)((int32_t)g479 + 4) = g460;
*(int32_t *)((int32_t)g479 + 8) = g461;
int32_t v15 = (int32_t)g479; // 0x1e43331
g5 = v15;
g444 = 1;
g443 = v15;
g2 = 0;
return 0;
}
int32_t v16 = g459; // 0x1e43350
g2 = v16;
function_1e22600(v16);
int32_t v17 = g460; // 0x1e4335e
g2 = v17;
function_1e22600(v17);
int32_t v18 = g461; // 0x1e4336c
g2 = v18;
g8 = 0;
g2 = function_1e22600(v18);
int32_t v19 = g8; // 0x1e4337c
g459 = v19;
g460 = v19;
g461 = v19;
*(int32_t *)g479 = function_1e22670(2);
int32_t v20 = (int32_t)g479; // 0x1e433a0
g5 = v20;
g2 = v20;
if (v20 == g8) {
// 0x1e433ac
g2 = -1;
return -1;
}
// 0x1e433b5
g5 = v20 & -0x10000 | 46;
*g479 = 46;
int32_t v21 = function_1e22670(2); // 0x1e433c1
g2 = v21;
*(int32_t *)((int32_t)g479 + 4) = v21;
int32_t v22 = (int32_t)g479; // 0x1e433d2
g5 = v22;
int32_t v23 = *(int32_t *)(v22 + 4); // 0x1e433d8
g2 = v23;
if (v23 == 0) {
// 0x1e433df
g2 = -1;
return -1;
}
// 0x1e433e8
*(char *)v23 = 0;
int32_t v24 = function_1e22670(2); // 0x1e433ed
g2 = v24;
*(int32_t *)((int32_t)g479 + 8) = v24;
int32_t v25 = (int32_t)g479; // 0x1e433fe
g5 = v25;
int32_t v26 = *(int32_t *)(v25 + 8); // 0x1e43404
g2 = v26;
if (v26 == 0) {
// 0x1e4340b
g2 = -1;
return -1;
}
// 0x1e43414
*(char *)v26 = 0;
int32_t v27 = (int32_t)g479; // 0x1e43417
g5 = v27;
g2 = 0;
g444 = 1;
g443 = v27;
return 0;
}
// Address range: 0x1e43440 - 0x1e43483
int32_t function_1e43440(int32_t a1) {
int32_t v1 = a1; // edx
if (*(char *)a1 == 0) {
// 0x1e43481
return g2;
}
lab_0x1e4344a_3:;
char v2; // 0x1e4344a
int32_t result; // 0x1e4344a
while (true) {
lab_0x1e4344a:;
char * v3 = (char *)a1; // 0x1e4344a
v2 = *v3;
int32_t v4 = g2 & -256; // 0x1e4344a
result = v4 | (int32_t)v2;
g2 = result;
unsigned char v5 = v2 - 48; // 0x1e4344c
if (v2 < 48) {
goto lab_0x1e43460;
} else {
if (v2 > 57) {
goto lab_0x1e43460;
} else {
// 0x1e43454
g2 = v4 | (int32_t)v5;
*v3 = v5;
int32_t v6 = v1 + 1; // 0x1e43458
v1 = v6;
if (*(char *)v6 == 0) {
// 0x1e4345e
return g2;
}
a1 = v6;
goto lab_0x1e4344a;
}
}
}
// 0x1e43481
return result;
lab_0x1e43460:
if (v2 != 59) {
int32_t v7 = a1 + 1; // 0x1e4347b
v1 = v7;
if (*(char *)v7 == 0) {
return result;
}
a1 = v7;
// continue -> 0x1e4344a
goto lab_0x1e4344a_3;
}
// 0x1e43464
g2 = a1;
int32_t v8 = a1; // 0x1e4346b
int32_t v9 = v8 + 1; // 0x1e43466
g5 = v9;
unsigned char v10 = *(char *)v9; // 0x1e43469
g4 = g4 & -256 | (int32_t)v10;
*(char *)v8 = v10;
int32_t result2 = g5; // 0x1e4346d
g2 = result2;
while (*(char *)result2 != 0) {
// 0x1e43466
v8 = result2;
v9 = v8 + 1;
g5 = v9;
v10 = *(char *)v9;
g4 = g4 & -256 | (int32_t)v10;
*(char *)v8 = v10;
result2 = g5;
g2 = result2;
}
int32_t v11 = v1; // 0x1e43474
if (*(char *)v11 == 0) {
// 0x1e43479
return result2;
}
a1 = v11;
// continue -> 0x1e4344a
goto lab_0x1e4344a_3;
}
// Address range: 0x1e43490 - 0x1e4357f
int32_t function_1e43490(void) {
// 0x1e43490
if (g127 == 0) {
int32_t v1 = (int32_t)g479; // 0x1e4352a
g2 = v1;
g5 = v1;
g478 = g479;
*(int32_t *)0x1e5379c = *(int32_t *)(v1 + 4);
int32_t v2 = *(int32_t *)(g2 + 8); // 0x1e43546
g5 = v2;
g479 = (int16_t *)&g478;
*(int32_t *)0x1e537a0 = v2;
g2 = function_1e43720(g462);
g5 = g462;
function_1e22600(g462);
g2 = 0;
g462 = 0;
return 0;
}
int32_t v3 = function_1e22760(1, 48); // 0x1e434a2
g2 = v3;
g8 = v3;
if (v3 == 0) {
// 0x1e434b0
g2 = 1;
return 1;
}
int32_t v4 = function_1e43580(v3); // 0x1e434b8
g2 = v4;
if (v4 != 0) {
// 0x1e434c4
g2 = function_1e43720(v3);
function_1e22600(v3);
g2 = 1;
return 1;
}
int32_t v5 = (int32_t)g479; // 0x1e434dd
g5 = v5;
*(int32_t *)v3 = v5;
int32_t v6 = (int32_t)g479; // 0x1e434e6
g2 = v6;
*(int32_t *)(v3 + 4) = *(int32_t *)(v6 + 4);
int32_t v7 = (int32_t)g479; // 0x1e434f1
g2 = v7;
int32_t v8 = *(int32_t *)(v7 + 8); // 0x1e434f6
g5 = v8;
*(int32_t *)(v3 + 8) = v8;
g479 = (int16_t *)v3;
g2 = function_1e43720(g462);
g5 = g462;
function_1e22600(g462);
g2 = 0;
g462 = v3;
return 0;
}
// Address range: 0x1e43580 - 0x1e436cf
int32_t function_1e43580(int32_t a1) {
int32_t v1 = g8; // 0x1e43581
g8 = a1;
int32_t v2 = g6; // 0x1e43586
int32_t v3 = g466; // 0x1e4358a
g6 = v3;
if (a1 == 0) {
// 0x1e43595
g2 = -1;
g6 = v2;
g8 = v1;
return -1;
}
int32_t v4 = a1 + 12; // 0x1e4359f
g2 = v4;
g4 = function_1e45150(1, v3, 21, v4);
int32_t v5 = a1 + 16; // 0x1e435b2
g2 = v5;
g4 |= function_1e45150(1, g6, 20, v5);
int32_t v6 = a1 + 20; // 0x1e435c5
g2 = v6;
g4 |= function_1e45150(1, g6, 22, v6);
int32_t v7 = a1 + 24; // 0x1e435d8
g2 = v7;
g3 = a1 + 28;
int32_t v8 = function_1e45150(1, g6, 23, v7); // 0x1e435e4
g2 = v8;
g4 |= v8;
int32_t v9 = function_1e45150(1, g6, 24, g3); // 0x1e435f4
g2 = v9;
g4 |= v9;
int32_t v10 = *(int32_t *)g3; // 0x1e435fe
g2 = v10;
function_1e436d0(v10);
int32_t v11 = a1 + 32; // 0x1e4360a
g2 = v11;
g4 |= function_1e45150(1, g6, 80, v11);
int32_t v12 = a1 + 36; // 0x1e4361d
g2 = v12;
g4 |= function_1e45150(1, g6, 81, v12);
int32_t v13 = a1 + 40; // 0x1e43630
g2 = v13;
g4 |= function_1e45150(0, g6, 26, v13);
int32_t v14 = a1 + 41; // 0x1e43643
g2 = v14;
g4 |= function_1e45150(0, g6, 25, v14);
int32_t v15 = a1 + 42; // 0x1e43656
g2 = v15;
g4 |= function_1e45150(0, g6, 84, v15);
int32_t v16 = a1 + 43; // 0x1e43669
g2 = v16;
g4 |= function_1e45150(0, g6, 85, v16);
int32_t v17 = a1 + 44; // 0x1e4367c
g2 = v17;
g4 |= function_1e45150(0, g6, 86, v17);
int32_t v18 = a1 + 45; // 0x1e4368f
g2 = v18;
g4 |= function_1e45150(0, g6, 87, v18);
int32_t v19 = a1 + 46; // 0x1e436a2
g2 = v19;
g8 = a1 + 47;
int32_t v20 = function_1e45150(0, g6, 82, v19); // 0x1e436ae
g2 = v20;
g4 |= v20;
int32_t result = g4 | function_1e45150(0, g6, 83, g8); // 0x1e436c6
g2 = result;
g6 = v2;
g8 = v1;
return result;
}
// Address range: 0x1e436d0 - 0x1e43713
int32_t function_1e436d0(int32_t a1) {
// 0x1e436d0
g7 = a1;
int32_t v1 = g4; // 0x1e436d4
if (*(char *)a1 == 0) {
// 0x1e43711
g4 = v1;
return g2;
}
lab_0x1e436da_3:;
char v2; // 0x1e436da
int32_t result; // 0x1e436da
while (true) {
lab_0x1e436da:;
char * v3 = (char *)a1; // 0x1e436da
v2 = *v3;
int32_t v4 = g2 & -256; // 0x1e436da
result = v4 | (int32_t)v2;
g2 = result;
unsigned char v5 = v2 - 48; // 0x1e436dc
if (v2 < 48) {
goto lab_0x1e436f0;
} else {
if (v2 > 57) {
goto lab_0x1e436f0;
} else {
// 0x1e436e4
g2 = v4 | (int32_t)v5;
*v3 = v5;
int32_t v6 = g7 + 1; // 0x1e436e8
g7 = v6;
if (*(char *)v6 == 0) {
// 0x1e436ee
g4 = v1;
return g2;
}
a1 = v6;
goto lab_0x1e436da;
}
}
}
lab_0x1e43711:
// 0x1e43711
g4 = v1;
return result;
lab_0x1e436f0:
if (v2 != 59) {
int32_t v7 = a1 + 1; // 0x1e4370b
g7 = v7;
if (*(char *)v7 == 0) {
// break -> 0x1e43711
goto lab_0x1e43711;
}
a1 = v7;
// continue -> 0x1e436da
goto lab_0x1e436da_3;
}
// 0x1e436f4
g2 = a1;
int32_t v8 = a1; // 0x1e436fb
int32_t v9 = v8 + 1; // 0x1e436f6
g5 = v9;
unsigned char v10 = *(char *)v9; // 0x1e436f9
g4 = g4 & -256 | (int32_t)v10;
*(char *)v8 = v10;
int32_t result2 = g5; // 0x1e436fd
g2 = result2;
while (*(char *)result2 != 0) {
// 0x1e436f6
v8 = result2;
v9 = v8 + 1;
g5 = v9;
v10 = *(char *)v9;
g4 = g4 & -256 | (int32_t)v10;
*(char *)v8 = v10;
result2 = g5;
g2 = result2;
}
int32_t v11 = g7; // 0x1e43704
if (*(char *)v11 == 0) {
// 0x1e43709
g4 = v1;
return result2;
}
a1 = v11;
// continue -> 0x1e436da
goto lab_0x1e436da_3;
}
// Address range: 0x1e43720 - 0x1e43786
int32_t function_1e43720(int32_t a1) {
int32_t v1 = g8; // 0x1e43720
g8 = a1;
if (a1 == 0) {
// 0x1e43784
g8 = v1;
return g2;
}
int32_t v2 = *(int32_t *)(a1 + 12); // 0x1e43729
g2 = v2;
int32_t result; // 0x1e4377c
if (v2 != (int32_t)&g477) {
// 0x1e43733
g2 = function_1e22600(v2);
int32_t v3 = *(int32_t *)(a1 + 16); // 0x1e4373c
g2 = v3;
g2 = function_1e22600(v3);
int32_t v4 = *(int32_t *)(a1 + 20); // 0x1e43748
g2 = v4;
g2 = function_1e22600(v4);
int32_t v5 = *(int32_t *)(a1 + 24); // 0x1e43754
g2 = v5;
g2 = function_1e22600(v5);
int32_t v6 = *(int32_t *)(a1 + 28); // 0x1e43760
g2 = v6;
g2 = function_1e22600(v6);
int32_t v7 = *(int32_t *)(a1 + 32); // 0x1e4376c
g2 = v7;
g2 = function_1e22600(v7);
int32_t v8 = *(int32_t *)(a1 + 36); // 0x1e43778
g2 = v8;
result = function_1e22600(v8);
g2 = result;
} else {
result = v2;
}
// 0x1e43784
g8 = v1;
return result;
}
// Address range: 0x1e43790 - 0x1e43a3c
int32_t function_1e43790(void) {
int32_t v1 = g4; // 0x1e43793
int16_t * v2 = (int16_t *)g8; // bp-32
g6 = 0;
if (g126 == 0) {
// 0x1e439fb
g2 = (int32_t)&g124;
g5 = g463;
g122 = (int16_t *)&g124;
*(int32_t *)&g123 = (int32_t)&g124;
g2 = function_1e22600(g463);
g5 = g464;
function_1e22600(g464);
g2 = 0;
g463 = 0;
g464 = 0;
return 0;
}
// 0x1e437a9
int32_t lpCPInfo; // bp-20
if (g130 != NULL) {
goto lab_0x1e437d2;
} else {
int32_t v3 = g465; // 0x1e437b8
g2 = v3;
int32_t v4 = function_1e45150(0, v3, 11, (int32_t)&g130); // 0x1e437c2
g2 = v4;
if (v4 != 0) {
g8 = lpCPInfo;
g3 = lpCPInfo;
goto lab_0x1e439c6;
} else {
goto lab_0x1e437d2;
}
}
lab_0x1e437d2:;
int32_t v5 = function_1e22670(514); // 0x1e437d7
g2 = v5;
g8 = v5;
int32_t v6 = function_1e22670(514); // 0x1e437e6
g2 = v6;
g3 = v6;
int32_t v7 = function_1e22670(257); // 0x1e437f5
g2 = v7;
g6 = v7;
int32_t v8 = function_1e22670(514); // 0x1e43804
g2 = v8;
if (g8 != 0) {
// 0x1e43818
if (g3 != 0) {
int32_t v9 = g6; // 0x1e43820
if (v9 != 0) {
if (v8 != 0) {
// 0x1e43830
g5 = v9;
g2 = 0;
*(char *)v9 = (char)0;
int32_t v10 = g5 + 1; // 0x1e43836
g5 = v10;
int32_t v11 = g2 + 1; // 0x1e43837
g2 = v11;
while (v11 < 256) {
// 0x1e43834
*(char *)v10 = (char)v11;
v10 = g5 + 1;
g5 = v10;
v11 = g2 + 1;
g2 = v11;
}
// 0x1e4383f
g2 = &lpCPInfo;
int32_t CodePage = (int32_t)g130; // 0x1e43843
g5 = CodePage;
bool v12 = GetCPInfo(CodePage, (struct _cpinfo *)&lpCPInfo); // 0x1e4384b
g2 = v12;
if (v12) {
if (v1 < 3) {
int32_t v13 = v1 & 0xffff; // 0x1e43868
g2 = v13;
g442 = v13;
char v14; // bp-22
int32_t v15; // 0x1e4387c
if (v13 > 1) {
// 0x1e43877
v15 = &v14;
if (v14 != 0) {
while (true) {
unsigned char v16 = *(char *)(v15 + 1); // 0x1e43882
int32_t v17 = v16; // 0x1e43882
g7 = g7 & -256 | v17;
if (v16 == 0) {
// break -> 0x1e438ab
break;
}
// 0x1e43889
g2 = 0;
g5 = 0;
unsigned char v18 = *(char *)v15; // 0x1e4388d
int32_t v19 = v18; // 0x1e4388d
g2 = v19;
g5 = v17;
if (v16 >= v18) {
*(char *)(g6 + v19) = 0;
int32_t v20 = g2 + 1; // 0x1e43899
g2 = v20;
g5 = 0;
int32_t v21 = (int32_t)*(char *)(v15 + 1); // 0x1e4389c
g5 = v21;
while (v21 >= v20) {
// 0x1e43895
*(char *)(g6 + v20) = 0;
v20 = g2 + 1;
g2 = v20;
g5 = 0;
v21 = (int32_t)*(char *)(v15 + 1);
g5 = v21;
}
}
int32_t v22 = v15 + 2; // 0x1e438a3
if (*(char *)v22 == 0) {
// break -> 0x1e438ab
break;
}
v15 = v22;
}
}
}
int32_t v23 = g8 + 2; // 0x1e438ad
g2 = v23;
int32_t v24 = function_1e42510(1, (char *)g6, 256, (int32_t *)v23, 0, 0); // 0x1e438bb
g2 = v24;
if (v24 != 0) {
// 0x1e438cb
*(int16_t *)g8 = 0;
int32_t v25 = (int32_t)v2; // 0x1e438d0
g5 = v25;
g2 = 0;
*(int16_t *)v25 = (int16_t)0;
int32_t v26 = g5 + 2; // 0x1e438d9
g5 = v26;
int32_t v27 = g2 + 1; // 0x1e438dc
g2 = v27;
while (v27 < 256) {
// 0x1e438d6
*(int16_t *)v26 = (int16_t)v27;
v26 = g5 + 2;
g5 = v26;
v27 = g2 + 1;
g2 = v27;
}
int32_t v28 = g3 + 2; // 0x1e438e6
g2 = v28;
int32_t v29 = (int32_t)v2; // 0x1e438e9
g5 = v29;
int32_t v30 = function_1e42350(1, v29, 256, v28, 0, 0); // 0x1e438f8
g2 = v30;
if (v30 != 0) {
// 0x1e43908
*(int16_t *)g3 = 0;
if (g442 > 1) {
int32_t v31 = &v14; // 0x1e4391c
v15 = v31;
if (v14 != 0) {
int32_t v32 = g7; // 0x1e43922
while (true) {
unsigned char v33 = *(char *)(v31 + 1); // 0x1e43922
int32_t v34 = v33; // 0x1e43922
int32_t v35 = v34 | v32 & -256; // 0x1e43922
if (v33 == 0) {
// break -> 0x1e43953
break;
}
// 0x1e43929
g2 = 0;
g5 = 0;
unsigned char v36 = *(char *)v31; // 0x1e4392d
int32_t v37 = v36; // 0x1e4392d
g2 = v37;
g5 = v34;
int32_t v38; // 0x1e43944
int32_t v39; // 0x1e4392214
if (v33 >= v36) {
int32_t v40 = 2 * v37 + 2 + g8; // 0x1e43935
*(int16_t *)v40 = -0x8000;
int32_t v41 = v40 + 2; // 0x1e4393e
int32_t v42 = g2 + 1; // 0x1e43941
g2 = v42;
g5 = 0;
v38 = v15;
int32_t v43 = (int32_t)*(char *)(v38 + 1); // 0x1e43944
g5 = v43;
v39 = v41;
while (v43 >= v42) {
// 0x1e43939
v40 = v41;
*(int16_t *)v40 = -0x8000;
v41 = v40 + 2;
v42 = g2 + 1;
g2 = v42;
g5 = 0;
v38 = v15;
v43 = (int32_t)*(char *)(v38 + 1);
g5 = v43;
v39 = v41;
}
} else {
v38 = v31;
v39 = v35;
}
int32_t v44 = v38 + 2; // 0x1e4394b
v15 = v44;
if (*(char *)v44 == 0) {
// break -> 0x1e43953
break;
}
v32 = v39;
v31 = v44;
}
}
}
int32_t v45 = g8; // 0x1e43953
int32_t v46 = v45 + 2; // 0x1e43953
g2 = v46;
int32_t v47 = g3 + 2; // 0x1e43956
g5 = v47;
g122 = (int16_t *)v46;
*(int32_t *)&g123 = v47;
int32_t v48 = g463; // 0x1e43964
int32_t v49; // 0x1e43982
if (v48 != 0) {
// 0x1e4396d
g2 = v48;
g2 = function_1e22600(v48);
v49 = g8;
} else {
v49 = v45;
}
// 0x1e4397b
g463 = v49;
if (g464 != 0) {
// 0x1e4398a
g2 = g464;
g2 = function_1e22600(g464);
}
// 0x1e43998
g464 = g3;
function_1e22600(g6);
int32_t v50 = (int32_t)v2; // 0x1e439a4
g2 = v50;
function_1e22600(v50);
g2 = 0;
return 0;
}
}
}
}
}
}
}
}
goto lab_0x1e439c6;
lab_0x1e439c6:
// 0x1e439c6
*(int32_t *)(g9 - 4) = g8;
g2 = function_1e22600((int32_t)&g708);
*(int32_t *)g9 = g3;
g2 = function_1e22600((int32_t)&g708);
*(int32_t *)g9 = g6;
g2 = function_1e22600((int32_t)&g708);
int32_t v51 = *(int32_t *)(g9 + 20); // 0x1e439de
g2 = v51;
*(int32_t *)g9 = v51;
function_1e22600((int32_t)&g708);
g2 = 1;
return 1;
}
// Address range: 0x1e43a40 - 0x1e43a43
int32_t function_1e43a40(void) {
// 0x1e43a40
g2 = 0;
return 0;
}
// Address range: 0x1e43a50 - 0x1e43a8e
int32_t function_1e43a50(int32_t a1, int32_t a2) {
// 0x1e43a50
g2 = 0;
unsigned char v1 = *(char *)a2; // 0x1e43a64251
int32_t v2 = v1; // 0x1e43a64252
g2 = v2;
int32_t v3;
int32_t v4;
if (v1 != 0) {
int32_t v5 = v2; // 0x1e43a66257
int32_t v6 = v2; // 0x1e43a64256
int32_t v7 = 0; // 0x1e43a6b254
while (true) {
int32_t v8 = a2 + 1; // 0x1e43a6a
int32_t v9 = 1 << (v6 & 31) | v7; // 0x1e43a6b
unsigned char v10 = *(char *)v8; // 0x1e43a64
int32_t v11 = v10; // 0x1e43a64
int32_t v12 = v11 | v5 & -256; // 0x1e43a66
g2 = v12;
if (v10 == 0) {
v4 = v9;
v3 = v12;
// break -> 0x1e43a71
break;
}
v5 = v12;
v6 = v11;
a2 = v8;
v7 = v9;
}
} else {
v4 = 0;
v3 = v2;
}
// 0x1e43a71
g5 = -1;
int32_t v13 = v3; // 0x1e43a79
int32_t v14 = -1; // 0x1e43a78
int32_t result; // 0x1e43a78
while (true) {
// 0x1e43a78
result = v14 + 1;
g5 = result;
unsigned char v15 = *(char *)a1; // 0x1e43a79
int32_t v16 = v15; // 0x1e43a79
int32_t v17 = v16 | v13 & -256; // 0x1e43a7b
g2 = v17;
if (v15 == 0) {
// break -> 0x1e43a86
break;
}
// 0x1e43a7f
if ((1 << (v16 & 31) & v4) != 0) {
// break -> 0x1e43a86
break;
}
v13 = v17;
a1++;
v14 = result;
}
// 0x1e43a86
g2 = result;
return result;
}
// Address range: 0x1e43a90 - 0x1e43ac8
int32_t function_1e43a90(int32_t a1, int32_t a2, int32_t a3) {
// 0x1e43a90
g5 = a3;
int32_t result; // 0x1e43ac1
if (a3 == 0) {
result = 0;
goto lab_0x1e43ac1;
} else {
// 0x1e43a9b
g2 = 0;
int32_t v1 = a3; // 0x1e43aa4
bool v2; // df
int32_t v3; // 0x1e43aa6
while (true) {
if (v1 == 0) {
v3 = 0;
// break -> bb244
break;
}
int32_t v4 = v1 - 1; // 0x1e43aa4
g5 = v4;
if (*(char *)a1 == 0) {
v3 = v4;
// break -> bb244
break;
}
a1 += (v2 ? -1 : 1);
v1 = v4;
}
int32_t v5 = a3 - v3; // 0x1e43aa8
g5 = v5;
int32_t v6; // 0x1e43ab1
int32_t v7; // 0x1e43ab6
while (true) {
if (v5 == 0) {
v7 = a1;
v6 = a2;
// break -> bb247
break;
}
int32_t v8 = v2 ? -1 : 1; // 0x1e43aaf
int32_t v9 = v8 + a1; // 0x1e43aaf
int32_t v10 = v8 + a2; // 0x1e43aaf
int32_t v11 = v5 - 1; // 0x1e43aaf
g5 = v11;
if (*(char *)a2 != *(char *)a1) {
v7 = v9;
v6 = v10;
// break -> bb247
break;
}
a1 = v9;
a2 = v10;
v5 = v11;
}
unsigned char v12 = *(char *)(v6 - 1); // 0x1e43ab1
g2 = v12;
g5 = 0;
unsigned char v13 = *(char *)(v7 - 1); // 0x1e43ab6
int32_t v14; // 0x1e43abf
if (v12 > v13) {
v14 = -1;
// 0x1e43abf
g5 = v14;
result = v14;
goto lab_0x1e43ac1;
} else {
if (v12 == v13) {
result = 0;
goto lab_0x1e43ac1;
} else {
// 0x1e43abd
g5 = -2;
v14 = 1;
// 0x1e43abf
g5 = v14;
result = v14;
goto lab_0x1e43ac1;
}
}
}
lab_0x1e43ac1:
// 0x1e43ac1
g2 = result;
return result;
}
// Address range: 0x1e43ad0 - 0x1e43b0a
int32_t function_1e43ad0(int32_t a1, int32_t a2) {
// 0x1e43ad0
g2 = 0;
unsigned char v1 = *(char *)a2; // 0x1e43ae4252
int32_t v2 = v1; // 0x1e43ae4253
g2 = v2;
int32_t v3;
int32_t v4;
if (v1 != 0) {
int32_t v5 = v2; // 0x1e43ae6258
int32_t v6 = v2; // 0x1e43ae4257
int32_t v7 = 0; // 0x1e43aeb255
while (true) {
int32_t v8 = a2 + 1; // 0x1e43aea
int32_t v9 = 1 << (v6 & 31) | v7; // 0x1e43aeb
unsigned char v10 = *(char *)v8; // 0x1e43ae4
int32_t v11 = v10; // 0x1e43ae4
int32_t v12 = v11 | v5 & -256; // 0x1e43ae6
g2 = v12;
if (v10 == 0) {
v4 = v9;
v3 = v12;
// break -> 0x1e43af1
break;
}
v5 = v12;
v6 = v11;
a2 = v8;
v7 = v9;
}
} else {
v4 = 0;
v3 = v2;
}
int32_t v13 = v3; // 0x1e43af4
int32_t result; // 0x1e43b09
while (true) {
unsigned char v14 = *(char *)a1; // 0x1e43af4
int32_t v15 = v14; // 0x1e43af4
int32_t v16 = v15 | v13 & -256; // 0x1e43af6
g2 = v16;
if (v14 == 0) {
result = v16;
// break -> 0x1e43b04
break;
}
// 0x1e43afa
if ((1 << (v15 & 31) & v4) != 0) {
// 0x1e43b01
g2 = a1;
result = a1;
return result;
}
v13 = v16;
a1++;
}
// 0x1e43b04
return result;
}
// Address range: 0x1e43b10 - 0x1e43d3b
int32_t function_1e43b10(int32_t a1, int32_t a2, char * a3, int32_t a4, int32_t * a5, int32_t a6, int32_t a7) {
int32_t v1 = g470; // 0x1e43b11
g2 = v1;
if (v1 != 0) {
// branch -> 0x1e43b72
} else {
int32_t v2 = LCMapStringA(0, 256, (char *)&g67, 1, NULL, 0); // 0x1e43b35
g2 = v2;
if (v2 == 0) {
int32_t v3 = LCMapStringW(0, 256, (int16_t *)&g68, 1, NULL, 0); // 0x1e43b54
g2 = v3;
if (v3 == 0) {
// 0x1e43b65
g2 = 0;
g3 = 0;
g6 = 256;
g8 = (int32_t)&g68;
g4 = 1;
return 0;
}
// 0x1e43b5e
g2 = 1;
v1 = 1;
} else {
// 0x1e43b3b
g2 = 2;
v1 = 2;
}
}
uint32_t v4 = *(int32_t *)(g9 + 32); // 0x1e43b72
g6 = v4;
g470 = v1;
int32_t v5; // 0x1e43b8f
int32_t v6; // 0x1e43bda
if (v4 >= 1) {
// 0x1e43b7f
g2 = *(int32_t *)(g9 + 28);
*(int32_t *)(g9 - 4) = v4;
*(int32_t *)(g9 - 8) = g2;
g6 = function_1e43d40((int32_t)&g708, (int32_t)&g708);
v5 = g470;
g2 = v5;
v6 = g9 + 8;
} else {
v6 = g9;
v5 = v1;
}
// 0x1e43b94
g470 = v5;
if (v5 == 2) {
int32_t v7 = *(int32_t *)(v6 + 40); // 0x1e43b9e
g2 = v7;
g5 = *(int32_t *)(v6 + 36);
g7 = *(int32_t *)(v6 + 28);
*(int32_t *)(v6 - 4) = v7;
g2 = *(int32_t *)(v6 + 24);
*(int32_t *)(v6 - 8) = g5;
g5 = *(int32_t *)(v6 + 20);
*(int32_t *)(v6 - 12) = g6;
*(int32_t *)(v6 - 16) = g7;
*(int32_t *)(v6 - 20) = g2;
*(int32_t *)(v6 - 24) = g5;
int32_t result = LCMapStringA((int32_t)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708); // 0x1e43bb8
g2 = result;
g3 = *(int32_t *)g9;
g6 = *(int32_t *)(g9 + 4);
g8 = *(int32_t *)(g9 + 8);
g4 = *(int32_t *)(g9 + 12);
return result;
}
// 0x1e43bbf
g470 = v5;
int32_t v8; // 0x1e43c9f
int32_t result2; // 0x1e43ca3
int32_t v9; // 0x1e43c0a
if (v5 != 1) {
result2 = v5;
v8 = v6;
goto lab_0x1e43c9f;
} else {
// 0x1e43bcd
g8 = 0;
int32_t * v10 = (int32_t *)(v6 + 44); // 0x1e43bcf
int32_t v11; // 0x1e43bde
if (*v10 == 0) {
int32_t v12 = (int32_t)g130; // 0x1e43bd5
g2 = v12;
*v10 = v12;
v11 = g9;
} else {
v11 = v6;
}
// 0x1e43bde
g2 = *(int32_t *)(v11 + 28);
*(int32_t *)(v11 - 4) = 0;
g5 = *(int32_t *)(v11 + 44);
*(int32_t *)(v11 - 8) = 0;
*(int32_t *)(v11 - 12) = g6;
*(int32_t *)(v11 - 16) = g2;
*(int32_t *)(v11 - 20) = 9;
*(int32_t *)(v11 - 24) = g5;
int32_t v13 = MultiByteToWideChar((int32_t)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708); // 0x1e43bef
g2 = v13;
g3 = v13;
if (v13 == 0) {
// 0x1e43bfb
g2 = 0;
g3 = *(int32_t *)g9;
g6 = *(int32_t *)(g9 + 4);
g8 = *(int32_t *)(g9 + 8);
g4 = *(int32_t *)(g9 + 12);
return 0;
}
int32_t v14 = 2 * v13; // 0x1e43c02
g2 = v14;
*(int32_t *)(g9 - 4) = v14;
v9 = function_1e22670((int32_t)&g708);
g2 = v9;
if (v9 == 0) {
// 0x1e43c18
g2 = 0;
g3 = *(int32_t *)(g9 + 4);
g6 = *(int32_t *)(g9 + 8);
g8 = *(int32_t *)(g9 + 12);
g4 = *(int32_t *)(g9 + 16);
return 0;
}
// 0x1e43c1f
g2 = *(int32_t *)(g9 + 32);
*(int32_t *)g9 = v13;
g5 = *(int32_t *)(g9 + 48);
*(int32_t *)(g9 - 4) = v9;
*(int32_t *)(g9 - 8) = g6;
*(int32_t *)(g9 - 12) = g2;
*(int32_t *)(g9 - 16) = 1;
*(int32_t *)(g9 - 20) = g5;
int32_t v15 = MultiByteToWideChar((int32_t)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708); // 0x1e43c2e
g2 = v15;
if (v15 == 0) {
goto lab_0x1e43c8b;
} else {
// 0x1e43c38
g2 = *(int32_t *)(g9 + 24);
*(int32_t *)(g9 - 4) = 0;
g5 = *(int32_t *)(g9 + 20);
*(int32_t *)(g9 - 8) = 0;
*(int32_t *)(g9 - 12) = v13;
*(int32_t *)(g9 - 16) = v9;
*(int32_t *)(g9 - 20) = g2;
*(int32_t *)(g9 - 24) = g5;
int32_t v16 = LCMapStringW((int32_t)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708); // 0x1e43c48
g2 = v16;
g6 = v16;
if (v16 == 0) {
goto lab_0x1e43c8b;
} else {
// 0x1e43c54
if ((*(char *)(g9 + 25) & 4) == 0) {
int32_t v17 = 2 * v16; // 0x1e43ca4
g2 = v17;
*(int32_t *)(g9 - 4) = v17;
int32_t v18 = function_1e22670((int32_t)&g708); // 0x1e43cac
g2 = v18;
g8 = v18;
if (v18 == 0) {
goto lab_0x1e43c8b;
} else {
// 0x1e43cba
g2 = *(int32_t *)(g9 + 28);
*(int32_t *)g9 = g6;
g5 = *(int32_t *)(g9 + 24);
*(int32_t *)(g9 - 4) = g8;
*(int32_t *)(g9 - 8) = v13;
*(int32_t *)(g9 - 12) = v9;
*(int32_t *)(g9 - 16) = g2;
*(int32_t *)(g9 - 20) = g5;
int32_t v19 = LCMapStringW((int32_t)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708); // 0x1e43cc8
g2 = v19;
if (v19 == 0) {
goto lab_0x1e43c8b;
} else {
int32_t v20 = *(int32_t *)(g9 + 40); // 0x1e43cd2
g2 = v20;
*(int32_t *)(g9 - 4) = 0;
*(int32_t *)(g9 - 8) = 0;
int32_t v21 = *(int32_t *)(g9 + 44); // 0x1e43cfe
if (v20 != 0) {
// 0x1e43cfe
g5 = v21;
*(int32_t *)(g9 - 12) = v20;
int32_t v22 = *(int32_t *)(g9 + 36); // 0x1e43d03
g2 = v22;
g3 = *(int32_t *)0x1e4b0e8;
*(int32_t *)(g9 - 16) = v22;
*(int32_t *)(g9 - 20) = g6;
*(int32_t *)(g9 - 24) = g8;
*(int32_t *)(g9 - 28) = 544;
*(int32_t *)(g9 - 32) = g5;
int32_t v23 = WideCharToMultiByte((int32_t)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708, (char *)&g708, (bool *)&g708); // 0x1e43d16
g2 = v23;
g6 = v23;
if (v23 == 0) {
goto lab_0x1e43c8b;
} else {
goto lab_0x1e43d22;
}
} else {
// 0x1e43cde
g2 = v21;
*(int32_t *)(g9 - 12) = 0;
*(int32_t *)(g9 - 16) = 0;
g3 = *(int32_t *)0x1e4b0e8;
*(int32_t *)(g9 - 20) = g6;
*(int32_t *)(g9 - 24) = g8;
*(int32_t *)(g9 - 28) = 544;
*(int32_t *)(g9 - 32) = g2;
int32_t v24 = WideCharToMultiByte((int32_t)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708, (char *)&g708, (int32_t)&g708, (char *)&g708, (bool *)&g708); // 0x1e43cf4
g2 = v24;
g6 = v24;
if (v24 != 0) {
goto lab_0x1e43d22;
} else {
goto lab_0x1e43c8b;
}
}
}
}
} else {
int32_t v25 = *(int32_t *)(g9 + 40); // 0x1e43c5b
g2 = v25;
if (v25 == 0) {
goto lab_0x1e43d22;
} else {
if (v16 > v25) {
goto lab_0x1e43c8b;
} else {
// 0x1e43c6b
g5 = *(int32_t *)(g9 + 24);
*(int32_t *)(g9 - 4) = v25;
int32_t v26 = *(int32_t *)(g9 + 36); // 0x1e43c70
g2 = v26;
g7 = *(int32_t *)(g9 + 20);
*(int32_t *)(g9 - 8) = v26;
*(int32_t *)(g9 - 12) = v13;
*(int32_t *)(g9 - 16) = v9;
*(int32_t *)(g9 - 20) = g5;
*(int32_t *)(g9 - 24) = g7;
int32_t v27 = LCMapStringW((int32_t)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708, (int16_t *)&g708, (int32_t)&g708); // 0x1e43c7d
g2 = v27;
if (v27 != 0) {
goto lab_0x1e43d22;
} else {
goto lab_0x1e43c8b;
}
}
}
}
}
}
}
lab_0x1e43c9f:
// 0x1e43c9f
g3 = *(int32_t *)v8;
g6 = *(int32_t *)(v8 + 4);
g8 = *(int32_t *)(v8 + 8);
g4 = *(int32_t *)(v8 + 12);
return result2;
lab_0x1e43c8b:
// 0x1e43c8b
*(int32_t *)(g9 - 4) = v9;
g2 = function_1e22600((int32_t)&g708);
*(int32_t *)g9 = g8;
function_1e22600((int32_t)&g708);
g2 = 0;
result2 = 0;
v8 = g9 + 4;
goto lab_0x1e43c9f;
lab_0x1e43d22:
// 0x1e43d22
*(int32_t *)(g9 - 4) = v9;
g2 = function_1e22600((int32_t)&g708);
*(int32_t *)g9 = g8;
function_1e22600((int32_t)&g708);
int32_t result3 = g6; // 0x1e43d34
g2 = result3;
g3 = *(int32_t *)(g9 + 4);
g6 = *(int32_t *)(g9 + 8);
g8 = *(int32_t *)(g9 + 12);
g4 = *(int32_t *)(g9 + 16);
return result3;
}
// Address range: 0x1e43d40 - 0x1e43d6c
int32_t function_1e43d40(int32_t a1, int32_t result) {
// 0x1e43d40
g2 = result;
int32_t v1 = result - 1; // 0x1e43d4c
g5 = v1;
g7 = a1;
int32_t v2; // 0x1e43d60
int32_t v3; // 0x1e43d65
if (result == 0) {
v2 = a1;
lab_0x1e43d60:
// 0x1e43d60
if (*(char *)v2 != 0) {
// 0x1e43d69
return result;
}
v3 = v2;
} else {
while (true) {
// 0x1e43d53
if (*(char *)a1 == 0) {
v3 = a1;
// break -> 0x1e43d65
break;
}
int32_t v4 = a1 + 1; // 0x1e43d58
g7 = v4;
int32_t v5 = v1 - 1; // 0x1e43d5b
g5 = v5;
if (v1 == 0) {
v2 = v4;
goto lab_0x1e43d60;
}
v1 = v5;
a1 = v4;
}
}
int32_t result2 = v3 - a1; // 0x1e43d65
g7 = result2;
g2 = result2;
// 0x1e43d69
return result2;
}
// Address range: 0x1e43e6d - 0x1e43e74
int32_t function_1e43e6d(void) {
int32_t result = function_1e43f29(); // 0x1e43e6d
g2 = result;
return result;
}
// Address range: 0x1e43e76 - 0x1e43e7b
float80_t function_1e43e76(void) {
// 0x1e43e76
return 0.0L;
}
// Address range: 0x1e43e7b - 0x1e43e82
float80_t function_1e43e7b(void) {
// 0x1e43e7b
return 1.0L;
}
// Address range: 0x1e43e82 - 0x1e43ead
float80_t function_1e43e82(void) {
// 0x1e43e82
int32_t v1;
float80_t result; // 0x1e43e82
*(float80_t *)(v1 - 158) = result;
char * v2 = (char *)(v1 - 144); // 0x1e43e9f
if ((*(char *)(v1 - 151) & 64) == 0) {
// 0x1e43e9f
*v2 = 1;
return result + (float80_t)g473;
}
// 0x1e43e97
*v2 = 7;
return result;
}
// Address range: 0x1e43ead - 0x1e43ed7
float80_t function_1e43ead(void) {
// 0x1e43ead
int32_t v1;
float80_t v2; // 0x1e43ead
*(float80_t *)(v1 - 158) = v2;
*(char *)(v1 - 144) = (*(char *)(v1 - 151) & 64) == 0 ? 1 : 7;
return 2 * v2;
}
// Address range: 0x1e43ed7 - 0x1e43f16
float80_t function_1e43ed7(void) {
// 0x1e43ed7
float80_t v1; // st7
float80_t v2 = v1; // 0x1e43ed7
int32_t v3;
float80_t * v4 = (float80_t *)(v3 - 158); // 0x1e43ed7
*v4 = v2;
char * v5 = (char *)(v3 - 151); // 0x1e43ee3
if ((*v5 & 64) == 0) {
// 0x1e43f0c
*(char *)(v3 - 144) = 1;
return 2 * v2;
} else {
// 0x1e43eec
*v4 = v2;
if ((*v5 & 64) == 0) {
// 0x1e43f0c
*(char *)(v3 - 144) = 1;
return 2 * v2;
} else {
// 0x1e43f03
*(char *)(v3 - 144) = 7;
return 2 * v2;
}
}
lab_0x1e43f13:
// 0x1e43f13
return 2 * v2;
}
// Address range: 0x1e43f16 - 0x1e43f29
int32_t function_1e43f16(void) {
// 0x1e43f16
g684 = g471;
return g2;
}
// Address range: 0x1e43f29 - 0x1e43f33
int32_t function_1e43f29(void) {
// 0x1e43f29
*(char *)(g3 - 144) = 1;
return g2;
}
// Address range: 0x1e43f33 - 0x1e43f3a
int32_t function_1e43f33(void) {
// 0x1e43f39
return g2;
}
// Address range: 0x1e43f40 - 0x1e4403f
int32_t function_1e43f40(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5) {
// 0x1e43f40
g2 = a3;
int32_t v1; // bp-92
int32_t v2 = &v1; // 0x1e43f44
g5 = 0;
int32_t v3 = (int32_t)*(int16_t *)a3; // 0x1e43f4a
g5 = v3;
int32_t v4 = g8; // 0x1e43f4d
g8 = a2;
int32_t v5 = g6; // 0x1e43f52
v1 = v3;
int32_t * v6 = (int32_t *)a2; // 0x1e43f57
int32_t v7 = *v6; // 0x1e43f57
int32_t v8 = v7 - 1; // 0x1e43f59
g2 = v8;
g714 = v8;
int32_t v9; // 0x1e43f97
switch (v7) {
case 1: {
// 0x1e43f66
g6 = 8;
v9 = 8;
goto lab_0x1e43f8e;
}
case 2: {
// 0x1e43f6d
g6 = 4;
v9 = 4;
goto lab_0x1e43f8e;
}
case 3: {
// 0x1e43f74
g6 = 17;
v9 = 17;
goto lab_0x1e43f8e;
}
case 4: {
// 0x1e43f7b
g6 = 18;
v9 = 18;
goto lab_0x1e43f8e;
}
case 5: {
// 0x1e43f66
g6 = 8;
v9 = 8;
goto lab_0x1e43f8e;
}
case 7: {
// 0x1e43f82
*v6 = 1;
// 0x1e43f8a
g6 = 0;
goto lab_0x1e43fff;
}
case 8: {
// 0x1e43fbe
g6 = 16;
v9 = 16;
goto lab_0x1e43f8e;
}
default: {
// 0x1e43f8a
g6 = 0;
goto lab_0x1e43fff;
}
}
lab_0x1e43fff:;
int32_t v10 = v1; // 0x1e43fff
g2 = v10;
function_1e40ad0(v10, 0xffff);
g2 = 0;
int32_t * v11 = (int32_t *)g8; // 0x1e44013
int32_t v12 = *v11; // 0x1e44013
int32_t result2; // 0x1e44030
int32_t v13; // 0x1e4402d
if (v12 != 8) {
// 0x1e44018
if (g456 == 0) {
int32_t result = function_1e42640(v11); // 0x1e44021
g2 = result;
if (result != 0) {
// 0x1e44038
return result;
}
// 0x1e44029
v13 = *(int32_t *)g8;
// 0x1e4402d
g2 = v13;
result2 = function_1e409f0(v13);
g2 = result2;
// 0x1e44038
return result2;
}
}
v13 = v12;
// 0x1e4402d
g2 = v13;
result2 = function_1e409f0(v13);
g2 = result2;
// 0x1e44038
return result2;
lab_0x1e43f8e:;
int32_t v14 = a2 + 24; // 0x1e43f8e
g4 = v14;
g2 = v3;
int32_t v15 = function_1e40680(v9, (int32_t *)v14, v3, v5, v4); // 0x1e43f98
g2 = v15;
if (v15 != 0) {
goto lab_0x1e43fff;
} else {
// 0x1e43fa4
g5 = a1;
if (a1 == 16) {
goto lab_0x1e43fc5;
} else {
if (a1 == 22) {
goto lab_0x1e43fc5;
} else {
if (a1 == 29) {
goto lab_0x1e43fc5;
} else {
goto lab_0x1e43fe6;
}
}
}
}
lab_0x1e43fc5:;
// 0x1e43fc5
int32_t v16;
int32_t v17 = v16 | 1; // 0x1e43fc5
g2 = v17;
int32_t v18 = g8; // 0x1e43fce
g2 = v17 & -31 | 2;
g2 = *(int32_t *)(v18 + 16);
g8 = v18;
goto lab_0x1e43fe6;
lab_0x1e43fe6:;
int32_t v19 = g8 + 8; // 0x1e43fe7
g2 = v19;
g5 = v2;
int32_t v20; // bp-88
int32_t v21 = function_1e40310(&v20, &v1, g6, a1, (int32_t *)v19, (int32_t *)g4); // 0x1e43ff7
g2 = v21;
goto lab_0x1e43fff;
}
// Address range: 0x1e44060 - 0x1e440d8
int32_t function_1e44060(uint32_t a1, int32_t a2, int32_t a3) {
int32_t v1 = g8; // 0x1e44060
int32_t v2 = g6; // bp-8
if ((int32_t)g679 > a1) {
int32_t v3 = a1 & 31; // 0x1e44075
int32_t v4 = a1 / 8 & -4; // 0x1e44078
g2 = v4;
g5 = 4 * v3;
int32_t v5 = *(int32_t *)(v4 + (int32_t)&g677); // 0x1e4407e
g7 = v5;
int32_t v6 = 36 * v3; // 0x1e44084
g2 = v6;
if ((*(char *)(v6 + 4 + v5) & 1) != 0) {
// 0x1e4408e
function_1e23dd0(a1);
g2 = a3;
g5 = a2;
int32_t result = function_1e440e0(g8, (int32_t *)a2, a3); // 0x1e440a2
g2 = result;
function_1e23e40(g8);
g2 = result;
g6 = v2;
g8 = v1;
return result;
}
}
int32_t v7 = function_1e23ad0(); // 0x1e440ba
g2 = v7;
*(int32_t *)v7 = 9;
int32_t v8 = function_1e23ae0(); // 0x1e440c5
g6 = v2;
*(int32_t *)v8 = 0;
g2 = -1;
g8 = v1;
return -1;
}
// Address range: 0x1e440e0 - 0x1e44310
int32_t function_1e440e0(int32_t a1, int32_t * a2, int32_t a3) {
int32_t v1 = (int32_t)a2;
g5 = a3;
int32_t v2 = g4; // 0x1e440eb
int32_t v3 = g6; // 0x1e440f7
int32_t v4 = g3; // 0x1e440f8
if (a3 == 0) {
// 0x1e44306
g2 = 0;
g3 = v4;
g4 = v2;
return 0;
}
int32_t v5 = (a1 / 8 & -4) + (int32_t)&g677; // 0x1e44109
g3 = v5;
int32_t v6 = a1 & 31; // 0x1e44113
g2 = 4 * v6;
int32_t v7 = 36 * v6; // 0x1e44119
g4 = v7;
int32_t v8 = *(int32_t *)v5 + v7; // 0x1e4411f
g2 = v8;
char * v9 = (char *)(v8 + 4); // 0x1e44121
if ((*v9 & 2) != 0) {
// 0x1e44306
g2 = 0;
g3 = v4;
g4 = v2;
return 0;
}
// 0x1e4412b
char * v10;
int32_t nNumberOfBytesToRead; // 0x1e44153
int32_t lpBuffer; // 0x1e44154
int32_t v11; // 0x1e44155
int32_t v12; // 0x1e44158
if ((*v9 & 72) != 0) {
unsigned char v13 = *(char *)(v8 + 5); // 0x1e44131
g2 = (int32_t)v13 | v8 & -256;
if (v13 != 10) {
// 0x1e44138
*(char *)a2 = v13;
g5--;
int32_t v14 = *(int32_t *)g3; // 0x1e4413c
g2 = v14;
*(char *)(v14 + 5 + g4) = 10;
v12 = g4;
v11 = g3;
lpBuffer = v1 + 1;
nNumberOfBytesToRead = g5;
v10 = (char *)1;
} else {
v12 = v7;
v11 = v5;
lpBuffer = v1;
nNumberOfBytesToRead = a3;
v10 = NULL;
}
} else {
v12 = v7;
v11 = v5;
lpBuffer = v1;
nNumberOfBytesToRead = a3;
v10 = NULL;
}
// 0x1e4414c
int32_t lpNumberOfBytesRead; // bp-8
int32_t v15 = &lpNumberOfBytesRead; // 0x1e4414c
g2 = v15;
int32_t v16 = *(int32_t *)v11; // 0x1e44155
g5 = v16;
int32_t hFile = *(int32_t *)(v16 + v12); // 0x1e44158
bool v17 = ReadFile((int32_t *)hFile, (int32_t *)lpBuffer, nNumberOfBytesToRead, &lpNumberOfBytesRead, NULL); // 0x1e4415c
g2 = v17;
if (!v17) {
int32_t errorCode = GetLastError(); // 0x1e44166
g2 = errorCode;
g8 = errorCode;
if (errorCode == 5) {
int32_t v18 = function_1e23ad0(); // 0x1e44173
g2 = v18;
*(int32_t *)v18 = 9;
int32_t v19 = function_1e23ae0(); // 0x1e4417e
g3 = hFile;
*(int32_t *)v19 = g8;
g2 = -1;
g6 = lpBuffer;
g8 = nNumberOfBytesToRead;
g4 = v15;
return -1;
}
if (errorCode == 109) {
// 0x1e44197
g2 = 0;
g3 = hFile;
g6 = lpBuffer;
g8 = nNumberOfBytesToRead;
g4 = v15;
return 0;
}
// 0x1e441a1
function_1e23a50(errorCode);
g2 = -1;
g3 = hFile;
g6 = lpBuffer;
g8 = nNumberOfBytesToRead;
g4 = v15;
return -1;
}
// 0x1e441b7
g2 = v3;
int32_t v20 = *(int32_t *)g3; // 0x1e441bb
g5 = v20;
int32_t v21 = v20 + 4 + g4; // 0x1e441c2
g2 = v21;
char * v22 = (char *)v21; // 0x1e441c6
unsigned char v23 = *v22; // 0x1e441c6
int32_t v24 = v20 & -256; // 0x1e441c6
g5 = (int32_t)v23 | v24;
char v25;
if (v23 > -1) {
goto lab_0x1e442fa;
} else {
// 0x1e441d1
if (v3 == 0) {
// 0x1e441e6
v25 = v23 & -5;
goto lab_0x1e441e9;
} else {
// 0x1e441d8
if (*v10 != 10) {
// 0x1e441e6
v25 = v23 & -5;
goto lab_0x1e441e9;
} else {
// 0x1e441e1
v25 = v23 | 4;
goto lab_0x1e441e9;
}
}
}
lab_0x1e442cf:
// 0x1e442cf
*(char *)g6 = 13;
// 0x1e442d2
g6++;
goto lab_0x1e442d3;
lab_0x1e442d3:;
int32_t v26 = g8; // 0x1e442d3
if (v26 >= *(int32_t *)(g9 + 28)) {
// break -> 0x1e442f2
goto lab_0x1e442f2;
}
unsigned char v27 = *(char *)v26; // 0x1e44203
g2 = (int32_t)v27 | g2 & -256;
if (v27 == 26) {
goto lab_0x1e442df;
}
goto lab_0x1e4420d;
lab_0x1e442b7:
// 0x1e442b7
g2 = *(int32_t *)(g9 + 36);
*(int32_t *)(g9 - 4) = 1;
*(int32_t *)(g9 - 8) = -1;
*(int32_t *)(g9 - 12) = g2;
int32_t v37 = function_1e23ef0((int32_t)&g708, (int32_t)&g708, (int32_t)&g708); // 0x1e442c0
g2 = v37;
if (*(char *)(g9 + 31) == 10) {
goto lab_0x1e442d3;
} else {
goto lab_0x1e442cf;
}
lab_0x1e442fa:;
int32_t result = *(int32_t *)(g9 + 20); // 0x1e442fa
g2 = result;
g3 = *(int32_t *)g9;
g6 = *(int32_t *)(g9 + 4);
g8 = *(int32_t *)(g9 + 8);
g4 = *(int32_t *)(g9 + 12);
return result;
lab_0x1e441e9:
// 0x1e441e9
g5 = (int32_t)v25 | v24;
g6 = (int32_t)v10;
*v22 = v25;
int32_t v38 = g6; // 0x1e441ef
int32_t v39 = v4 + v3 + v38; // 0x1e441f5
g2 = v39;
if (v38 < v39) {
unsigned char v40 = *(char *)v38; // 0x1e4420355
g2 = (int32_t)v40 | v39 & -256;
if (v40 == 26) {
lab_0x1e442df:;
int32_t v41 = *(int32_t *)g3 + 4 + g4; // 0x1e442e2
g2 = v41;
char * v42 = (char *)v41; // 0x1e442e6
unsigned char v43 = *v42; // 0x1e442e6
int32_t v44 = g5 & -256; // 0x1e442e6
g5 = v44 | (int32_t)v43;
if ((v43 & 64) == 0) {
unsigned char v45 = v43 | 2; // 0x1e442ed
g5 = v44 | (int32_t)v45;
*v42 = v45;
}
} else {
v27 = v40;
v26 = v38;
while (true) {
lab_0x1e4420d:
if (v27 == 13) {
int32_t v28 = *(int32_t *)(g9 + 28) - 1; // 0x1e4421d
g5 = v28;
int32_t v29 = v26 + 1; // 0x1e4423e
if (v28 > v26) {
// 0x1e44222
g5 = v29;
if (*(char *)v29 != 10) {
// 0x1e44235
g8 = v29;
*(char *)g6 = 13;
} else {
// 0x1e4422a
g8 = v26 + 2;
*(char *)g6 = 10;
}
// 0x1e442d2
g6++;
goto lab_0x1e442d3;
} else {
// 0x1e4423e
g8 = v29;
*(int32_t *)(g9 - 4) = 0;
int32_t v30 = g9 + 24; // 0x1e44241
g2 = v30;
g5 = g9 + 19;
*(int32_t *)(g9 - 8) = v30;
*(int32_t *)(g9 + 20) = 0;
*(int32_t *)(g9 - 4) = 1;
g2 = *(int32_t *)(g4 + *(int32_t *)g3);
*(int32_t *)(g9 - 8) = g5;
*(int32_t *)(g9 - 12) = g2;
bool v31 = ReadFile(&g708, &g708, (int32_t)&g708, &g708, (struct _OVERLAPPED *)&g708); // 0x1e4425c
g2 = v31;
if (!v31) {
int32_t errorCode2 = GetLastError(); // 0x1e44266
g2 = errorCode2;
*(int32_t *)(g9 + 20) = errorCode2;
}
// 0x1e44270
if (*(int32_t *)(g9 + 20) != 0) {
goto lab_0x1e442cf;
} else {
// 0x1e44277
if (*(int32_t *)(g9 + 24) == 0) {
goto lab_0x1e442cf;
} else {
int32_t v32 = *(int32_t *)g3; // 0x1e4427e
g2 = v32;
if ((*(char *)(v32 + 4 + g4) & 72) == 0) {
int32_t v33 = g6; // 0x1e442a5
if (v33 != *(int32_t *)(g9 + 40)) {
goto lab_0x1e442b7;
} else {
// 0x1e442ab
if (*(char *)(g9 + 19) != 10) {
goto lab_0x1e442b7;
} else {
// 0x1e442b2
*(char *)v33 = 10;
// 0x1e442d2
g6++;
goto lab_0x1e442d3;
}
}
} else {
char * v34 = (char *)g6; // 0x1e44294
if (*(char *)(g9 + 19) != 10) {
// 0x1e44294
*v34 = 13;
g6++;
unsigned char v35 = *(char *)(g9 + 19); // 0x1e44298
g2 = g2 & -256 | (int32_t)v35;
int32_t v36 = *(int32_t *)g3; // 0x1e4429c
g5 = v36;
*(char *)(v36 + 5 + g4) = v35;
goto lab_0x1e442d3;
} else {
// 0x1e4428f
*v34 = 10;
// 0x1e442d2
g6++;
goto lab_0x1e442d3;
}
}
}
}
}
} else {
// 0x1e44211
g8 = v26 + 1;
*(char *)g6 = v27;
// 0x1e442d2
g6++;
goto lab_0x1e442d3;
}
}
}
}
lab_0x1e442f2:
// 0x1e442f2
*(int32_t *)(g9 + 20) = g6 - *(int32_t *)(g9 + 40);
goto lab_0x1e442fa;
}