Function at 0x498540
Capabilities:
Connect pipe
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x636f5b
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x6cd400]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [ebp + 0xc]
lea ebx, [esi + 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esi + 0x39], 0
je 0x498594
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 5
jmp 0x498958
lea ecx, [esi + 0x44]
call fcn.00499020
push 0
push 0x676964
push dword [edi + 0x10]
mov ecx, edi
push 0
call fcn.004048b0
test eax, eax
jne 0x4985c4
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffff9
jmp 0x498958
push edi
lea eax, [ebp - 0x58]
push 0x68ddfc
push eax
call fcn.0040d7c0
add esp, 0xc
mov edi, eax
mov dword [ebp - 4], 0
cmp esi, edi
je 0x49860e
cmp dword [esi + 0x14], 8
jb 0x4985f3
push dword [esi]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
push edi
mov ecx, esi
mov word [esi], ax
call fcn.00403760
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x44], 8
jb 0x498626
push dword [ebp - 0x58]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov word [ebp - 0x58], ax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
dec eax
je 0x49876d
dec eax
jne 0x4985b3
mov dword [esi + 0x18], 2
lea edi, [eax + 1]
push 0x68de10
lea eax, [ebp - 0x28]
push esi
push eax
call fcn.00404680
add esp, 0xc
mov dword [ebp - 4], 3
cmp dword [eax + 0x14], 8
jb 0x498676
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 8
mov ebx, eax
jb 0x4986a9
push dword [ebp - 0x28]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp ebx, 0xffffffff
je 0x4986c6
test ebx, ebx
jne 0x4986e9
cmp edi, 0x57e40
je 0x498931
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0x57e40
jle 0x498655
jmp 0x4986ec
mov dword [esi + 0x70], ebx
push 0x68ddf4
lea eax, [ebp - 0x40]
push esi
push eax
call fcn.00404680
add esp, 0xc
mov dword [ebp - 4], 4
cmp dword [eax + 0x14], 8
jb 0x49870d
mov eax, dword [eax]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x2c], 8
mov edi, eax
jb 0x498740
push dword [ebp - 0x40]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
test edi, edi
je 0x49892a
cmp edi, 0xffffffff
je 0x49892a
mov dword [esi + 0x74], edi
jmp 0x4988f5
push 0x68de10
lea eax, [ebp - 0x70]
push esi
push eax
mov dword [esi + 0x18], 1
call fcn.00404680
add esp, 0xc
mov dword [ebp - 4], 1
cmp dword [eax + 0x14], 8
jb 0x498795
mov eax, dword [eax]
push 0
push 0
push 0x5000
push 0x5000
push 1
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x5c], 8
mov edi, eax
jb 0x4987ca
push dword [ebp - 0x70]
call fcn.004c56c2
add esp, 4
xor eax, eax
mov dword [ebp - 0x5c], 7
mov dword [ebp - 0x60], 0
mov word [ebp - 0x70], ax
cmp edi, 0xffffffff
je 0x49894c
test edi, edi
je 0x49894c
push 0x68ddf4
lea eax, [ebp - 0x88]
push esi
push eax
mov dword [esi + 0x74], edi
call fcn.00404680
add esp, 0xc
mov dword [ebp - 4], 2
cmp dword [eax + 0x14], 8
jb 0x498816
mov eax, dword [eax]
push 0
push 0
push 0x5000
push 0x5000
push 1
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
lea ecx, [ebp - 0x88]
mov edi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.00403680
cmp edi, 0xffffffff
je 0x498945
test edi, edi
je 0x498945
mov dword [esi + 0x70], edi
xor edi, edi
jmp 0x498860
push 0
push dword [esi + 0x70]
inc edi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x498877
mov ebx, 1
jmp 0x498887
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x217
sete bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x4988a2
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0x57e40
jl 0x498860
inc edi
cmp edi, 0x57e41
jne 0x4988c5
mov ecx, esi
call fcn.00498c30
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 4
jmp 0x498958
push 0
push dword [esi + 0x74]
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4988db
mov ebx, 1
jmp 0x4988eb
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
cmp eax, 0x217
sete bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x49892a
lea eax, [ebp - 0x8c]
push eax
push 0
push esi
push 0x498150
push 0
mov byte [esi + 0x39], 1
push 0
mov byte [esi + 0x38], 1
mov dword [ebp - 0x8c], 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x498937
mov byte [esi + 0x38], al
mov ecx, esi
call fcn.00498c30
lea eax, [esi + 0x20]
push eax
jmp 0x49894d
lea eax, [esi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x498958
mov ecx, esi
call fcn.00498c30
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0xfffffffa
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005e96ad
mov esp, ebp
pop ebp
ret 0x18