Function at 0x40157c
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4e0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
xor esi, esi
push esi
call dword [sym.imp.ole32.dll_CoInitialize]
push dword [ebp + 8]
mov edi, 0x407c28
mov dword [0x407c98], 0x406050
mov dword [0x4077f8], edi
push 0x407cb0
push edi
mov dword [0x407c28], 0x84
mov dword [0x407c8c], 0x300
call fcn.004019f7
push 0x406144
push 1
pop ebx
mov dword [ebp + 8], esi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, esi
mov dword [ebp - 0x28], eax
je 0x4019df
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4019d6
xor eax, eax
lea edi, [ebp - 8]
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
stosd dword es:[edi], eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
call fcn.00402d2b
test eax, eax
je 0x40166c
call fcn.004043dd
test eax, eax
je 0x40166c
mov edi, 0x407824
push 0x400
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40166c
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
dec eax
js 0x401670
cmp byte [eax + 0x407824], 0x5c
jne 0x40163e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
and byte [eax + 0x407824], 0
push 0x406160
push edi
call ebx
push 0x406164
push edi
call ebx
push 1
pop ebx
jmp 0x401670
or dword [ebp + 8], 0xffffffff
call fcn.004026ee
cmp dword [ebp + 8], esi
jne 0x4018ec
lea eax, [ebp - 4]
push eax
call fcn.00402923
test eax, eax
pop ecx
je 0x4018ec
push 0x4060a0
push 0x406170
push dword [ebp - 4]
call fcn.00402a74
add esp, 0xc
test eax, eax
je 0x4018ec
push 0x407cd4
push 0x40617c
push dword [ebp - 4]
call fcn.00402a74
add esp, 0xc
test eax, eax
je 0x4018ec
lea eax, [ebp - 0x3c]
push eax
call fcn.00403452
test eax, eax
pop ecx
jge 0x4016ef
lea eax, [ebp - 0x4e0]
push 0x400
push eax
call fcn.004038ae
pop ecx
test eax, eax
pop ecx
jl 0x4016f4
call fcn.004014b7
mov edi, 0x407800
push edi
push dword [ebp - 4]
call fcn.004013b0
pop ecx
test eax, eax
pop ecx
je 0x40170e
mov dword [0x407ce0], edi
push esi
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [ebp - 0xc], eax
call fcn.004033b6
cmp dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
je 0x4018e5
cmp eax, esi
je 0x4018e5
push ebx
push dword [ebp - 0xc]
push 0xf
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegNotifyChangeKeyValue]
test eax, eax
je 0x401752
push 0x406218
jmp 0x4018f1
push dword [ebp - 4]
call fcn.004010a3
push dword [ebp - 4]
call fcn.0040142a
mov ebx, dword [sym.imp.MSVCRT.dll_localtime]
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push 0x40623c
push dword [ebp - 4]
call fcn.00402a74
add esp, 0xc
test eax, eax
je 0x4018f7
cmp dword [ebp - 0x14], 1
jne 0x4018f7
lea eax, [ebp - 0x14]
push eax
push 0x406250
push dword [ebp - 4]
call fcn.00402a74
add esp, 0xc
test eax, eax
je 0x4018f7
cmp dword [ebp - 0x14], 1
jne 0x4018f7
cmp dword [ebp - 0x10], esi
je 0x4017cf
mov dword [ebp - 0x10], esi
call fcn.004014b7
push dword [ebp - 4]
call fcn.004010a3
pop ecx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.MSVCRT.dll_time]
lea eax, [ebp - 0x18]
push eax
call ebx
push 9
mov esi, eax
pop ecx
lea edi, [ebp - 0x60]
lea eax, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.MSVCRT.dll_mktime]
mov esi, dword [0x407cd8]
mov dword [ebp - 0x18], eax
sub esi, eax
call fcn.0040272d
xor edx, edx
mov ecx, 0xe10
div ecx
push 0x407cd8
add esi, edx
call ebx
mov dword [ebp - 0x2c], eax
mov eax, esi
xor edx, edx
mov edi, 0xe10
div edi
mov ecx, dword [0x407cd8]
add esp, 0x10
sub ecx, dword [ebp - 0x18]
push esi
push eax
mov eax, ecx
cdq
idiv edi
push eax
push ecx
push dword [ebp - 0x2c]
call dword [sym.imp.MSVCRT.dll_asctime]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
push eax
lea eax, [ebp - 0xe0]
push 0x406268
push eax
call edi
lea eax, [ebp - 0xe0]
push eax
call fcn.004022a8
push 0x407cdc
call ebx
push eax
call dword [sym.imp.MSVCRT.dll_asctime]
push eax
lea eax, [ebp - 0xe0]
push 0x4062c0
push eax
call edi
lea eax, [ebp - 0xe0]
push eax
call fcn.004022a8
imul esi, esi, 0x3e8
xor edi, edi
add esp, 0x38
cmp esi, edi
ja 0x4018a0
mov esi, 0x2932e00
push esi
lea eax, [ebp - 0xc]
push edi
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, edi
je 0x401900
dec eax
je 0x401992
sub eax, 0x80
je 0x401992
sub eax, 0x81
jne 0x40198b
push 0x4062d8
mov dword [ebp - 0x10], 1
call fcn.004022a8
jmp 0x40197e
push 0x406200
jmp 0x4018f1
push 0x40618c
call fcn.004022a8
pop ecx
or dword [ebp + 8], 0xffffffff
jmp 0x40199f
push 0x4062ec
call fcn.004022a8
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], edi
push eax
push 0x406304
push dword [ebp - 4]
mov dword [ebp - 0x24], 1
call fcn.00402a74
add esp, 0x10
test eax, eax
je 0x401944
lea eax, [ebp - 0x20]
push eax
push 0x406310
push dword [ebp - 4]
call fcn.00402a74
add esp, 0xc
test eax, eax
jne 0x401947
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp eax, dword [0x4060a0]
jne 0x40196b
cmp ecx, dword [0x407cd4]
jne 0x40196b
push dword [ebp - 4]
call fcn.0040142a
pop ecx
mov dword [ebp - 0x10], eax
jmp 0x40197f
push dword [ebp - 4]
mov dword [0x4060a0], eax
mov dword [0x407cd4], ecx
call fcn.004010a3
pop ecx
cmp dword [ebp - 0x1c], edi
je 0x40199d
xor esi, esi
jmp 0x40176d
push 0x40633c
jmp 0x401997
push 0x406320
call fcn.004022a8
pop ecx
xor esi, esi
cmp dword [ebp - 4], esi
je 0x4019ad
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0xc], esi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4019bd
push dword [ebp - 0xc]
call edi
cmp dword [ebp - 8], esi
je 0x4019c7
push dword [ebp - 8]
call edi
push dword [ebp - 0x28]
call edi
mov esi, dword [ebp + 8]
mov edi, 0x407c28
jmp 0x4019e2
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
pop esi
push edi
call fcn.00401a7a
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10