Function at 0x10039863
Capabilities:
Modify service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x10039c81
push ebx
push edi
push dword [esi]
xor ebx, ebx
push ebx
push dword [esi + 4]
call fcn.1002140c
mov dword [ebp - 0xc], 0x91a049fe
add esp, 0xc
mov dword [ebp - 0x14], ebx
jmp 0x100398a1
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x4c], 0xe785c2f4
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 3
jl 0x10039893
push 1
mov dword [ebp - 0xc], ebx
pop edi
jmp 0x100399ef
mov dword [ebp - 8], 8
mov dword [ebp - 0x1c], 0xf86f25db
mov dword [ebp - 0x14], ebx
jmp 0x100398d3
mov eax, dword [ebp - 0x14]
mov dword [ebp + eax*4 - 0x28], 0x124f84b8
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 2
jl 0x100398c5
mov dword [ebp - 8], edi
cmp dword [ebp - 8], ebx
jl 0x100399ec
mov dword [ebp - 0x10], 0x8f3c34ee
mov dword [ebp - 0x18], 0x169ff4ca
mov dword [ebp - 0x10], edi
cmp dword [ebp - 0x10], ebx
jl 0x100399dd
mov dword [ebp - 0x14], 0xb055cc25
mov dword [ebp - 0x14], edi
cmp dword [ebp - 0x14], ebx
jl 0x100399af
mov dword [ebp - 0x18], 0x1ef9953e
cmp dword [ebp - 0x14], ebx
je 0x1003994f
mov ecx, dword [ebp - 0x14]
xor edx, edx
mov eax, dword [ebp - 0xc]
cmp eax, ecx
mov eax, dword [ebp - 0xc]
setne dl
xor ecx, ecx
cmp edx, eax
setge cl
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], ebx
je 0x10039944
mov eax, edi
cmp dword [ebp - 8], ebx
jne 0x10039946
mov eax, ebx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp - 8]
mov eax, dword [ebp - 8]
xor edx, edx
push 0
mov ecx, dword [ebp + eax*4 - 0x28]
mov eax, dword [ebp - 0x10]
cmp ecx, eax
setg dl
xor ebx, ebx
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + eax*4 - 0x28]
add ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x14]
cmp ecx, eax
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
setg bl
xor edx, edx
cmp ecx, eax
mov eax, dword [ebp - 0x10]
setne dl
xor ecx, ecx
cmp edx, eax
mov eax, dword [ebp - 8]
setl cl
xor edx, edx
cmp ebx, ecx
pop ebx
setl dl
sub edx, dword [ebp + eax*4 - 0x28]
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x28], edx
dec dword [ebp - 0x14]
jns 0x10039912
mov eax, dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ebx
mov eax, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + eax*4 - 0x28]
imul ecx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
sub eax, ecx
mov dword [ebp - 0x48], eax
dec dword [ebp - 0x10]
jns 0x100398ff
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
dec dword [ebp - 8]
jns 0x100398e5
dec dword [ebp - 0xc]
cmp dword [ebp - 0xc], 0xfffffff6
jle 0x100398b2
push dword [esi + 4]
call fcn.1005f5e2
mov dword [ebp - 0x14], 0x56834504
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x1c], 0xd3e9
pop ecx
mov dword [ebp - 0x18], ebx
jmp 0x10039a26
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x20], 0x82b4746a
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], edi
jl 0x10039a18
cmp dword [ebp - 0x14], ebx
je 0x10039a5f
mov byte [ebp - 1], bl
cmp byte [ebp - 1], 0
je 0x10039aee
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x55e
push 0x2474
push 0x18d5
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigW]
jmp 0x10039aee
mov dword [ebp - 0x18], 9
mov dword [ebp - 0x1c], edi
cmp dword [ebp - 0x14], ebx
je 0x10039a79
mov dword [ebp - 0x20], 0xfaf0
mov edx, edi
jmp 0x10039a7b
mov edx, ebx
imul eax, dword [ebp - 0x1c], 0xcb8f
xor ecx, ecx
cmp eax, 0xfffffffb
setne cl
cmp ecx, dword [ebp - 0x14]
je 0x10039a94
cmp dword [ebp - 0x14], ebx
jne 0x10039a9b
cmp dword [ebp - 0x1c], ebx
jne 0x10039a9b
mov edi, ebx
mov eax, dword [ebp - 0x18]
xor ecx, ecx
cmp eax, edx
mov eax, dword [ebp - 0x14]
setle cl
xor edx, edx
cmp ecx, edi
setl dl
xor ecx, ecx
cmp eax, edx
mov eax, dword [ebp - 0x14]
setle cl
add eax, 0x86d6
add eax, ecx
imul eax, dword [ebp - 0x1c]
test eax, eax
je 0x10039ad4
cmp dword [ebp - 0x1c], ebx
je 0x10039ad4
xor edi, edi
inc edi
mov edx, edi
jmp 0x10039ad9
xor edi, edi
mov edx, ebx
inc edi
mov eax, dword [ebp - 0x14]
xor ecx, ecx
cmp edx, eax
setg cl
sub ecx, dword [ebp - 0x18]
neg ecx
sbb ecx, ecx
inc ecx
mov dword [ebp - 0x1c], ecx
mov dword [esi + 4], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0x1c], 0x35290ce9
mov dword [ebp - 0x18], 0x32e0c280
push 3
mov dword [ebp - 0x18], edi
mov dword [ebp - 8], ebx
pop ecx
jmp 0x10039b1b
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x34], 0x41b3c692
inc dword [ebp - 8]
cmp dword [ebp - 8], ecx
jl 0x10039b0d
mov dword [ebp - 8], ebx
jmp 0x10039b33
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x74], 0xea0c8d4
inc dword [ebp - 8]
cmp dword [ebp - 8], 4
jl 0x10039b25
mov dword [ebp - 8], ebx
jmp 0x10039b4c
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x58], 0xfffffffd
inc dword [ebp - 8]
cmp dword [ebp - 8], ecx
jl 0x10039b3e
mov dword [ebp - 8], ebx
jmp 0x10039b64
mov eax, dword [ebp - 8]
mov dword [ebp + eax*4 - 0x40], 0x13e0
inc dword [ebp - 8]
cmp dword [ebp - 8], ecx
jl 0x10039b56
mov dword [ebp - 8], ebx
jmp 0x10039c73
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], 0xd538770c
mov dword [ebp - 0x18], 0xfffffffa
mov dword [ebp - 0x18], 5
mov dword [ebp - 0x18], 0x227283a3
mov dword [ebp - 0x18], 0xc29aeda1
mov dword [ebp - 0x18], 0xbb4ee00b
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x18], 0x8a59c2d
mov dword [ebp - 0x18], 0x46ac1dea
mov dword [ebp - 0x18], 0xa0dcb3df
mov dword [ebp - 0x18], ebx
jmp 0x10039bc9
mov eax, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x64], 0x3c77d98a
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], ecx
jl 0x10039bbb
mov eax, dword [ebp - 8]
mov eax, dword [ebp + eax*4 - 0x34]
mov eax, dword [ebp - 8]
mov eax, dword [ebp + eax*4 - 0x34]
mov eax, dword [ebp - 8]
mov eax, dword [ebp + eax*4 - 0x34]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov eax, dword [ebp + eax*4 - 0x34]
dec dword [ebp - 0x1c]
mov dword [ebp - 0x58], ebx
mov eax, dword [ebp - 8]
cmp dword [ebp + eax*4 - 0x34], ebx
jne 0x10039c0e
mov eax, dword [ebp - 8]
cmp dword [ebp + eax*4 - 0x34], ebx
je 0x10039c19
mov eax, dword [ebp - 8]
mov edx, edi
cmp dword [ebp + eax*4 - 0x34], ebx
jne 0x10039c1b
mov edx, ebx
mov eax, dword [ebp - 8]
xor ecx, ecx
mov eax, dword [ebp + eax*4 - 0x34]
cmp edx, eax
mov eax, dword [ebp - 0x2c]
setle cl
xor edx, edx
cmp ecx, eax
mov eax, dword [ebp - 0x14]
setle dl
xor ecx, ecx
cmp edx, eax
setg cl
cmp ecx, dword [ebp - 8]
je 0x10039c49
mov edx, edi
cmp dword [ebp - 0x2c], ebx
jne 0x10039c4b
mov edx, ebx
mov eax, dword [ebp - 8]
push 3
mov eax, dword [ebp + eax*4 - 0x34]
mov ecx, dword [ebp - 8]
imul ecx, edx
sub ecx, eax
mov eax, dword [ebp - 8]
neg ecx
sbb ecx, ecx
inc ecx
imul ecx, dword [ebp + eax*4 - 0x34]
mov dword [ebp - 0x14], ecx
dec dword [ebp - 0x38]
inc dword [ebp - 8]
pop ecx
cmp dword [ebp - 8], 2
jle 0x10039b71
pop edi
mov dword [esi], ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret