Function at 0x404890
Capabilities:
Create service
Link many functions at runtime

Disassembly:
push 0xffffffffffffffff
push 0x42814c
mov eax, dword fs:[0]
push eax
sub esp, 0x444
mov eax, dword [0x432ac0]
xor eax, esp
mov dword [esp + 0x440], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x432ac0]
xor eax, esp
push eax
lea eax, [esp + 0x458]
mov dword fs:[0], eax
mov esi, dword [esp + 0x46c]
mov ebp, ecx
mov ecx, dword [esp + 0x468]
mov dword [esp + 0x18], esi
call fcn.004024c0
mov dword [esi], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.ADVAPI32.DLL
mov dword [esp + 0x24], 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, eax
push str.RegisterServiceCtrlHandlerExA
push ebx
mov dword [esp + 0x2c], ebx
call edi
push str.EnumServicesStatusExA
push ebx
mov dword [esp + 0x30], eax
call edi
mov dword [esp + 0x2c], eax
push 0xa
push str.ServicesActive
push 0
mov dword [esp + 0x46c], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x404a42
push eax
call dword [sym.imp.ADVAPI32.dll_LockServiceDatabase]
mov dword [esp + 0x20], eax
mov eax, dword [ebp]
mov edx, dword [eax + 0xa8]
mov ecx, ebp
call edx
push str.ADVAPI32.DLL
mov ebx, eax
call esi
mov esi, eax
push str.QueryServiceConfig2A
push esi
mov dword [esp + 0x44], esi
call edi
push str.ChangeServiceConfig2A
push esi
mov dword [esp + 0x48], eax
call edi
push str.QueryServiceStatusEx
push esi
mov dword [esp + 0x4c], eax
call edi
mov dword [esp + 0x48], eax
mov byte [esp + 0x460], 1
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
lea eax, [ebp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [ecx - 0xc]
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [edx - 0xc]
push eax
mov eax, dword [ebp + 0xd8]
lea edi, [ebp + 0x14]
neg ecx
sbb ecx, ecx
and ecx, edx
mov edx, dword [esi - 0xc]
push ecx
push ebx
push 0
neg edx
sbb edx, edx
and edx, esi
mov esi, dword [ebp + 4]
push edx
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp + 0x60]
push esi
push 0xf01ff
push eax
mov eax, dword [ebp + 0x58]
push eax
mov eax, dword [esp + 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
test esi, esi
mov dword [esp + 0x38], esi
jne 0x404a49
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x18]
push ebx
mov dword [ecx], eax
call fcn.00407506
add esp, 4
call fcn.00404820
mov edi, dword [esp + 0x14]
call fcn.00404820
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404a37
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x404bf0
call fcn.00404820
mov edi, dword [esp + 0x14]
call fcn.00404820
push ebx
call fcn.00407506
add esp, 4
cmp dword [ebp + 0x3c], 0
je 0x404bb6
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax - 0xc]
test eax, eax
lea ebx, [ebp + 0x1c]
jne 0x404af5
push 0x104
lea ecx, [esp + 0x150]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0x100
lea edx, [esp + 0x58]
push edx
push 0x100
lea eax, [esp + 0x264]
push eax
push 3
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x16c]
push edx
call fcn.00413218
push 0x42c928
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x27c]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x384]
push 0x104
push eax
call fcn.0041517b
add esp, 0x3c
lea ecx, [esp + 0x350]
push ecx
mov ecx, ebx
call fcn.004025b0
lea edi, [ebp + 0x70]
lea esi, [esp + 0x34]
mov eax, edi
call fcn.00406290
mov dword [esp + 0x14], eax
lea esi, [esp + 0x30]
mov eax, edi
mov byte [esp + 0x460], 2
call fcn.00406270
mov byte [esp + 0x460], 3
mov edx, dword [esp + 0x14]
mov eax, dword [eax]
mov ecx, dword [ebx]
mov edi, dword [edx]
push eax
call fcn.00406b30
add esp, 4
test eax, eax
mov byte [esp + 0x460], 2
mov eax, dword [esp + 0x30]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b62
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x460], 1
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x404bb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x18]
push edx
mov dword [ecx], eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea esi, [esp + 0x1c]
call fcn.004073d0
xor eax, eax
jmp 0x404bf0
mov esi, dword [esp + 0x38]
mov eax, dword [ebp + 0x68]
add ebp, 0x68
cmp dword [eax - 0xc], 0
je 0x404bcc
push ebp
lea ecx, [esp + 0x3c]
call fcn.004072c0
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404be4
push eax
call dword [sym.imp.ADVAPI32.dll_UnlockServiceDatabase]
mov ecx, dword [esp + 0x1c]
push ecx
call esi
mov eax, 1
mov ecx, dword [esp + 0x458]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x440]
xor ecx, esp
call fcn.00412a2f
add esp, 0x450
ret 8