Function at 0x4bcf50
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 0x4bcfad
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.004ac990
mov dword [esp + 0x4c], eax
mov dword [esp + 0x30], 0xc
mov dword [esp + 0x38], ebx
call fcn.004bb3c0
cmp eax, ebp
mov dword [esp + 0x34], eax
je 0x4bd5e1
lea edx, [esp + 0x15c]
push edx
or ebx, 0xffffffff
call fcn.00401210
lea esi, [esp + 0x15c]
call fcn.004bb320
mov eax, dword [esp + 0x164]
push eax
push str.createnamedpipe__S_n
call fcn.0048f0d0
xor edi, edi
push str.awake_n
mov dword [esp + 0x160], ebp
mov dword [esp + 0x164], ebp
mov dword [esp + 0x1c], edi
call fcn.0048f0d0
mov ecx, dword [0x5982c0]
add esp, 0xc
push ecx
call fcn.004ac9d0
test eax, eax
jne 0x4bd5be
jmp 0x4bd040
push 0x59828c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x5982a4]
cmp esi, ebp
je 0x4bd20e
lea esp, [esp]
mov eax, dword [esi]
cmp eax, ebp
mov dword [0x5982a4], eax
jne 0x4bd071
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.0048f0d0
mov eax, dword [esi + 4]
add eax, 0xffff7fff
add esp, 8
cmp eax, 5
ja case.0x4bd09e.32773
jmp dword [eax*4 + 0x4bd68c]
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.0048f0d0
add esp, 0xc
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd09e.32773
push eax
call fcn.004bb9d0
jmp case.0x4bd09e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd09e.32773
push eax
call fcn.004bb270
jmp case.0x4bd09e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd09e.32773
push 0x10
add eax, 0x14
push 0x550560
push eax
call fcn.004aee00
test eax, eax
je 0x4bd128
push str.GUID_IO_VOLUME_DISMOUNT_n
call fcn.0048f0d0
mov eax, dword [esi + 8]
add esp, 4
push eax
call fcn.004bb9d0
jmp case.0x4bd09e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x550570
push eax
call fcn.004aee00
test eax, eax
je 0x4bd155
push str.GUID_IO_VOLUME_DISMOUNT_FAILED_n
call fcn.0048f0d0
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4bd1e1
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x550590
push eax
call fcn.004aee00
test eax, eax
je 0x4bd184
push str.GUID_IO_VOLUME_LOCK_n
call fcn.0048f0d0
mov edx, dword [esi + 8]
add esp, 4
push edx
call fcn.004bb9d0
jmp case.0x4bd09e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5505a0
push eax
call fcn.004aee00
test eax, eax
je 0x4bd1ad
push str.GUID_IO_VOLUME_LOCK_FAILED_n
call fcn.0048f0d0
mov eax, dword [esi + 8]
add esp, 4
jmp 0x4bd1e0
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5505b0
push eax
call fcn.004aee00
test eax, eax
je case.0x4bd09e.32773
push str.GUID_IO_VOLUME_UNLOCK_n
call fcn.0048f0d0
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4bd1e1
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4bd09e.32773
push eax
call fcn.004bba60
mov edx, dword [esi + 8]
push edx
call fcn.004a4a00
push esi
call fcn.004a4a00
push 0x59828c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x5982a4]
cmp esi, ebp
jne 0x4bd060
push 0x59828c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd239
mov ecx, dword [0x5982bc]
mov dword [esp + eax*4 + 0x54], ecx
add dword [esp + 0x154], 1
jmp 0x4bd244
mov dword [esp + 0x158], 1
mov esi, dword [0x597ce4]
lea ebx, [ebx]
cmp ebx, 0xffffffff
jne 0x4bd2fe
cmp dword [0x5981a4], 6
jb 0x4bd280
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 0x4bd29b
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 0x4bd38c
push str.connect..._n
call fcn.0048f0d0
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 0x4bd2d5
push ebx
call fcn.004bad30
jmp 0x4bd2fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x4bd2f0
push ebx
call fcn.004bad30
or ebx, 0xffffffff
jmp 0x4bd250
cmp eax, 0x218
je 0x4bd2fe
cmp eax, 0x3e5
jne 0x4bd36c
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 0x4bd32f
push str.connected_n
call fcn.0048f0d0
add esp, 4
push ebx
call fcn.004bad30
or ebx, 0xffffffff
jmp 0x4bd250
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd356
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 0x4bd361
mov dword [esp + 0x158], 1
cmp ebx, 0xffffffff
je 0x4bd259
jmp 0x4bd3b0
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.0048f0d0
add esp, 8
or ebx, 0xffffffff
jmp 0x4bd3a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_createnamedpipe__d_n
call fcn.0048f0d0
add esp, 8
mov eax, dword [esp + 0x154]
mov edi, 1
mov dword [esp + 0x10], edi
mov esi, dword [0x5982ac]
cmp esi, ebp
je 0x4bd531
mov edi, edi
mov edx, dword [esi + 0x34]
mov edi, dword [esi]
push edx
push str.update_client__d_n
call fcn.0048f0d0
add esp, 8
push esi
call fcn.004bb510
call fcn.004bc850
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.004bc990
cmp dword [esi + 0x38], ebp
je 0x4bd413
mov ecx, dword [esi + 0x34]
push ecx
push str._d:_disconnected._n
call fcn.0048f0d0
add esp, 8
mov eax, esi
call fcn.004bcdf0
mov eax, dword [esp + 0x154]
jmp 0x4bd523
cmp dword [esi + 0x50], ebp
je 0x4bd461
cmp dword [esi + 0x58], ebp
je 0x4bd461
mov edx, dword [esi + 0x34]
push edx
push str.client__d_write_pending_n
call fcn.0048f0d0
mov eax, dword [esp + 0x15c]
add esp, 8
cmp eax, 0x40
jae 0x4bd454
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 0x4bd468
mov dword [esp + 0x158], 1
jmp 0x4bd468
mov eax, dword [esp + 0x154]
cmp eax, 0x40
jae 0x4bd487
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 0x4bd492
mov dword [esp + 0x158], 1
xor edx, edx
cmp dword [esi + 0x64], ebp
jbe 0x4bd4de
lea esp, [esp]
mov ecx, dword [esi + 0x60]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x64], 2
jne 0x4bd4d6
cmp eax, 0x40
jae 0x4bd4cb
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 0x4bd4d6
mov dword [esp + 0x158], 1
add edx, 1
cmp edx, dword [esi + 0x64]
jb 0x4bd4a0
xor edx, edx
cmp dword [esi + 0x70], ebp
jbe 0x4bd523
mov ecx, dword [esi + 0x6c]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x6c], 2
jne 0x4bd51b
cmp eax, 0x40
jae 0x4bd510
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 0x4bd51b
mov dword [esp + 0x158], 1
add edx, 1
cmp edx, dword [esi + 0x70]
jb 0x4bd4e5
cmp edi, ebp
mov esi, edi
jne 0x4bd3c0
mov edi, dword [esp + 0x10]
cmp dword [esp + 0x158], ebp
je 0x4bd53f
mov edi, 1
push edi
push eax
push str.sleep__d__d_n
call fcn.0048f0d0
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.0048f0d0
mov edx, dword [0x5982c0]
add esp, 4
push edx
call fcn.004ac9d0
test eax, eax
je 0x4bd040
cmp ebx, 0xffffffff
je 0x4bd5be
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.00401230
mov edi, dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov ebx, 1
mov eax, dword [0x5982c4]
cmp eax, ebp
je 0x4bd61a
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 0x4bd630
mov esi, dword [eax]
call fcn.004bcdf0
cmp esi, ebp
mov eax, esi
jne 0x4bd623
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x5982c4]
cmp eax, ebp
pop esi
je 0x4bd671
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.00549750
add esp, 0x364
ret