Function at 0x4098d0
Capabilities:
Allocate thread local storage

Disassembly:
sub esp, 0x14
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call fcn.004016e0
push 0x20000
call fcn.00412306
add eax, 0x20
push eax
call fcn.004138f4
add esp, 4
push eax
call fcn.004137fd
add esp, 8
push 0x20000
call fcn.00412306
add eax, 0x40
push eax
call fcn.004138f4
add esp, 4
push eax
call fcn.004137fd
add esp, 8
call fcn.00409630
call fcn.00408020
test eax, eax
je 0x409933
push 0x6f
call fcn.004136a9
push ebx
push ebp
mov ebp, dword [esp + 0x20]
cmp ebp, 1
push esi
push edi
jle 0x409c80
mov ebx, dword [esp + 0x2c]
lea esi, [ebx + 4]
push esi
lea edi, [ebp - 1]
push edi
push str.TERM
call fcn.00409880
add esp, 0xc
test al, al
je 0x409987
push esi
push edi
push 0x41dc6c
call fcn.00409880
movzx eax, al
lea ecx, [ebx + eax*4 + 8]
push ecx
push 1
push 1
call fcn.0040ec70
add esp, 0x18
push eax
call fcn.004136a9
mov edx, dword [esi]
push str.start
push edx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x4099b3
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 0
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
push esi
push edi
push 0x41dc6c
call fcn.00409880
add esp, 0xc
test al, al
je 0x4099ec
push esi
push edi
push 0x41dc6c
call fcn.00409880
movzx eax, al
lea ecx, [ebx + eax*4 + 8]
push ecx
push 1
push 0
call fcn.0040ec70
add esp, 0x18
push eax
call fcn.004136a9
mov edx, dword [esi]
push str.stop
push edx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409a18
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 1
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov eax, dword [esi]
push str.restart
push eax
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409a5a
lea esi, [ebx + 8]
push esi
lea edi, [ebp - 2]
push edi
push 1
call fcn.0040ec70
add esp, 0xc
test eax, eax
je 0x409a48
push eax
call fcn.004136a9
push esi
push edi
push 0
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov ecx, dword [esi]
push str.pause
push ecx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409a86
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 2
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov edx, dword [esi]
push str.continue
push edx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409ab2
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 3
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov eax, dword [esi]
push str.status
push eax
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409ade
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 4
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov ecx, dword [esi]
push str.rotate
push ecx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409b0d
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
push 0x80
call fcn.0040ec70
add esp, 0xc
push eax
call fcn.004136a9
mov edx, dword [esi]
push str.install
push edx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409b54
cmp byte [0x42340d], 0
jne 0x409b3e
push ebx
mov eax, 0x400001f6
call fcn.004096b0
add esp, 4
push eax
call fcn.004136a9
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
call fcn.0040fc70
add esp, 8
push eax
call fcn.004136a9
mov eax, dword [esi]
push str.edit
push eax
call fcn.004094c0
add esp, 8
test eax, eax
jne 0x409c0b
mov ecx, dword [esi]
push 0x41dbe0
push ecx
call fcn.004094c0
add esp, 8
test eax, eax
jne 0x409c0b
mov edx, dword [esi]
push 0x41dbd8
push edx
call fcn.004094c0
add esp, 8
test eax, eax
jne 0x409c0b
mov eax, dword [esi]
push str.reset
push eax
call fcn.004094c0
add esp, 8
test eax, eax
jne 0x409c0b
mov ecx, dword [esi]
push str.unset
push ecx
call fcn.004094c0
add esp, 8
test eax, eax
jne 0x409c0b
mov edx, dword [esi]
push str.remove
push edx
call fcn.004094c0
add esp, 8
test eax, eax
je 0x409c80
cmp byte [0x42340d], 0
jne 0x409bf5
push ebx
mov eax, 0x400001f8
call fcn.004096b0
add esp, 4
push eax
call fcn.004136a9
add ebx, 8
push ebx
add ebp, 0xfffffffe
push ebp
call fcn.0040e9a0
add esp, 8
push eax
call fcn.004136a9
push esi
push edi
call fcn.0040d870
mov ecx, eax
add esp, 8
mov dword [esp + 0x10], ecx
cmp ecx, 3
jne 0x409c41
cmp byte [0x42340d], 0
jne 0x409c41
cmp ebp, eax
jne 0x409c41
push ebx
mov eax, 0x400001f7
call fcn.004096b0
add esp, 4
push eax
call fcn.004136a9
xor eax, eax
test ebp, ebp
jle 0x409c7a
mov esi, dword [ebx + eax*4]
mov ecx, esi
lea edi, [ecx + 2]
nop
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x409c50
sub ecx, edi
sar ecx, 1
lea edx, [ecx + ecx]
mov ecx, esi
test edx, edx
je 0x409c71
mov byte [ecx], 0
inc ecx
sub edx, 1
jne 0x409c68
inc eax
cmp eax, ebp
jl 0x409c47
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004136a9
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp byte [0x42340d], 0
mov dword [0x4233c0], eax
je 0x409c99
call fcn.0040a630
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
jne 0x409cdb
lea eax, [esp + 0x14]
xor esi, esi
push eax
mov dword [esp + 0x18], str.NSSM
mov dword [esp + 0x1c], 0x40fe20
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x409d11
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x427
jne 0x409ceb
push 1
call fcn.004095e0
add esp, 4
push eax
call fcn.004136a9
push esi
push eax
call fcn.00404fa0
add esp, 4
push eax
push 0xc00003e9
push 1
call fcn.004050e0
add esp, 0x10
call fcn.00408190
push 0x64
call fcn.004136a9
push esi
call fcn.004136a9
int3