Function at 0x4bcec0
Capabilities:
Connect pipe

Disassembly:
sub esp, 0x364
mov eax, dword [0x596fb8]
xor eax, esp
mov dword [esp + 0x360], eax
mov eax, dword [0x5982c4]
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ebx, 1
je 0x4bcf1d
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], 4
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], 0xbb8
mov dword [esp + 0x20], ebx
call edi
push esi
call fcn.004ac8f0
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], 0xc
mov dword [esp + 0x38], ebx
call fcn.004bb330
cmp eax, ebp
mov dword [esp + 0x34], eax
je 0x4bd551
lea edx, [esp + 0x15c]
push edx
or ebx, 0xffffffff
call fcn.00401210
lea esi, [esp + 0x15c]
call fcn.004bb290
mov eax, dword [esp + 0x164]
push eax
push str.createnamedpipe__S_n
call fcn.0048f080
xor edi, edi
push str.awake_n
mov dword [esp + 0x160], ebp
mov dword [esp + 0x164], ebp
mov dword [esp + 0x1c], edi
call fcn.0048f080
mov ecx, dword [0x5982c0]
add esp, 0xc
push ecx
call fcn.004ac930
test eax, eax
jne 0x4bd52e
jmp 0x4bcfb0
push 0x59828c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x5982a4]
cmp esi, ebp
je 0x4bd17e
lea esp, [esp]
mov eax, dword [esi]
cmp eax, ebp
mov dword [0x5982a4], eax
jne 0x4bcfe1
mov dword [0x5982a8], ebp
push 0x59828c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esi + 4]
push edx
push str.device_event__08x_n
call fcn.0048f080
mov eax, dword [esi + 4]
add eax, 0xffff7fff
add esp, 8
cmp eax, 5
ja case.0x4bd00e.32773
jmp dword [eax*4 + 0x4bd5fc]
mov eax, dword [esi + 8]
mov ecx, dword [eax]
mov edx, dword [eax + 4]
push ecx
push edx
push str.dbch_devicetype__d__dbch_size__d_n
call fcn.0048f080
add esp, 0xc
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd00e.32773
push eax
call fcn.004bb940
jmp case.0x4bd00e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd00e.32773
push eax
call fcn.004bb1e0
jmp case.0x4bd00e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd00e.32773
push 0x10
add eax, 0x14
push 0x550560
push eax
call fcn.004aed70
test eax, eax
je 0x4bd098
push str.GUID_IO_VOLUME_DISMOUNT_n
call fcn.0048f080
mov eax, dword [esi + 8]
add esp, 4
push eax
call fcn.004bb940
jmp case.0x4bd00e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x550570
push eax
call fcn.004aed70
test eax, eax
je 0x4bd0c5
push str.GUID_IO_VOLUME_DISMOUNT_FAILED_n
call fcn.0048f080
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4bd151
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x550590
push eax
call fcn.004aed70
test eax, eax
je 0x4bd0f4
push str.GUID_IO_VOLUME_LOCK_n
call fcn.0048f080
mov edx, dword [esi + 8]
add esp, 4
push edx
call fcn.004bb940
jmp case.0x4bd00e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5505a0
push eax
call fcn.004aed70
test eax, eax
je 0x4bd11d
push str.GUID_IO_VOLUME_LOCK_FAILED_n
call fcn.0048f080
mov eax, dword [esi + 8]
add esp, 4
jmp 0x4bd150
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5505b0
push eax
call fcn.004aed70
test eax, eax
je case.0x4bd00e.32773
push str.GUID_IO_VOLUME_UNLOCK_n
call fcn.0048f080
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4bd151
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd00e.32773
push eax
call fcn.004bb9d0
mov edx, dword [esi + 8]
push edx
call fcn.004a4950
push esi
call fcn.004a4950
push 0x59828c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x5982a4]
cmp esi, ebp
jne 0x4bcfd0
push 0x59828c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd1a9
mov ecx, dword [0x5982bc]
mov dword [esp + eax*4 + 0x54], ecx
add dword [esp + 0x154], 1
jmp 0x4bd1b4
mov dword [esp + 0x158], 1
mov esi, dword [0x597ce4]
lea ebx, [ebx]
cmp ebx, 0xffffffff
jne 0x4bd26e
cmp dword [0x5981a4], 6
jb 0x4bd1f0
mov eax, dword [esp + 0x164]
lea edx, [esp + 0x30]
push edx
push ebp
push ebp
push ebp
push 0xff
push 8
push 0x40000003
push eax
jmp 0x4bd20b
mov edx, dword [esp + 0x164]
lea ecx, [esp + 0x30]
push ecx
push ebp
push ebp
push ebp
push 0xff
push ebp
push 0x40000003
push edx
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4bd2fc
push str.connect..._n
call fcn.0048f080
add esp, 4
lea eax, [esp + 0x3c]
push eax
push ebx
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], ebp
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4bd245
push ebx
call fcn.004baca0
jmp 0x4bd26e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x4bd260
push ebx
call fcn.004baca0
or ebx, 0xffffffff
jmp 0x4bd1c0
cmp eax, 0x218
je 0x4bd26e
cmp eax, 0x3e5
jne 0x4bd2dc
push ebp
lea ecx, [esp + 0x54]
push ecx
lea edx, [esp + 0x44]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4bd29f
push str.connected_n
call fcn.0048f080
add esp, 4
push ebx
call fcn.004baca0
or ebx, 0xffffffff
jmp 0x4bd1c0
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd2c6
mov ecx, dword [esp + 0x4c]
mov dword [esp + eax*4 + 0x54], ecx
mov eax, dword [esp + 0x154]
add eax, 1
mov dword [esp + 0x154], eax
jmp 0x4bd2d1
mov dword [esp + 0x158], 1
cmp ebx, 0xffffffff
je 0x4bd1c9
jmp 0x4bd320
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.connect_named_pipe_failed__d_n
call fcn.0048f080
add esp, 8
or ebx, 0xffffffff
jmp 0x4bd310
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_createnamedpipe__d_n
call fcn.0048f080
add esp, 8
mov eax, dword [esp + 0x154]
mov edi, 1
mov dword [esp + 0x10], edi
mov esi, dword [0x5982ac]
cmp esi, ebp
je 0x4bd4a1
mov edi, edi
mov edx, dword [esi + 0x34]
mov edi, dword [esi]
push edx
push str.update_client__d_n
call fcn.0048f080
add esp, 8
push esi
call fcn.004bb480
call fcn.004bc7c0
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.004bc900
cmp dword [esi + 0x38], ebp
je 0x4bd383
mov ecx, dword [esi + 0x34]
push ecx
push str._d:_disconnected._n
call fcn.0048f080
add esp, 8
mov eax, esi
call fcn.004bcd60
mov eax, dword [esp + 0x154]
jmp 0x4bd493
cmp dword [esi + 0x50], ebp
je 0x4bd3d1
cmp dword [esi + 0x58], ebp
je 0x4bd3d1
mov edx, dword [esi + 0x34]
push edx
push str.client__d_write_pending_n
call fcn.0048f080
mov eax, dword [esp + 0x15c]
add esp, 8
cmp eax, 0x40
jae 0x4bd3c4
mov ecx, dword [esi + 0x2c]
mov dword [esp + eax*4 + 0x54], ecx
mov eax, dword [esp + 0x154]
add eax, 1
mov dword [esp + 0x154], eax
jmp 0x4bd3d8
mov dword [esp + 0x158], 1
jmp 0x4bd3d8
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd3f7
mov edx, dword [esi + 0x18]
mov dword [esp + eax*4 + 0x54], edx
mov eax, dword [esp + 0x154]
add eax, 1
mov dword [esp + 0x154], eax
jmp 0x4bd402
mov dword [esp + 0x158], 1
xor edx, edx
cmp dword [esi + 0x64], ebp
jbe 0x4bd44e
lea esp, [esp]
mov ecx, dword [esi + 0x60]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x64], 2
jne 0x4bd446
cmp eax, 0x40
jae 0x4bd43b
mov ecx, dword [ecx + 0x5c]
mov dword [esp + eax*4 + 0x54], ecx
mov eax, dword [esp + 0x154]
add eax, 1
mov dword [esp + 0x154], eax
jmp 0x4bd446
mov dword [esp + 0x158], 1
add edx, 1
cmp edx, dword [esi + 0x64]
jb 0x4bd410
xor edx, edx
cmp dword [esi + 0x70], ebp
jbe 0x4bd493
mov ecx, dword [esi + 0x6c]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x6c], 2
jne 0x4bd48b
cmp eax, 0x40
jae 0x4bd480
mov ecx, dword [ecx + 0x64]
mov dword [esp + eax*4 + 0x54], ecx
mov eax, dword [esp + 0x154]
add eax, 1
mov dword [esp + 0x154], eax
jmp 0x4bd48b
mov dword [esp + 0x158], 1
add edx, 1
cmp edx, dword [esi + 0x70]
jb 0x4bd455
cmp edi, ebp
mov esi, edi
jne 0x4bd330
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x158], ebp
je 0x4bd4af
mov edi, 1
push edi
push eax
push str.sleep__d__d_n
call fcn.0048f080
mov eax, dword [esp + 0x160]
add esp, 0xc
neg edi
sbb edi, edi
and edi, 0x3e9
add edi, 0xffffffff
push edi
push ebp
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, dword [0x5982bc]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
xor edi, edi
push str.awake_n
mov dword [esp + 0x158], ebp
mov dword [esp + 0x15c], ebp
mov dword [esp + 0x14], edi
call fcn.0048f080
mov edx, dword [0x5982c0]
add esp, 4
push edx
call fcn.004ac930
test eax, eax
je 0x4bcfb0
cmp ebx, 0xffffffff
je 0x4bd52e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea ecx, [esp + 0x15c]
push ecx
call fcn.00523250
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ebx, 1
mov eax, dword [0x5982c4]
cmp eax, ebp
je 0x4bd58a
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], 0x30
mov dword [esp + 0x20], 3
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], 0xbb8
mov dword [esp + 0x24], ebx
call edi
mov eax, dword [0x5982ac]
cmp eax, ebp
je 0x4bd5a0
mov esi, dword [eax]
call fcn.004bcd60
cmp esi, ebp
mov eax, esi
jne 0x4bd593
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x5982c4]
cmp eax, ebp
pop esi
je 0x4bd5e1
lea ecx, [esp + 0x10]
push ecx
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], 0xbb8
mov dword [esp + 0x20], ebx
call edi
mov ecx, dword [esp + 0x36c]
pop edi
pop ebp
pop ebx
xor ecx, esp
call fcn.0054962d
add esp, 0x364
ret