Function at 0x403430
Capabilities:
Create service
Modify service
Persist via windows service

Disassembly:
push 0xffffffffffffffff
push 0x4d4c6e
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x54d158]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x54d158]
xor eax, esp
push eax
lea eax, [esp + 0x94]
mov dword fs:[0], eax
push 0xf003f
push 0
push 0
mov dword [esp + 0xa8], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x18], ebp
jne 0x403558
call fcn.004a08e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4034aa
push 0x80004005
call fcn.004103e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x9c], 1
mov edi, dword [esp + 0xa4]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x1c]
push str.Regist_Service::OpenSCManager_failed___d____s_n
push ecx
call fcn.00410070
mov esi, dword [esp + 0x24]
add esi, 0xfffffff0
push esi
call fcn.0040ff10
add esp, 0x14
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403509
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x9c], 0
lea ecx, [esi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40352a
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
lea eax, [edi - 0x10]
mov dword [esp + 0x9c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403551
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40370f
mov edi, dword [0x5548c8]
mov eax, dword [0x5548cc]
cmp edi, eax
jbe 0x403571
call fcn.004ad638
mov eax, dword [0x5548cc]
cmp dword [0x5548c8], eax
mov esi, eax
jbe 0x403580
call fcn.004ad638
cmp edi, esi
je 0x4035cd
push str.__p
lea esi, [esp + 0xa8]
call fcn.0040da40
cmp edi, dword [0x5548cc]
jb 0x4035a2
call fcn.004ad638
mov eax, dword [edi]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0xac]
call fcn.0040ee60
mov eax, dword [0x5548cc]
cmp edi, eax
jb 0x4035c8
call fcn.004ad638
mov eax, dword [0x5548cc]
add edi, 4
jmp 0x403571
mov ebx, dword [esp + 0xa4]
push 0
push 0
push 0
push 0
push 0
push ebx
push 1
push 2
push 0x10
push 0xf01ff
push 0x51b9b8
push 0x51b9b8
push ebp
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebp, eax
test ebp, ebp
jne 0x4036ab
call fcn.004a08e6
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40361f
push 0x80004005
call fcn.004103e0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
push ebx
mov byte [esp + 0xa0], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x1c]
push str.Regist_Service::CreateService_failed___d____s_n
push ecx
call fcn.00410070
mov esi, dword [esp + 0x24]
add esi, 0xfffffff0
push esi
call fcn.0040ff10
add esp, 0x14
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403677
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov byte [esp + 0x9c], 0
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x4036a3
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea eax, [ebx - 0x10]
jmp 0x40352d
mov ecx, 0x1b
mov esi, str.This_service_supports_the_TOBESOFT_companys_programs.
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0x14]
push edx
push 1
lea ecx, [esp + 0x24]
push ebp
movsw word es:[edi], word [esi]
mov dword [esp + 0x20], ecx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
add ebx, 0xfffffff0
mov dword [esp + 0x9c], 0xffffffff
lea ecx, [ebx + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40370a
mov ecx, dword [ebx]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebx
call edx
mov eax, 1
mov ecx, dword [esp + 0x94]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.004ac89d
add esp, 0x8c
ret