Function at 0x4029a0
Capabilities:
Query service status
Start service

Disassembly:
sub esp, 0x234
mov eax, dword [0x42ad20]
xor eax, esp
push ebx
push ebp
mov ebp, dword [esp + 0x248]
mov dword [esp + 0x238], eax
mov eax, dword [0x42ca00]
push esi
mov esi, dword [esp + 0x244]
mov ebx, 1
cmp eax, ebx
push edi
mov edi, dword [esp + 0x24c]
mov dword [esp + 0x14], esi
jne 0x402c06
push str._k_start
push edi
call fcn.0041352b
xor ebp, ebp
add esp, 8
cmp eax, ebp
je 0x402d4a
sub eax, edi
push eax
lea eax, [esp + 0x140]
push edi
push eax
call fcn.00413498
mov eax, dword [esp + 0x260]
add esp, 0xc
dec eax
je 0x402ac4
sub eax, 2
je 0x402a62
sub eax, 0x7d
jne 0x402d4a
lea edi, [esp + 0x13c]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402a33
mov ecx, dword [str.__k_restart__n]
mov edx, dword [0x424464]
mov eax, dword [0x424468]
mov dword [edi], ecx
mov ecx, dword [0x42446c]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
jmp 0x402b02
mov edx, dword [0x42bd6c]
push esi
push edx
lea eax, [esp + 0x40]
push 0x104
push eax
call fcn.00413942
mov edi, dword [0x42ca0c]
lea ecx, [esp + 0x48]
push ecx
call fcn.004024a0
lea edi, [esp + 0x150]
add esp, 0x14
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402a94
mov edx, dword [str.__k_start__n]
mov eax, dword [0x424454]
mov ecx, dword [0x424458]
mov dword [edi], edx
mov dx, word [0x42445c]
mov dword [edi + 4], eax
mov dword [edi + 8], ecx
mov word [edi + 0xc], dx
xor ebx, ebx
jmp 0x402b02
lea edi, [esp + 0x13c]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402ad0
mov eax, dword [str.__k_shutdown__n]
mov ecx, dword [0x424440]
mov edx, dword [0x424444]
mov dword [edi], eax
mov eax, dword [0x424448]
mov dword [edi + 4], ecx
mov cl, byte [0x42444c]
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], cl
mov eax, esi
mov edx, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402b06
lea edi, [esp + 0x13c]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402b17
mov ecx, eax
shr ecx, 2
mov esi, edx
mov edx, dword [0x42bc3c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.USER32.dll_SetCursor]
push edx
mov dword [0x42ca18], 1
call esi
lea eax, [esp + 0x13c]
push ebx
push eax
call fcn.00402900
add esp, 8
test eax, eax
jne 0x402bb7
movzx edx, word [0x42ca04]
push ebp
push ebp
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov eax, dword [0x42bd4c]
mov ecx, dword [esp + 0x10]
push 0x30
push eax
push ecx
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [0x42bdd8]
push eax
mov dword [0x42ca18], ebp
call esi
xor eax, eax
jmp 0x403083
cmp ebx, ebp
jne 0x402d4a
mov ecx, dword [esp + 0x14]
mov edx, dword [0x42bd70]
push ecx
push edx
lea eax, [esp + 0x40]
push 0x104
push eax
call fcn.00413942
mov edi, dword [0x42ca0c]
lea ecx, [esp + 0x48]
push ecx
call fcn.004024a0
mov edx, dword [0x42bdd8]
add esp, 0x14
push edx
mov dword [0x42ca18], ebp
call esi
mov eax, 1
jmp 0x403083
push ebx
push 0
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x34], ebx
jne 0x402c8c
mov dword [esp + 0x10], eax
mov eax, dword [0x42bd84]
test eax, eax
je 0x402c3f
mov ecx, dword [0x42bd4c]
push 0x30
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x403083
movzx eax, word [0x42ca04]
push 0
push 0
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [0x42bd4c]
mov edx, dword [esp + 0x10]
push 0x30
push ecx
push edx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x403083
push 0x134
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
xor ecx, ecx
cmp esi, ecx
jne 0x402d51
cmp edi, ecx
je 0x402cd3
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x254]
mov eax, dword [0x42bdd0]
push ebp
push ecx
push edx
push eax
call fcn.00401c10
add esp, 0x10
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x403083
mov eax, dword [0x42bd84]
cmp eax, ecx
mov dword [esp + 0x10], ecx
je 0x402cff
mov edx, dword [0x42bd4c]
push 0x30
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x403083
push ecx
push ecx
movzx ecx, word [0x42ca04]
lea eax, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov edx, dword [0x42bd4c]
mov eax, dword [esp + 0x10]
push 0x30
push edx
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x403083
mov edx, dword [0x42bc3c]
mov ebx, 1
push edx
mov dword [esp + 0x14], ecx
mov dword [0x42ca18], ebx
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, dword [esp + 0x254]
dec eax
je 0x402f29
sub eax, 2
je 0x402e80
sub eax, 0x7d
jne 0x402ff2
mov eax, dword [esp + 0x14]
mov ecx, dword [0x42bd7c]
push eax
push ecx
lea edx, [esp + 0x40]
push 0x104
push edx
call fcn.00413942
mov edi, dword [0x42ca0c]
lea eax, [esp + 0x48]
push eax
call fcn.004024a0
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
add esp, 0x14
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
je 0x402ddc
cmp dword [esp + 0x1c], ebx
jne 0x402ddc
mov dword [esp + 0x10], ebx
jmp 0x402ff2
lea edx, [esp + 0x18]
push edx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
je 0x402e2e
push 0x3e8
call ebp
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
je 0x402e2e
mov ebx, 3
jmp 0x402e10
cmp dword [esp + 0x1c], ebx
jne 0x402e29
push 0x3e8
call ebp
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
jne 0x402e10
mov ebx, 1
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x402e6a
push 0x3e8
call ebp
lea edx, [esp + 0x18]
push edx
push esi
call edi
test eax, eax
je 0x402e6a
cmp dword [esp + 0x1c], 2
jne 0x402e6a
push 0x3e8
call ebp
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
jne 0x402e50
cmp dword [esp + 0x1c], 4
jne 0x402ff2
mov edx, dword [0x42bd80]
jmp 0x402fc6
mov ebx, dword [esp + 0x14]
mov edx, dword [0x42bd6c]
push ebx
push edx
lea eax, [esp + 0x40]
push 0x104
push eax
call fcn.00413942
mov edi, dword [0x42ca0c]
lea ecx, [esp + 0x48]
push ecx
call fcn.004024a0
add esp, 0x14
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
je 0x402efa
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call ebp
lea edx, [esp + 0x18]
push edx
push esi
call edi
test eax, eax
je 0x402efa
lea esp, [esp]
cmp dword [esp + 0x1c], 2
jne 0x402efa
push 0x3e8
call ebp
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
jne 0x402ee0
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
je 0x402ff2
cmp dword [esp + 0x1c], 4
jne 0x402ff2
mov edx, dword [0x42bd70]
mov dword [esp + 0x10], 1
push ebx
jmp 0x402fcf
mov edx, dword [esp + 0x14]
mov eax, dword [0x42bd74]
push edx
push eax
lea ecx, [esp + 0x40]
push 0x104
push ecx
call fcn.00413942
mov edi, dword [0x42ca0c]
lea edx, [esp + 0x48]
push edx
call fcn.004024a0
add esp, 0x14
lea eax, [esp + 0x18]
push eax
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
je 0x402fae
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call ebp
lea ecx, [esp + 0x18]
push ecx
push esi
call edi
test eax, eax
je 0x402fae
mov ebx, 3
jmp 0x402f90
cmp dword [esp + 0x1c], ebx
jne 0x402fa9
push 0x3e8
call ebp
lea edx, [esp + 0x18]
push edx
push esi
call edi
test eax, eax
jne 0x402f90
mov ebx, 1
lea eax, [esp + 0x18]
push eax
push esi
call edi
test eax, eax
je 0x402ff2
cmp dword [esp + 0x1c], ebx
jne 0x402ff2
mov edx, dword [0x42bd78]
mov ecx, dword [esp + 0x14]
push ecx
mov dword [esp + 0x14], ebx
push edx
lea eax, [esp + 0x40]
push 0x104
push eax
call fcn.00413942
mov edi, dword [0x42ca0c]
lea ecx, [esp + 0x48]
push ecx
call fcn.004024a0
add esp, 0x14
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
mov edx, dword [esp + 0x34]
push edx
call esi
mov edi, dword [esp + 0x10]
xor esi, esi
cmp edi, esi
jne 0x40306e
mov eax, dword [0x42bd84]
cmp eax, esi
mov dword [esp + 0x10], esi
je 0x40302c
mov ecx, dword [0x42bd4c]
push 0x30
push ecx
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x40306e
movzx eax, word [0x42ca04]
push esi
push esi
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [0x42bd4c]
mov edx, dword [esp + 0x10]
push 0x30
push ecx
push edx
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [0x42bdd8]
push ecx
mov dword [0x42ca18], esi
call dword [sym.imp.USER32.dll_SetCursor]
mov eax, edi
mov ecx, dword [esp + 0x240]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004131be
add esp, 0x234
ret