Function at 0x402e30
Capabilities:
Connect pipe
Create pipe
Create thread
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41c236
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
cmp ecx, 1
jbe 0x402e8e
mov edx, dword [edx + 4]
test edx, edx
jne 0x402e6e
xor ecx, ecx
jmp 0x402e82
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x402e73
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, 0x427910
call fcn.004023f0
push dword [0x427910]
push str.SvcStub__s
call fcn.00403530
add esp, 8
mov dword [0x426964], 0
push 1
lea eax, [ebp - 0x3c]
push eax
mov esi, dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
call esi
push 0
push 0
push 1
lea eax, [ebp - 0x3c]
push eax
mov edi, dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
call edi
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
mov dword [ebp - 0x5c], 0
xorps xmm0, xmm0
movq qword [ebp - 0x58], xmm0
mov dword [ebp - 0x5c], 0xc
mov dword [ebp - 0x54], 1
lea eax, [ebp - 0x28]
mov dword [ebp - 0x58], eax
push 1
push eax
call esi
push 0
push 0
push 1
lea eax, [ebp - 0x28]
push eax
call edi
mov dword [ebp - 0x64], 0x403a10
lea eax, [ebp - 0x5c]
push eax
push 0
push 0x200
push 0
push 0xff
push 0
push 0x40000001
push str..pipeKelStartup
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x6c], ecx
movzx ecx, byte [ebp - 0x60]
mov byte [ebp - 0x68], cl
mov dword [ebp - 0x44], eax
push 0xc
call fcn.0040510f
add esp, 4
mov edx, eax
mov dword [ebp - 0x48], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x78], ecx
movzx ecx, byte [ebp - 0x68]
mov byte [ebp - 0x74], cl
mov dword [edx], vtable.Razer_Lib::ResourceFinalizer_Base_void__.0
mov dword [edx], vtable.Razer_Lib::ResourceFinalizer_void___class_std::_Binder_void__void____cdecl___void____struct_std::_Ph_1__const___.0
mov eax, dword [ebp - 0x78]
mov dword [edx + 4], eax
mov al, byte [ebp - 0x74]
mov byte [edx + 8], al
mov byte [ebp - 4], 1
mov dword [ebp - 0x40], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x40], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x44]
call fcn.00403b70
cmp dword [0x427908], 0
je 0x402fcd
mov ecx, 0x427908
call fcn.00403b70
sub esp, 8
mov eax, esp
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [eax], ecx
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push eax
call fcn.00403e00
cmp dword [ebp - 0x50], 0xffffffff
je 0x403360
cmp dword [0x427908], 0
je 0x403360
mov dword [ebp - 4], 0
mov dword [0x4278d4], 4
mov dword [0x4278dc], 0
mov dword [0x4278e8], 0
mov dword [0x4278d8], 1
mov dword [0x4278e4], 0
push 0x4278d0
push dword [0x4278cc]
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov dword [ebp - 0x70], 0
push 0x200
lea ecx, [ebp - 0x5c]
call fcn.00403a70
mov byte [ebp - 4], 5
mov ecx, 1
mov edx, 0x426964
mov eax, ecx
lock cmpxchg dword [edx], ecx
cmp eax, 1
je 0x4032d9
mov esi, dword [ebp - 0x5c]
xor edi, edi
mov dword [ebp - 0x28], edi
xorps xmm0, xmm0
movups xmmword [ebp - 0x24], xmm0
mov eax, dword [0x427908]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x4030dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x4030cf
push 0x64
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4030e2
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
jmp 0x4030dd
cmp eax, 0x217
je 0x4030dd
cmp eax, 0xe8
jne 0x4030e2
mov edi, 1
mov ecx, 1
mov eax, ecx
mov edx, 0x426964
lock cmpxchg dword [edx], ecx
cmp eax, 1
je 0x4032d9
test edi, edi
je 0x4032af
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edi, dword [ebp - 0x58]
sub edi, esi
inc edi
shr edi, 1
mov eax, esi
xor ecx, ecx
mov edx, edi
cmp esi, dword [ebp - 0x58]
cmova edx, ecx
test edx, edx
je 0x403134
xor esi, esi
mov word [eax], si
lea eax, [eax + 2]
inc ecx
cmp ecx, edx
mov esi, dword [ebp - 0x5c]
jne 0x403124
push 0
lea eax, [ebp - 0x70]
push eax
push 0x200
push esi
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40328b
push esi
push str.Launch_main_with__s
call fcn.00403530
add esp, 8
lea eax, [ebp - 0x40]
mov dword [ebp - 0x48], eax
call fcn.00401620
mov ecx, eax
test ecx, ecx
je 0x403281
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 8
mov dword [ebp - 0x44], 2
push 0
push 0x422b9c
lea ecx, [ebp - 0x40]
call fcn.004023f0
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4031a0
sub ecx, edx
sar ecx, 1
je 0x4031de
mov dword [ebp - 0x44], 3
test esi, esi
jne 0x4031c0
xor eax, eax
jmp 0x4031d4
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4031c5
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [ebp - 0x40]
call fcn.004023f0
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push str.Launch_main_with_1____d___s_
call fcn.00403530
push 0
push 0
lea eax, [ebp - 0x44]
push eax
push 0x403620
push 0
push 0
call fcn.00409dd9
mov dword [ebp - 0x64], eax
push 0xc
call fcn.0040510f
add esp, 0x28
mov dword [ebp - 0x68], eax
mov byte [ebp - 4], 9
mov dword [eax], vtable.Razer_Lib::ResourceFinalizer_void___class_std::_Binder_int__int____stdcall___void____struct_std::_Ph_1__const___.0
mov ecx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [eax + 4], ecx
mov ecx, dword [ebp - 0x60]
mov byte [eax + 8], cl
mov byte [ebp - 4], 8
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 0xa
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x64]
call fcn.00403b70
mov byte [ebp - 4], 5
lea eax, [ebp - 0x40]
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 5
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403114
mov ecx, dword [edx]
mov eax, dword [ecx]
push edx
call dword [eax + 4]
jmp 0x403114
push 0x80004005
call fcn.00401360
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4032af
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.NamePipe_Message_ReadFile_Error:__08x
call fcn.00403530
add esp, 8
jmp 0x403114
push dword [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
mov eax, ecx
mov edx, 0x426964
lock cmpxchg dword [edx], ecx
cmp eax, 1
jne 0x403083
push str.NamePipe_Message_Thread_Stop
call fcn.00403530
add esp, 4
mov dword [0x4278d4], 1
mov dword [0x4278dc], 0
mov dword [0x4278e8], 0
mov dword [0x4278d8], 1
mov dword [0x4278e4], 0
push 0x4278d0
push dword [0x4278cc]
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c]
call fcn.00403d00
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x50]
call fcn.00403b70
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00404c0b
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_Named_Pipe_Error___08x
call fcn.00403530
add esp, 8
mov dword [ebp - 0x84], vtable.std::exception.0
xorps xmm0, xmm0
movq qword [ebp - 0x80], xmm0
push 0x424d78
lea eax, [ebp - 0x84]
push eax
call fcn.004061e1
push str.Create_Named_Pipe_Exception
call fcn.00403530
add esp, 4
mov eax, 0x403335
ret