Function at 0x401344
Capabilities:
Check if file exists
Check mutex on windows
Create process on windows
Delete file
Get common file path
Get file attributes
Read .ini file
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x614
push ebx
push esi
lea eax, [ebp - 0x3bc]
push edi
mov esi, 0x104
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x2b8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [ebp + 8]
lea eax, [ebp - 0x3bc]
push eax
lea eax, [ebp - 0x1b4]
push str._s_suninstime.dll
push eax
call fcn.004020d0
add esp, 0x10
lea eax, [ebp - 0x1b4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4013b2
push 0x10
push 0x409210
push 0x4091f8
jmp 0x401542
push dword [ebp + 8]
lea eax, [ebp - 0x4e8]
push str.mutex_sinstar2__s
push eax
call fcn.004020d0
add esp, 0xc
lea eax, [ebp - 0x4e8]
xor esi, esi
push eax
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
cmp edi, esi
jne 0x4013f0
push esi
push 0x4091e0
push str.mutex_create_error
jmp 0x401542
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push edi
jne 0x4014b8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0x409210
push 0x21
push ebx
push 0x409198
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 1
jne 0x40154f
push 0xf
xor eax, eax
pop ecx
lea edi, [ebp - 0xa8]
mov dword [ebp - 0xb0], 0x44
mov dword [ebp - 0xac], esi
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x14]
mov dword [ebp - 0x18], esi
stosd dword es:[edi], eax
push dword [ebp + 8]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x1b4]
push str.findcaller.exe__s_s.ime
push eax
call fcn.004020d0
add esp, 0x10
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xb0]
push eax
push esi
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x1b4]
push esi
push eax
push str.findcaller.exe
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4014ab
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x18]
call esi
jmp 0x40154f
push 0x10
push ebx
push 0x40915c
jmp 0x401542
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, 0x409210
push 0x21
push ebx
push 0x40914c
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
je 0x40154f
push 0x10
xor eax, eax
pop ecx
lea edi, [ebp - 0x68]
push dword [ebp + 8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1b4]
mov dword [ebp - 0x6c], 0x44
push eax
lea eax, [ebp - 0x614]
push str._s__c__s.ime
push eax
mov dword [ebp - 0x40], esi
mov word [ebp - 0x3c], si
call fcn.004020d0
add esp, 0x10
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x6c]
push eax
push esi
push esi
push 0x200
push esi
push esi
lea eax, [ebp - 0x614]
push esi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401556
push esi
push 0x4091e0
push str.Create_Process_Error
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x4016cb
push 0xffffffffffffffff
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp + 8]
lea eax, [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x1b4]
push str._s_s.ime
push eax
call fcn.004020d0
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x10
lea eax, [ebp - 0x1b4]
push eax
call edi
lea eax, [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x1b4]
push str._s_sinstar2.ini
push eax
call fcn.004020d0
lea eax, [ebp - 0x1b4]
push eax
push dword [ebp + 8]
push str.client
call section..text
push dword [ebp + 8]
lea eax, [ebp - 0x3bc]
push eax
lea eax, [ebp - 0x1b4]
push str._s_s_register.log
push eax
call fcn.004020d0
add esp, 0x28
lea eax, [ebp - 0x1b4]
push eax
push esi
push str.mysvr
push 0x4090ec
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x4016b4
push str._setoutsoft_comm_map_file
push esi
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
cmp eax, esi
mov dword [ebp - 8], eax
je 0x401687
push esi
push esi
push esi
push 6
push eax
mov dword [ebp + 8], esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push 4
mov dword [ebp - 4], eax
push eax
lea eax, [ebp + 8]
push eax
call fcn.004021e0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x401687
lea eax, [ebp - 4]
mov dword [ebp - 4], esi
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push esi
push 0x12
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [ebp - 4], esi
je 0x40167c
push 0xffffffffffffffff
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x401687
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x1b4]
push eax
call edi
lea eax, [ebp - 0x2b8]
push eax
lea eax, [ebp - 0x1b4]
push str._s_sinstar2.ini
push eax
call fcn.004020d0
add esp, 0xc
lea eax, [ebp - 0x1b4]
push eax
call edi
push esi
push ebx
push 0x4090c4
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret