Function at 0x406df0
Capabilities:
Delete service
Print debug messages
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4aac50
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4e42d0]
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
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x40], eax
mov ecx, 0x4e3f18
test eax, eax
jne 0x406f4b
mov eax, dword [0x4e3f18]
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [ebp - 0x30], eax
push 0x4baaa8
lea eax, [ebp - 0x30]
push eax
mov ebx, 1
mov dword [ebp - 4], 0
call fcn.00402a30
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], bl
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.BFDrv_OpenSCManager___Faild__d____n
lea edi, [ebp - 0x3c]
call fcn.00402d60
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [0x4e3f18]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 2
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x30]
push ebx
push ecx
push esi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x34]
call fcn.00402d60
mov esi, dword [ebp - 0x34]
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406efe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406f44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x407638
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
push 0x4baaa4
lea ecx, [ebp - 0x30]
push ecx
mov ebx, 1
mov dword [ebp - 4], 3
call fcn.00402a30
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
push str.BFDrv_OpenSCManager___ok____n
lea edi, [ebp - 0x3c]
mov byte [ebp - 4], 4
call fcn.00402d60
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
add esp, 4
call esi
mov edx, dword [0x4e3f18]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 5
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x30]
push ebx
push ecx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x34]
call fcn.00402d60
mov edi, dword [ebp - 0x34]
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40700c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40702c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407052
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x40]
push 0xf01ff
push str.BFDrv
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edx, dword [0x4e3f18]
mov dword [ebp - 0x3c], eax
test eax, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
jne 0x407185
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
push 0x4baaa8
lea ecx, [ebp - 0x30]
push ecx
mov ebx, 1
mov dword [ebp - 4], 6
call fcn.00402a30
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x3c], eax
mov byte [ebp - 4], 7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.BFDrv_OpenService___Faild__d____n
lea edi, [ebp - 0x3c]
call fcn.00402d60
add esp, 8
call esi
mov edx, dword [0x4e3f18]
mov esi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 8
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x30]
push ebx
push ecx
push esi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x34]
call fcn.00402d60
mov esi, dword [ebp - 0x34]
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi - 0x10]
mov byte [ebp - 4], 7
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407138
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407158
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40717e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor esi, esi
jmp 0x40762c
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
push 0x4baaa4
lea ecx, [ebp - 0x34]
push ecx
mov ebx, 1
mov dword [ebp - 4], 9
call fcn.00402a30
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
push str.BFDrv_OpenService___ok____n
lea edi, [ebp - 0x30]
mov byte [ebp - 4], 0xa
call fcn.00402d60
add esp, 4
call esi
mov edx, dword [0x4e3f18]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
push ecx
push edx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x38]
call fcn.00402d60
mov edi, dword [ebp - 0x38]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
add esp, 0x14
push edi
call ebx
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0xa
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407239
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40725c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407282
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x2c]
push ecx
push 1
push edx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov ecx, 0x4e3f18
test eax, eax
jne 0x40735d
mov eax, dword [0x4e3f18]
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [ebp - 0x30], eax
mov edx, 0x4baaa8
lea edi, [ebp - 0x30]
mov dword [ebp - 4], 0xc
call fcn.00402ae0
mov eax, dword [0x4e3f18]
mov edx, dword [eax + 0xc]
mov ecx, 0x4e3f18
call edx
add eax, 0x10
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 0xd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.BFDrv_ControlService___Faild__d___n
lea edi, [ebp - 0x34]
call fcn.00402d60
add esp, 8
call esi
mov edi, eax
mov eax, dword [0x4e3f18]
mov edx, dword [eax + 0xc]
mov ecx, 0x4e3f18
call edx
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0xe
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x30]
push eax
push ecx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x38]
call fcn.00402d60
mov edi, dword [ebp - 0x38]
add esp, 0x14
push edi
call ebx
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0xd
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407354
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xc
jmp 0x407412
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
mov edx, 0x4baaa4
lea edi, [ebp - 0x30]
mov dword [ebp - 4], 0xf
call fcn.00402ae0
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
push str.BFDrv_ControlService___ok____n
lea edi, [ebp - 0x34]
mov byte [ebp - 4], 0x10
call fcn.00402d60
add esp, 4
call esi
mov edx, dword [0x4e3f18]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
push ecx
push edx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x38]
call fcn.00402d60
mov edi, dword [ebp - 0x38]
add esp, 0x14
push edi
call ebx
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0x10
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40740e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0xf
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407431
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x30]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407457
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x3c]
push ecx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov edx, dword [0x4e3f18]
test eax, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
jne 0x40752f
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
mov edx, 0x4baaa8
lea edi, [ebp - 0x34]
mov dword [ebp - 4], 0x12
call fcn.00402ae0
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
mov byte [ebp - 4], 0x13
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.BFDrv_DeleteSrevice___Faild__d___n
lea edi, [ebp - 0x38]
call fcn.00402d60
add esp, 8
call esi
mov edx, dword [0x4e3f18]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0x14
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
push esi
push ecx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x30]
call fcn.00402d60
mov edi, dword [ebp - 0x30]
add esp, 0x14
push edi
call ebx
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0x13
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x407526
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0x12
jmp 0x4075db
call eax
add eax, 0x10
mov dword [ebp - 0x34], eax
mov edx, 0x4baaa4
lea edi, [ebp - 0x34]
mov dword [ebp - 4], 0x15
call fcn.00402ae0
mov edx, dword [0x4e3f18]
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x38], eax
push str.BFDrv_DeleteSrevice____ok____n
lea edi, [ebp - 0x38]
mov byte [ebp - 4], 0x16
call fcn.00402d60
add esp, 4
call esi
mov edx, dword [0x4e3f18]
mov edi, eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4e3f18
call eax
add eax, 0x10
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0x17
mov esi, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x34]
push esi
push ecx
push edi
push 0x4baaac
push str.__s___TID:_u____s____s__n
lea edi, [ebp - 0x30]
call fcn.00402d60
mov edi, dword [ebp - 0x30]
add esp, 0x14
push edi
call ebx
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0x16
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4075d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0x15
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4075f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40761d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0x3c]
push ecx
mov esi, 1
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
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.0048f6cb
mov esp, ebp
pop ebp
ret