// // sub_18003C5E0 from 0x18003c5e0 to 0x18003c79c (444 bytes) // // 4 xrefs: // > sub_18003C5D0 @ 0x18003c5d0 // > @ 0x18018082c // > @ 0x18018083c // > @ 0x1801f7dac // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 __fastcall sub_18003C5E0(__int64 a1, __int64 a2, unsigned int a3, int a4) { __int64 v4; // rbx unsigned int v6; // r8d __int64 result; // rax _DWORD *v8; // r9 unsigned int v9; // r8d int v10; // ecx unsigned int v11; // ecx __int16 v12; // r11 int v13; // edx unsigned int v14; // r10d unsigned __int64 v15; // r9 unsigned __int64 v16; // r10 unsigned __int64 v17; // rax unsigned int v18; // ebx unsigned int v19; // r8d unsigned int v20; // ecx unsigned int v21[4]; // [rsp+20h] [rbp-1038h] BYREF char v22[4096]; // [rsp+30h] [rbp-1028h] BYREF v4 = a3; *(_DWORD *)(a1 + 572) = a3; v6 = 0; if ( a4 == 8 ) return sub_1800B3990(*(_QWORD *)(a1 + 368), (unsigned int)(v4 + *(_DWORD *)(a1 + 272)), 0); if ( (_DWORD)v4 ) { v8 = *(_DWORD **)(a1 + 8); v9 = v8[5]; if ( v8[2] != 1 ) { if ( v8[2] == 2 ) { v10 = 2; goto LABEL_12; } if ( v8[2] == 3 ) { v10 = 3; goto LABEL_12; } if ( (unsigned int)(v8[2] - 4) <= 1 ) { v10 = 4; LABEL_12: v11 = v8[3] * v10; v12 = **(_WORD **)(a1 + 616); if ( ((v12 - 1) & 0xFFFD) != 0 || !v11 ) { v14 = *(_DWORD *)(a1 + 568); if ( !v14 ) { LABEL_18: v15 = (unsigned int)v8[6]; v16 = v9; v17 = (unsigned __int64)v9 * v4 / v15; v6 = v17; if ( ((v12 - 1) & 0xFFFD) == 0 && v11 || (v11 = *(_DWORD *)(a1 + 568)) != 0 ) v6 = v17 - (unsigned int)v17 % v11; *(_DWORD *)(a1 + 572) = v15 * v6 / v16; goto LABEL_23; } v13 = v9 % v14; } else { v13 = v9 % v11; } v9 -= v13; goto LABEL_18; } } v10 = 1; goto LABEL_12; } LABEL_23: result = sub_1800B3990(*(_QWORD *)(a1 + 368), v6 + *(_DWORD *)(a1 + 272), 0); if ( !(_DWORD)result ) { if ( *(_QWORD *)(a1 + 320) && (v18 = v4 - *(_DWORD *)(a1 + 572)) != 0 ) { while ( 1 ) { v19 = 1000; v21[0] = 0; if ( v18 < 0x3E8 ) v19 = v18; result = sub_180012680(a1, (__int64)v22, v19, v21); v20 = v21[0]; *(_DWORD *)(a1 + 572) += v21[0]; if ( (_DWORD)result ) break; if ( v18 < v20 ) v18 = 0; else v18 -= v20; if ( !v18 ) return 0; } } else { return 0; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source