Function at 0x484620
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x6319d0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x3c], esi
call fcn.0046d4f0
test eax, eax
je 0x4846b5
push esi
push str.CService_::_StartAService_:_csServiceName___s_n
push 0x6ab9d0
call fcn.00599ee3
mov eax, dword [str.ENTRY:]
mov ecx, dword [0x5ccf7c]
mov dword [0x6ab8d0], eax
mov eax, 0x6ab9d0
mov dword [0x6ab8d4], ecx
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x484671
mov edi, 0x6ab8d0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x484682
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d500
push 0x6ab8d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
push ebx
xor esi, esi
push str.Advapi32.dll
mov dword [ebp - 0x30], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x4847de
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x5dbe2c
push ebx
call esi
mov edi, eax
test edi, edi
je 0x4847bb
push 0x5dbe1c
push ebx
call esi
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x484798
push str.QueryServiceStatusEx
push ebx
call esi
mov dword [ebp - 0x34], eax
test eax, eax
je 0x484775
push 0x5dc040
push ebx
call esi
mov dword [ebp - 0x48], eax
test eax, eax
je 0x484752
push 0x5dbdd4
push ebx
call esi
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x484801
call fcn.0046d4f0
test eax, eax
je 0x4849df
push str.Failed_to_load_export_CloseServiceHandle_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
call fcn.0046d4f0
test eax, eax
je 0x4849df
push str.Failed_to_load_export_StartService_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
call fcn.0046d4f0
test eax, eax
je 0x4849df
push str.Failed_to_load_export_pfnQueryServiceStatusEx_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
call fcn.0046d4f0
test eax, eax
je 0x4849df
push str.Failed_to_load_export_OpenServiceA_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
call fcn.0046d4f0
test eax, eax
je 0x4849df
push str.Failed_to_load_export_OpenSCManagerA_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
call fcn.0046d4f0
test eax, eax
je 0x4849e9
push str.Failed_to_load_Advapi32.dll_file_n
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849e9
push 1
push str.ServicesActive
push 0
call edi
mov edi, eax
mov dword [ebp - 0x44], edi
test edi, edi
jne 0x484851
call fcn.0046d4f0
test eax, eax
je 0x4849df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_OpenSCManager___:_GetLastError_____d_n
push 0x6ab7d0
call fcn.00599ee3
add esp, 0xc
push 0x6ab7d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849df
mov edx, dword [ebp - 0x3c]
push 0xf01ff
push edx
push edi
call dword [ebp - 0x4c]
mov esi, eax
test esi, esi
jne 0x4848a0
call fcn.0046d4f0
test eax, eax
je 0x4849db
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_OpenService___:_GetLastError_____d_n
push 0x6ab6d0
call fcn.00599ee3
add esp, 0xc
push 0x6ab6d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849db
push 0
push 0
push esi
call dword [ebp - 0x48]
test eax, eax
jne 0x4848e8
call fcn.0046d4f0
test eax, eax
je 0x4849d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_StartService___:_GetLastError_____d_n
push 0x6ab5d0
call fcn.00599ee3
add esp, 0xc
push 0x6ab5d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849d7
lea eax, [ebp - 0x40]
push eax
push 0x24
lea ecx, [ebp - 0x28]
push ecx
push 0
push esi
call dword [ebp - 0x34]
test eax, eax
jne 0x484938
call fcn.0046d4f0
test eax, eax
je 0x4849d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_QueryServiceStatusEx___:_GetLastError_____d_n
push 0x6ab4d0
call fcn.00599ee3
add esp, 0xc
push 0x6ab4d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
jmp 0x4849d7
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, edi
cmp dword [ebp - 0x24], 2
jne 0x4849c7
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp edi, 0x1388
ja 0x484981
push 0x3e8
call ebx
lea edx, [ebp - 0x40]
push edx
push 0x24
lea eax, [ebp - 0x28]
push eax
push 0
push esi
add edi, 0x1f4
call dword [ebp - 0x34]
test eax, eax
je 0x484991
cmp dword [ebp - 0x24], 2
je 0x484950
jmp 0x4849c4
call fcn.0046d4f0
test eax, eax
je 0x4849c4
push str.ERROR:_Time_Out_n
jmp 0x4849b8
call fcn.0046d4f0
test eax, eax
je 0x4849c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR:_QueryServiceStatusEx___2_:_GetLastError_____d_n
push 0x6ab3d0
call fcn.00599ee3
add esp, 0xc
push 0x6ab3d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
mov ebx, dword [ebp - 0x2c]
cmp dword [ebp - 0x24], 4
jne 0x4849d4
mov dword [ebp - 0x30], 1
mov edi, dword [ebp - 0x44]
push esi
call dword [ebp - 0x38]
push edi
call dword [ebp - 0x38]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [ebp - 0x30]
call fcn.0046d4f0
pop ebx
test eax, eax
je 0x484a89
push esi
push str.CService_::_StartAService_:_bRetVal___d_n
push 0x6ab2d0
call fcn.00599ee3
mov ecx, dword [str.EXIT:]
mov edx, dword [0x5ccefc]
mov eax, 0x6ab2d0
mov dword [0x6ab1d0], ecx
add esp, 0xc
mov dword [0x6ab1d4], edx
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x484a30
mov edi, 0x6ab1d0
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x484a41
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x6ab1d0
rep movsb byte es:[edi], byte [esi]
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d9d0
call fcn.0046d6a0
mov ecx, eax
call fcn.0046d510
mov eax, dword [ebp - 0x30]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00599ed4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
xor ecx, ebp
pop esi
call fcn.00599ed4
mov esp, ebp
pop ebp
ret 4