Function at 0x440970
Capabilities:
Create service
Delete service
Query service status
Start service
Stop service

Disassembly:
sub esp, 0x524
push ebx
push ebp
push edi
mov edi, dword [esp + 0x53c]
mov al, byte [edi]
xor ebx, ebx
xor ebp, ebp
cmp al, 0x2f
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
je 0x440996
cmp al, 0x2d
jne 0x440a08
inc edi
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4409a0
sub eax, edx
cmp eax, 6
jb 0x4409ed
push 6
push str.compat
push edi
call fcn.0044cd17
add esp, 0xc
test eax, eax
jne 0x4409ed
mov al, byte [edi + 6]
add edi, 6
cmp al, 0x20
jne 0x4409d8
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
cmp al, 0x20
je 0x4409d0
push edi
call fcn.00440510
add esp, 4
pop edi
pop ebp
pop ebx
add esp, 0x524
ret 0x10
push str.install
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440ae2
mov ebp, 1
push esi
push 1
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebx
mov ebx, dword [sym.imp.USER32.dll_MessageBoxA]
je 0x440c94
push accept
push 0x46640c
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x440bbf
lea eax, [esp + 0x28]
push eax
push edi
mov dword [esp + 0x18], 1
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x440bb8
mov eax, dword [esp + 0x2c]
cmp eax, 2
mov dword [esp + 0x14], eax
jne 0x440bb8
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
mov ecx, dword [str.FileZilla_Server_Service]
lea edx, [esp + 0x18]
xor esi, esi
push edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], 0x440830
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherA]
test eax, eax
jne 0x440e38
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x150]
push str.StartServiceCtrlDispatcher_failed_with_error__d
push eax
call fcn.0044c02b
add esp, 0xc
push esi
push str.Error_while_starting_service
lea ecx, [esp + 0x154]
push ecx
push esi
call ebx
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x524
ret 0x10
push str.uninstall
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440afe
mov ebp, 2
jmp 0x440a08
push str.start
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440b1a
mov ebp, 3
jmp 0x440a08
push str.stop
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440b36
mov ebp, 4
jmp 0x440a08
push str.install_auto
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440b52
mov ebp, 5
jmp 0x440a08
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x440b57
sub eax, edx
cmp eax, 0xa
jb 0x440b79
push 0xa
push str.adminport
push edi
call fcn.0044cd17
add esp, 0xc
test eax, eax
je 0x440ba0
push str.reload_config
push edi
call fcn.0044c9a6
add esp, 8
test eax, eax
jne 0x440a08
call fcn.00440140
pop edi
pop ebp
pop ebx
add esp, 0x524
ret 0x10
add edi, 0xa
push edi
call fcn.00440010
add esp, 4
pop edi
pop ebp
pop ebx
add esp, 0x524
ret 0x10
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x440cc8
cmp ebp, 1
je 0x440bfc
cmp ebp, 5
je 0x440bfc
test ebp, ebp
jne 0x440e38
push 0x24
push str.Question
push str.Install_Service_
push ebp
call ebx
cmp eax, 6
jne 0x440e38
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x440c82
xor edx, edx
cmp ebp, 5
setne dl
add edx, 2
test ebp, ebp
mov edi, edx
jne 0x440c38
push 0x24
push str.Question
push str.Autostart_service_
push ebp
call ebx
cmp eax, 6
jne 0x440c38
mov edi, 2
push 0x104
lea eax, [esp + 0x48]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x58]
push ecx
push 1
push edi
push 0x110
push 0xf01ff
push str.FileZilla_Server_FTP_server
push 0x46640c
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x440cba
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x524
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x440bd2
dec edi
push edi
call fcn.00440510
add esp, 4
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x524
ret 0x10
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push eax
call edi
push esi
call edi
jmp 0x440cd3
cmp dword [esp + 0x14], 1
jne 0x440dc9
cmp ebp, 3
je 0x440cf0
test ebp, ebp
jne 0x440d49
push 0x24
push str.Question
push str.Start_server_
push ebp
call ebx
cmp eax, 6
jne 0x440d5d
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x440c82
push 0xf01ff
push 0x46640c
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x440d39
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0x524
ret 0x10
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
jmp 0x440e2c
cmp ebp, 2
je 0x440d76
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x524
ret 0x10
push 0x24
push str.Question
push str.Uninstall_Service_
push 0
call ebx
cmp eax, 6
jne 0x440e38
push 2
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
je 0x440c82
push 0xf01ff
push 0x46640c
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
je 0x440c7b
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push esi
call edi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x524
ret 0x10
cmp ebp, 4
je 0x440dea
test ebp, ebp
jne 0x440e38
push 0x24
push str.Question
push str.Stop_Server_
push ebp
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x440e38
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x440c82
push 0xf01ff
push 0x46640c
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x440d20
lea edx, [esp + 0x28]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x524
ret 0x10