Function at 0x4b94a0
Capabilities:
Check for time delay via gettickcount
Connect pipe

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [0x58b4c0]
sub esp, 0x580
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
push edi
je 0x4b94f3
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], 0x30
mov dword [esp + 0x24], 4
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0xbb8
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
or ebx, 0xffffffff
call fcn.004aa020
xor edi, edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x158], ebp
mov dword [esp + 0x15c], ebp
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push str.awake_n
mov dword [esp + 0x14], eax
call fcn.0048dc10
mov edx, dword [0x58b4bc]
add esp, 4
push edx
call fcn.004aa060
test eax, eax
jne 0x4b9bb2
mov edi, edi
push 0x58b488
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x58b4a0]
cmp esi, ebp
je 0x4b970e
lea esp, [esp]
mov eax, dword [esi]
cmp eax, ebp
mov dword [0x58b4a0], eax
jne 0x4b9571
mov dword [0x58b4a4], ebp
push 0x58b488
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 4]
push eax
push str.device_event__08x_n
call fcn.0048dc10
mov eax, dword [esi + 4]
add eax, 0xffff7fff
add esp, 8
cmp eax, 5
ja case.0x4b959e.32773
jmp dword [eax*4 + 0x4b9c60]
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.0048dc10
add esp, 0xc
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4b959e.32773
push eax
call fcn.004b7fb0
jmp case.0x4b959e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4b959e.32773
push eax
call fcn.004b7990
jmp case.0x4b959e.32773
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4b959e.32773
push 0x10
add eax, 0x14
push 0x5464b8
push eax
call fcn.004ac220
test eax, eax
je 0x4b9628
push str.GUID_IO_VOLUME_DISMOUNT_n
call fcn.0048dc10
mov eax, dword [esi + 8]
add esp, 4
push eax
call fcn.004b7fb0
jmp case.0x4b959e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5464c8
push eax
call fcn.004ac220
test eax, eax
je 0x4b9655
push str.GUID_IO_VOLUME_DISMOUNT_FAILED_n
call fcn.0048dc10
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4b96e1
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5464e8
push eax
call fcn.004ac220
test eax, eax
je 0x4b9684
push str.GUID_IO_VOLUME_LOCK_n
call fcn.0048dc10
mov edx, dword [esi + 8]
add esp, 4
push edx
call fcn.004b7fb0
jmp case.0x4b959e.32773
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x5464f8
push eax
call fcn.004ac220
test eax, eax
je 0x4b96ad
push str.GUID_IO_VOLUME_LOCK_FAILED_n
call fcn.0048dc10
mov eax, dword [esi + 8]
add esp, 4
jmp 0x4b96e0
mov eax, dword [esi + 8]
push 0x10
add eax, 0x14
push 0x546508
push eax
call fcn.004ac220
test eax, eax
je case.0x4b959e.32773
push str.GUID_IO_VOLUME_UNLOCK_n
call fcn.0048dc10
mov ecx, dword [esi + 8]
add esp, 4
push ecx
jmp 0x4b96e1
mov eax, dword [esi + 8]
cmp dword [eax + 4], 6
jne case.0x4b959e.32773
push eax
call fcn.004b8040
mov edx, dword [esi + 8]
push edx
call fcn.004a23a0
push esi
call fcn.004a23a0
push 0x58b488
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [0x58b4a0]
cmp esi, ebp
jne 0x4b9560
push 0x58b488
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x158]
cmp eax, 0x40
mov esi, 1
jae 0x4b973d
mov ecx, dword [0x58b4b8]
mov dword [esp + eax*4 + 0x58], ecx
add dword [esp + 0x158], esi
jmp 0x4b9744
mov dword [esp + 0x15c], esi
cmp ebx, 0xffffffff
jne 0x4b991c
lea edx, [esp + 0x378]
push edx
call fcn.0051ec40
mov eax, dword [0x58b4c8]
cmp eax, ebp
jne 0x4b9768
mov eax, str.D:_A_OICI_GRGW___AU_
push eax
lea eax, [esp + 0x37c]
push eax
call fcn.00522b90
mov ecx, dword [esp + 0x380]
push ecx
push str.SecurityDescriptor__S_n
mov dword [esp + 0x3c], 0xc
mov dword [esp + 0x44], esi
call fcn.0048dc10
mov eax, dword [esp + 0x388]
add esp, 8
push ebp
lea edx, [esp + 0x3c]
push edx
push esi
push eax
call dword [0x581e7c]
test eax, eax
je 0x4b98e5
lea ecx, [esp + 0x160]
push ecx
call fcn.0051ec40
lea esi, [esp + 0x160]
call fcn.004b7a40
mov edx, dword [esp + 0x168]
push edx
push str.createnamedpipe__S_n
call fcn.0048dc10
mov ecx, dword [esp + 0x170]
add esp, 8
lea eax, [esp + 0x34]
push eax
push ebp
push ebp
push ebp
push 0xff
push ebp
push 0x40000003
push ecx
call dword [0x58af24]
mov edx, dword [esp + 0x38]
push edx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp ebx, 0xffffffff
je 0x4b98ac
push str.connect..._n
call fcn.0048dc10
add esp, 4
lea eax, [esp + 0x40]
push eax
push ebx
mov dword [esp + 0x50], ebp
mov dword [esp + 0x54], ebp
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4b9856
push ebx
call fcn.004b7450
mov ecx, esi
push ecx
call fcn.00522920
mov esi, 1
jmp 0x4b990a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
jne 0x4b9881
push ebx
call fcn.004b7450
lea ecx, [esp + 0x160]
push ecx
or ebx, 0xffffffff
call fcn.00522920
lea esi, [ebx + 2]
jmp 0x4b990a
cmp eax, 0x218
je 0x4b98d1
cmp eax, 0x3e5
je 0x4b98d1
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.0048dc10
or ebx, 0xffffffff
jmp 0x4b98bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.failed_to_createnamedpipe__d_n
call fcn.0048dc10
add esp, 8
cmp edi, ebp
je 0x4b98cc
cmp edi, 0x3e8
jbe 0x4b98d1
mov edi, 0x3e8
lea ecx, [esp + 0x160]
push ecx
call fcn.00522920
mov esi, 1
jmp 0x4b990a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ConvertStringSecurityDescriptorToSecurityDescriptor_failed__d_n
call fcn.0048dc10
add esp, 8
cmp edi, ebp
je 0x4b9905
cmp edi, 0x3e8
jbe 0x4b990a
mov edi, 0x3e8
lea edx, [esp + 0x378]
push edx
call fcn.00522920
cmp ebx, 0xffffffff
je 0x4b994c
push ebp
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x48]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x4b99c2
push str.connected_n
call fcn.0048dc10
add esp, 4
push ebx
call fcn.004b7450
or ebx, 0xffffffff
mov eax, dword [esp + 0x158]
cmp edi, ebp
je 0x4b9744
mov esi, dword [0x58b4a8]
cmp esi, ebp
mov dword [esp + 0x14], edi
je 0x4b9b1c
lea ecx, [ecx]
mov eax, dword [esi + 0x34]
mov edi, dword [esi]
push eax
push str.update_client__d_n
call fcn.0048dc10
add esp, 8
push esi
call fcn.004b7ac0
call fcn.004b8da0
lea ecx, [esp + 0x10]
push ecx
push esi
call fcn.004b8ee0
cmp dword [esi + 0x38], ebp
je 0x4b99fd
mov edx, dword [esi + 0x34]
push edx
push str._d:_disconnected._n
call fcn.0048dc10
add esp, 8
mov eax, esi
call fcn.004b9340
mov eax, dword [esp + 0x158]
jmp 0x4b9b0e
mov eax, dword [esp + 0x158]
cmp eax, 0x40
jae 0x4b99e8
mov edx, dword [esp + 0x50]
mov dword [esp + eax*4 + 0x58], edx
mov eax, dword [esp + 0x158]
add eax, esi
mov dword [esp + 0x158], eax
jmp 0x4b99ef
mov dword [esp + 0x15c], esi
cmp ebx, 0xffffffff
jne 0x4b995b
jmp 0x4b9953
cmp dword [esi + 0x50], ebp
je 0x4b9a4b
cmp dword [esi + 0x58], ebp
je 0x4b9a4b
mov eax, dword [esi + 0x34]
push eax
push str.client__d_write_pending_n
call fcn.0048dc10
mov eax, dword [esp + 0x160]
add esp, 8
cmp eax, 0x40
jae 0x4b9a3e
mov ecx, dword [esi + 0x2c]
mov dword [esp + eax*4 + 0x58], ecx
mov eax, dword [esp + 0x158]
add eax, 1
mov dword [esp + 0x158], eax
jmp 0x4b9a52
mov dword [esp + 0x15c], 1
jmp 0x4b9a52
mov eax, dword [esp + 0x158]
cmp eax, 0x40
jae 0x4b9a71
mov edx, dword [esi + 0x18]
mov dword [esp + eax*4 + 0x58], edx
mov eax, dword [esp + 0x158]
add eax, 1
mov dword [esp + 0x158], eax
jmp 0x4b9a7c
mov dword [esp + 0x15c], 1
xor edx, edx
cmp dword [esi + 0x64], ebp
jbe 0x4b9ac1
mov ecx, dword [esi + 0x60]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x64], 2
jne 0x4b9ab9
cmp eax, 0x40
jae 0x4b9aae
mov ecx, dword [ecx + 0x5c]
mov dword [esp + eax*4 + 0x58], ecx
mov eax, dword [esp + 0x158]
add eax, 1
mov dword [esp + 0x158], eax
jmp 0x4b9ab9
mov dword [esp + 0x15c], 1
add edx, 1
cmp edx, dword [esi + 0x64]
jb 0x4b9a83
xor edx, edx
cmp dword [esi + 0x70], ebp
jbe 0x4b9b0e
jmp 0x4b9ad0
mov ecx, dword [esi + 0x6c]
mov ecx, dword [ecx + edx*4]
cmp dword [ecx + 0x6c], 2
jne 0x4b9b06
cmp eax, 0x40
jae 0x4b9afb
mov ecx, dword [ecx + 0x64]
mov dword [esp + eax*4 + 0x58], ecx
mov eax, dword [esp + 0x158]
add eax, 1
mov dword [esp + 0x158], eax
jmp 0x4b9b06
mov dword [esp + 0x15c], 1
add edx, 1
cmp edx, dword [esi + 0x70]
jb 0x4b9ad0
cmp edi, ebp
mov esi, edi
jne 0x4b9970
mov edi, dword [esp + 0x14]
cmp dword [esp + 0x15c], ebp
je 0x4b9b36
cmp edi, ebp
je 0x4b9b31
cmp edi, 0x3e8
jbe 0x4b9b36
mov edi, 0x3e8
push edi
push eax
push str.sleep__d__d_n
call fcn.0048dc10
add esp, 0xc
cmp edi, ebp
je 0x4b9b4e
lea eax, [edi + 0x11]
jmp 0x4b9b51
or eax, 0xffffffff
push eax
mov eax, dword [esp + 0x15c]
push ebp
lea edx, [esp + 0x60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov ecx, dword [0x58b4b8]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
xor edi, edi
mov dword [esp + 0x158], ebp
mov dword [esp + 0x15c], ebp
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push str.awake_n
mov dword [esp + 0x14], eax
call fcn.0048dc10
mov edx, dword [0x58b4bc]
add esp, 4
push edx
call fcn.004aa060
test eax, eax
je 0x4b9540
mov eax, dword [0x58b4c0]
cmp eax, ebp
je 0x4b9bf3
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], 0x30
mov dword [esp + 0x24], 3
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0xbb8
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov eax, dword [0x58b4a8]
cmp eax, ebp
je 0x4b9c0d
lea esp, [esp]
mov esi, dword [eax]
call fcn.004b9340
cmp esi, ebp
mov eax, esi
jne 0x4b9c00
mov edx, dword [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x58b4c0]
cmp eax, ebp
je 0x4b9c56
mov ecx, 1
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
lea ecx, [esp + 0x18]
push ecx
push eax
mov dword [esp + 0x20], 0x30
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], 0xbb8
call dword [sym.imp.ADVAPI32.dll_SetServiceStatus]
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret