Function at 0x402060
Capabilities:
Accept command line arguments
Check mutex and terminate process on windows
Check mutex on windows
Create directory
Create thread
Get common file path
Set file attributes
Terminate process

Disassembly:
sub esp, 0x634
push 0x4013d8
call fcn.00401480
add esp, 4
test eax, eax
je 0x402094
push 0
push 0
push 0
push 0x401540
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
push ebp
push esi
push edi
call dword [sym.imp.USER32.dll_GetInputState]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push 0
push 0
lea eax, [esp + 0x2c]
push 0
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x40]
push 0x104
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea edx, [esp + 0x40]
push 0x4013b4
push edx
lea eax, [esp + 0x48]
push 0x4011f8
push eax
mov byte [esp + 0x53], 0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x40]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea edx, [esp + 0x40]
push 2
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x4013ac
mov esi, dword [esp + 0x64c]
push esi
call fcn.00401f90
add esp, 8
mov dword [esp + 0x1c], eax
test eax, eax
je 0x402354
push 0x4013a4
push esi
call fcn.00401f90
mov esi, eax
add esp, 8
test esi, esi
je 0x402354
push 0x7c
push esi
call sub.MSVCRT.dll_strchr
push 0x24
push esi
mov edi, eax
call sub.MSVCRT.dll_strchr
push 0x40
push esi
mov ebp, eax
call sub.MSVCRT.dll_strchr
mov ebx, eax
push 0x23
push esi
mov dword [esp + 0x30], ebx
call sub.MSVCRT.dll_strchr
add esp, 0x20
mov dword [esp + 0x14], eax
test edi, edi
je 0x402354
test ebp, ebp
je 0x402354
test ebx, ebx
je 0x402354
test eax, eax
je 0x402354
add esi, 6
mov byte [edi], 0
push esi
call fcn.00401e80
inc edi
mov ebx, eax
push edi
call fcn.00401e80
mov byte [ebp], 0
inc ebp
push ebp
mov dword [esp + 0x24], eax
call fcn.00401e80
mov ebp, eax
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea esi, [eax + 1]
mov eax, dword [esp + 0x14]
test ebx, ebx
lea edi, [eax + 1]
mov dword [esp + 0x20], esi
mov byte [eax], 0
mov dword [esp + 0x14], edi
je 0x402354
mov eax, dword [esp + 0x18]
test eax, eax
je 0x402354
test ebp, ebp
je 0x402354
test esi, esi
je 0x402354
test edi, edi
je 0x402354
push 0x401394
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call sub.MSVCRT.dll_strstr
add esp, 8
test eax, eax
jne 0x40226f
mov ecx, dword [esp + 0x1c]
push ecx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x402354
cmp eax, 5
je 0x402354
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40227a
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x401710
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push edi
push esi
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ebp
push ecx
push edx
push ebx
call fcn.00401be0
mov esi, eax
add esp, 0x18
test esi, esi
je 0x40234c
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x140]
push 0x104
rep stosd dword es:[edi], eax
lea eax, [esp + 0x144]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push esi
lea ecx, [esp + 0x248]
push 0x40129c
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x140]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x148]
push eax
push 1
lea ecx, [esp + 0x254]
push 0x401384
push ecx
push 0x80000002
call fcn.00402370
push esi
call fcn.00401ee0
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push ebx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov edx, dword [esp + 0x40]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push ebp
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x50]
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x48]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x38
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x634
ret 0x10