Function at 0x40b5b0
Capabilities:
Create service
Delete service
Query service status
Start service

Disassembly:
push 0xffffffffffffffff
push 0x44bc30
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4638dc]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov esi, ecx
call fcn.0041591e
xor ecx, ecx
xor ebx, ebx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40b5f5
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov dword [esp + 0x50], ebx
call fcn.0041591e
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40b623
push 0x80004005
call fcn.00401010
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x18], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
mov ebp, 0x104
sub eax, ebp
or eax, ecx
mov byte [esp + 0x50], 1
jge 0x40b65c
push ebp
lea ecx, [esp + 0x1c]
call fcn.00401490
mov edi, dword [esp + 0x18]
cmp dword [edi - 8], ebp
jge 0x40b66b
push 0x80070057
call fcn.00401010
push ebp
push edi
mov dword [edi - 0xc], ebp
push ebx
mov byte [edi + 0x104], bl
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x40b73f
push str.Failed_to_get_path_to_current_process.
add esi, 0x17c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.00402e90
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.00401a10
mov eax, dword [eax]
push ebx
push ebx
push eax
mov byte [esp + 0x5c], 2
call fcn.0041d02a
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x50], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40b6e0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x50], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b700
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x50], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b728
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40b744
sub eax, edx
js 0x40b661
cmp eax, dword [edi - 8]
jg 0x40b661
push 0x5c
mov dword [edi - 0xc], eax
push edi
mov byte [eax + edi], bl
call fcn.00434339
add esp, 8
cmp eax, ebx
jne 0x40b778
or eax, 0xffffffff
jmp 0x40b77a
sub eax, edi
push ebx
push eax
lea ecx, [esp + 0x20]
call fcn.0040a880
cmp dword [0x4650d8], ebx
je 0x40b79e
mov ecx, dword [esp + 0x18]
push ecx
push str.__s_vdd_x64.sys
lea edx, [esp + 0x1c]
push edx
jmp 0x40b7ad
mov eax, dword [esp + 0x18]
push eax
push str.__s_vdd_x86.sys
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402cf0
add esp, 0xc
push 2
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, ebx
mov dword [esi + 0x1ac], eax
jne 0x40b88d
push str.Failed_to_connect_to_service_control_manager.
add esi, 0x17c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.00402e90
add esp, 0xc
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.00401a10
mov eax, dword [eax]
push ebx
push ebx
push eax
mov byte [esp + 0x5c], 3
call fcn.0041d02a
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x50], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b828
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x50], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b84c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x50], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b874
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0xfffffffe
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov edi, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push 0x10004
push str.VirtualDrive
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x1b0], eax
je 0x40b8d6
lea ecx, [esp + 0x20]
push ecx
push 0x24
lea edx, [esp + 0x2c]
push edx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x40b8d6
cmp dword [esp + 0x28], 1
jne 0x40b8d6
mov eax, dword [esi + 0x1b0]
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ecx, dword [esi + 0x1b0]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ebp, dword [esp + 0x14]
push ebx
mov edx, dword [esi + 0x1ac]
push ebx
push ebx
push ebx
push ebx
push ebp
push ebx
push 3
push 1
push 0x10030
push str.Virtual_Drive
push str.VirtualDrive
push edx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebx
mov dword [esi + 0x1b0], eax
jne 0x40b9cd
mov eax, dword [esi + 0x1ac]
push 0x10030
push str.VirtualDrive
push eax
call edi
cmp eax, ebx
mov dword [esi + 0x1b0], eax
jne 0x40b9cd
push 4
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040b0c0
mov edx, dword [eax]
push edx
push str.Failed_to_install_service___s_.
mov byte [esp + 0x58], 4
add esi, 0x17c
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push esi
call fcn.00402e90
add esp, 0x10
lea ecx, [esp + 0x1c]
mov byte [esp + 0x50], 1
call fcn.00401410
lea eax, [esp + 0x1c]
push eax
mov ecx, esi
call fcn.00401a10
mov ecx, dword [eax]
push ebx
push ebx
push ecx
mov byte [esp + 0x5c], 5
call fcn.0041d02a
lea ecx, [esp + 0x1c]
call fcn.00401410
lea ecx, [esp + 0x18]
call fcn.00401410
lea ecx, [esp + 0x14]
call fcn.00401410
mov eax, 0xfffffffd
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov edx, dword [esi + 0x1b0]
push ebx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40ba83
mov edi, dword [sym.imp.KERNEL32.DLL_GetLastError]
call edi
cmp eax, 0x420
je 0x40ba83
push 4
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x1c]
call fcn.0040b0c0
mov ecx, dword [eax]
push ecx
push 0x4505d8
mov byte [esp + 0x58], 6
add esi, 0x17c
call edi
push eax
push esi
call fcn.00402e90
add esp, 0x10
lea ecx, [esp + 0x1c]
mov byte [esp + 0x50], 1
call fcn.00401410
lea edx, [esp + 0x1c]
push edx
mov ecx, esi
call fcn.00401a10
mov eax, dword [eax]
push ebx
push ebx
push eax
mov byte [esp + 0x5c], 7
call fcn.0041d02a
lea ecx, [esp + 0x1c]
call fcn.00401410
lea ecx, [esp + 0x18]
call fcn.00401410
lea ecx, [esp + 0x14]
call fcn.00401410
mov eax, 0xfffffffc
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov byte [esp + 0x50], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40baa7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x50], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bacb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret