Function at 0x100497b0
Capabilities:
Allocate thread local storage
Query service status

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
push 3
mov ebx, ecx
lea ecx, [ebp - 0x48]
pop edi
push edi
mov dword [ebp - 0x18], ebx
call fcn.10015d9e
xor edx, edx
mov dword [ebp - 0xc], 0xe7d8a870
mov dword [ebp - 8], edx
jmp 0x100497e4
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x48]
mov dword [eax + ecx*4], edx
inc dword [ebp - 8]
cmp dword [ebp - 8], edi
jl 0x100497d8
mov dword [ebp - 8], edx
jmp 0x100497fc
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x1c], 0xda4d073f
inc dword [ebp - 8]
cmp dword [ebp - 8], 1
jl 0x100497ee
push 2
mov dword [ebp - 0xc], edx
pop esi
jmp 0x1004982e
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x48]
mov eax, dword [ecx + eax*4]
mov dword [ecx + edx*4], eax
xor eax, eax
mov byte [ebp - 1], al
cmp byte [ebp - 1], al
je 0x1004982b
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jle 0x1004980a
lea ecx, [ebp - 0x48]
call fcn.100165bb
push ebx
push 0x2ac0
push 1
push 0x3f2e
call fcn.10044a84
add esp, 0x10
mov dword [ebp - 0x10], 0x3d06
mov dword [ebp - 0xc], 0x16df251d
lea ecx, [ebp - 0x30]
mov dword [ebp - 8], 8
push edi
call fcn.10015d9e
mov dword [ebp - 0x14], 0xfffffff6
xor edx, edx
mov dword [ebp - 0xc], 0xe605a420
mov dword [ebp - 0x14], 0x4feccdf
mov dword [ebp - 0xc], 0x7b20295d
mov dword [ebp - 0xc], edx
jmp 0x100498a1
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x30]
mov dword [eax + ecx*4], 0x83066c93
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edi
jl 0x10049891
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], edx
jne 0x100498b9
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], edx
jmp 0x100498ec
mov dword [ebp - 0xc], esi
cmp dword [ebp - 0xc], edx
jl 0x10049a4a
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ecx + eax*4]
mov dword [ecx + edx*4], eax
dec dword [ebp - 0xc]
jns 0x100498c5
jmp 0x10049a4a
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x3c], 0x61c44381
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], edi
jl 0x100498de
mov dword [ebp - 8], edx
cmp dword [ebp - 8], esi
jg 0x10049a2b
mov dword [ebp - 0x14], 0xffffffff
xor edx, edx
mov dword [ebp - 0xc], 0x8236511f
mov dword [ebp - 0xc], 6
mov dword [ebp - 0x14], 9
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
cmp dword [ecx + esi*4], eax
mov ecx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
setle dl
add ecx, edx
xor edx, edx
imul ecx, dword [eax + edi*4]
mov eax, dword [ebp - 0x34]
cmp ecx, eax
mov eax, dword [ebp - 0x30]
setg dl
xor ecx, ecx
cmp edx, dword [eax]
setg cl
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
add ecx, 0x469bf966
add eax, ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
mov eax, dword [ebp - 0xc]
add eax, dword [ecx + edx*4]
jne 0x10049986
cmp dword [ebp - 0x14], eax
je 0x10049989
xor eax, eax
inc eax
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x30]
add eax, dword [ecx + edx*4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x30]
cmp eax, dword [ecx + edx*4]
mov eax, dword [ebp - 0x38]
setne bl
xor ecx, ecx
cmp ebx, eax
setne cl
mov dword [ebp - 0x14], ecx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
cmp eax, 0xb76a
setge cl
sub ecx, dword [ebp - 0x10]
neg ecx
sbb ecx, ecx
add ecx, 0xffff000b
mov dword [ebp - 0x14], ecx
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x38]
neg ecx
sbb ecx, ecx
xor eax, eax
neg ecx
cmp ecx, 0xc5f2
setl al
xor edx, edx
mov dword [ebp - 0xc], eax
mov byte [ebp - 1], dl
cmp byte [ebp - 1], dl
je 0x10049a19
push edx
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
xor edx, edx
inc dword [ebp - 8]
push 2
pop esi
cmp dword [ebp - 8], esi
jle 0x100498fd
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0xc], edx
jmp 0x10049a44
mov byte [ebp - 1], dl
cmp byte [ebp - 1], 0
je 0x10049a41
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
xor edx, edx
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0xfffffffb
jge 0x10049a30
lea ecx, [ebp - 0x30]
call fcn.100165bb
push ebx
call fcn.1002da0a
xor ebx, ebx
mov dword [ebp - 8], 1
pop ecx
mov edi, eax
mov dword [ebp - 0xc], ebx
jmp 0x10049a73
mov ecx, dword [ebp - 0xc]
mov dword [ebp + ecx*4 - 0x54], ebx
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], 3
jl 0x10049a69
mov dword [ebp - 0xc], ebx
jmp 0x10049a8c
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x24], 0x9cd4431f
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jl 0x10049a7e
mov byte [ebp - 1], bl
cmp byte [ebp - 1], bl
je 0x10049aa2
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
mov dword [ebp - 8], ebx
jmp 0x10049b3b
mov dword [ebp - 0x10], 0x53bc
cmp dword [ebp - 0x10], ebx
je 0x10049ac2
mov dword [ebp - 0x14], 8
inc dword [ebp - 0x14]
jmp 0x10049b33
mov dword [ebp - 0xc], 0xffffffff
cmp dword [ebp - 0x10], ebx
je 0x10049ad8
cmp dword [ebp - 0xc], ebx
je 0x10049ad8
xor esi, esi
inc esi
jmp 0x10049ada
mov esi, ebx
xor ecx, ecx
mov dword [ebp - 0x20], 0xce3051eb
mov eax, dword [ebp - 0xc]
cmp eax, 0xce3051eb
setg cl
xor edx, edx
sub ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
cmp eax, ecx
setge dl
sub edx, dword [ebp - 0xc]
neg edx
sbb edx, edx
inc edx
sub esi, edx
sub esi, dword [ebp - 0x10]
add esi, 4
je 0x10049b2b
cmp dword [ebp - 0x10], ebx
jne 0x10049b44
push 2
mov dword [ebp - 0xc], ebx
pop esi
jmp 0x10049b24
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x24], esi
inc dword [ebp - 0xc]
cmp dword [ebp - 0xc], esi
jl 0x10049b1a
jmp 0x10049b33
cmp dword [ebp - 0x10], ebx
jne 0x10049b44
push 2
pop esi
cmp dword [ebp - 0x20], ebx
jne 0x10049b44
inc dword [ebp - 8]
cmp dword [ebp - 8], esi
jle 0x10049aaa
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret