// WARNING: Variable defined which should be unmapped: var_c8h
// WARNING: Variable defined which should be unmapped: lpMsg
// WARNING: Variable defined which should be unmapped: var_c0h
// WARNING: Variable defined which should be unmapped: var_b0h
// WARNING: Variable defined which should be unmapped: var_9ch
// WARNING: Variable defined which should be unmapped: var_a0h
// WARNING: Could not reconcile some variable overlaps
// WARNING: [rz-ghidra] Failed to match type unknown_t ** for variable var_5ch to Decompiler type: Unknown type
// identifier WNDCLASSW
// WARNING: [rz-ghidra] Failed to match type unknown_t ** for variable var_a4h to Decompiler type: Unknown type
// identifier WNDCLASSW
// WARNING: [rz-ghidra] Failed to match type unknown_t * for variable lpWndClass to Decompiler type: Unknown type
// identifier WNDCLASSW
// WARNING: [rz-ghidra] Failed to match type unknown_t * for variable lpMsg to Decompiler type: Unknown type identifier
// MSG
void __cdecl main(char **argv)
{
int16_t iVar1;
int32_t iVar2;
int32_t iVar3;
int32_t var_c8h;
undefined4 lpMsg;
int32_t var_c0h;
int32_t arg_4h;
int32_t var_b0h;
code *pcStack_ac;
undefined4 var_a4h;
int32_t var_a0h;
int32_t var_9ch;
int32_t var_98h;
int32_t var_94h;
int32_t var_90h;
undefined4 *puStack_8c;
int32_t var_88h;
int32_t var_80h;
undefined8 uStack_78;
undefined4 uStack_70;
undefined4 uStack_68;
undefined4 uStack_64;
LPCWSTR lpClassName;
undefined4 var_5ch;
undefined4 uStack_58;
undefined4 uStack_54;
undefined4 uStack_50;
undefined4 lpWndClass;
undefined2 uStack_48;
int32_t var_3ch;
int32_t var_24h;
int32_t var_20h;
int32_t var_18h;
uint32_t uStack_14;
int32_t var_8h;
uStack_14 = _data.0044106c ^ (uint32_t)&var_98h;
pcStack_ac = (code *)0x1f0001;
var_b0h = 0x403831;
var_b0h = (*KERNEL32.dll_OpenMutexW)();
if (var_b0h != 0) {
(*KERNEL32.dll_CloseHandle)();
pcStack_ac = (code *)0x40384e;
fcn.004127b4(0);
return;
}
var_b0h = (int32_t)str.GeyZoneUpdateCheck;
arg_4h = 1;
iVar2 = (*KERNEL32.dll_CreateMutexW)(0);
iVar3 = (*KERNEL32.dll_GetLastError)();
if (iVar2 != 0) {
if (iVar3 == 0xb7) {
(*KERNEL32.dll_CloseHandle)(iVar2);
fcn.004127b4(arg_4h);
return;
}
fcn.00402d70();
fcn.00403070();
uStack_48 = 0;
puStack_8c = &uStack_68;
uStack_68 = 0x6c0043;
uStack_64 = 0x700069;
lpClassName = (LPCWSTR)0x6f0062;
var_5ch = 0x720061;
var_b0h = 0;
uStack_58 = 0x570064;
uStack_54 = 0x740061;
uStack_50 = 0x680063;
lpWndClass = 0x720065;
pcStack_ac = data.00403580;
_var_94h = 0;
iVar1 = (*USER32.dll_RegisterClassW)(&var_b0h);
if ((iVar1 != 0) &&
(iVar2 = (*USER32.dll_CreateWindowExW)(0, &uStack_68, L"Clipboard Watcher", 0, 0, 0, 0, 0, 0, 0, argv, 0),
iVar2 != 0)) {
uStack_70 = 0;
_var_88h = ZEXT816(0);
uStack_78 = 0;
iVar2 = (*USER32.dll_GetMessageW)(&var_88h, 0, 0, 0);
while (iVar2 != 0) {
(*USER32.dll_TranslateMessage)(&var_88h);
(*USER32.dll_DispatchMessageW)(&puStack_8c);
iVar2 = (*USER32.dll_GetMessageW)(&var_90h, 0, 0, 0);
}
}
}
fcn.004127b4(var_b0h);
return;
}