Function at 0x4027d0
Capabilities:
Check mutex on windows
Create process on windows

Disassembly:
sub esp, 0x15c
push ebx
push ebp
mov ebp, dword [esp + 0x168]
mov ebx, 0x20
push esi
mov esi, dword [sym.imp.MSVCRT.dll_strchr]
push edi
mov byte [esp + 0x12], 0x30
mov byte [ebp + 0xfe], bl
mov byte [ebp + 0xff], bl
mov eax, ebp
push ebx
push eax
call esi
add esp, 8
test eax, eax
je 0x402812
mov cl, byte [eax + 1]
inc eax
cmp cl, bl
jne 0x4027ff
mov byte [eax - 1], 0
mov al, byte [0x42d924]
test al, al
je 0x402838
mov eax, dword [0x42d920]
mov ebx, dword [sym.imp.MSVCRT.dll_fprintf]
push ebp
push str.Trying_to_start__s_n
push eax
call ebx
add esp, 0xc
jmp 0x40283e
mov ebx, dword [sym.imp.MSVCRT.dll_fprintf]
push str.SAPLPD
push ebp
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
neg eax
sbb eax, eax
neg eax
test al, al
mov byte [esp + 0x13], al
je 0x402a3d
mov edi, 0x41517c
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [0x430558]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [0x42d924]
test al, al
je 0x4028ec
mov eax, dword [0x42d920]
push ebp
push str.Trying_to_start__s_n
push eax
call ebx
mov al, byte [0x42d924]
add esp, 0xc
test al, al
je 0x4028ec
call fcn.00402760
mov ecx, dword [0x42d920]
push eax
push str._s:_Setting_lock_for_SAPLPD_n
push ecx
call ebx
add esp, 0xc
push str.SAPLPD.MUTEX
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
jne 0x402928
mov al, byte [0x42d924]
test al, al
je 0x40291b
mov edx, dword [0x42d920]
push str.Could_not_create_mutex__n
push edx
call ebx
add esp, 8
mov al, 0x31
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x402a41
mov al, byte [0x42d924]
test al, al
je 0x402952
mov eax, dword [0x42d920]
push str.SAPLPD_already_starting..._n
push eax
call ebx
add esp, 8
xor esi, esi
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [0x42d924]
test al, al
je 0x402979
mov ecx, dword [0x42d920]
push str.Try_connecting_again_n
push ecx
call ebx
add esp, 8
mov eax, dword [0x430558]
lea edx, [esp + 0x14]
push edx
push 0x2710
push eax
push str.127.0.0.1
call fcn.0040554a
add esp, 0x10
test eax, eax
je 0x4029a5
inc esi
cmp esi, 2
jl 0x402954
jmp 0x402a41
mov al, byte [0x42d924]
test al, al
je 0x4029bf
mov ecx, dword [0x42d920]
push str.Connected_after_wait_n
push ecx
call ebx
add esp, 8
mov edx, dword [esp + 0x14]
push edx
call fcn.004059c6
add esp, 4
test eax, eax
je 0x4029eb
mov cl, byte [0x42d924]
test cl, cl
je 0x4029eb
push eax
mov eax, dword [0x42d920]
push str.NiCloseHandle__test__failed_with_code___d_n
push eax
call ebx
add esp, 0xc
mov al, byte [0x42d924]
test al, al
je 0x402a0b
call fcn.00402760
mov ecx, dword [0x42d920]
push eax
push str._s:_Releasing_lock_n
push ecx
call ebx
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x402a30
mov al, byte [0x42d924]
test al, al
je 0x402a30
mov edx, dword [0x42d920]
push str.Close_Mutex_failed_n
push edx
call ebx
add esp, 8
mov al, 0x30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret
mov edi, dword [esp + 0x14]
lea ecx, [esp + 0x5c]
lea edx, [esp + 0x18]
xor eax, eax
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
push eax
push ebp
push eax
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x6c], eax
mov word [esp + 0x72], ax
mov dword [esp + 0x74], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x402acb
mov al, byte [0x42d924]
test al, al
je 0x402ac7
mov eax, dword [0x42d920]
push ebp
push str.Could_not_start_process__s_n
push eax
call ebx
mov al, byte [0x42d924]
add esp, 0xc
test al, al
je 0x402ac7
lea ecx, [esp + 0x6c]
push 0x100
push ecx
call fcn.00402730
mov edx, dword [0x42d920]
add esp, 8
push eax
push str.Error_is__s_n
push edx
call ebx
add esp, 0xc
mov bl, 0x31
jmp 0x402acf
mov bl, byte [esp + 0x12]
mov al, byte [esp + 0x13]
test al, al
je 0x402b2e
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [0x42d924]
test al, al
je 0x402b05
call fcn.00402760
push eax
mov eax, dword [0x42d920]
push str._s:_Releasing_lock_n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x402b2e
mov al, byte [0x42d924]
test al, al
je 0x402b2e
mov ecx, dword [0x42d920]
push str.Close_Mutex_failed_n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
add esp, 0x15c
ret