Function at 0x408240
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495f96
mov eax, dword fs:[0]
push eax
sub esp, 0x254
mov eax, dword [0x4c63ac]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 8]
push ebx
push dword [ebx + 4]
mov dword [ebp - 0x25c], eax
push dword [ebx]
mov dword [ebp - 0x250], 0
call fcn.004031b0
mov eax, dword [ebx]
lea ecx, [ebx + 0x10]
mov dword [ebx + 4], eax
add esp, 0xc
mov dword [ebx + 0xc], 0
cmp dword [ebx + 0x24], 8
jb 0x4082a9
mov ecx, dword [ebx + 0x10]
xor eax, eax
mov dword [ebx + 0x20], 0
mov word [ecx], ax
lea ecx, [ebx + 0x28]
cmp dword [ebx + 0x3c], 8
jb 0x4082c1
mov ecx, dword [ebx + 0x28]
mov dword [ebx + 0x38], eax
lea edi, [ebx + 0x44]
xor eax, eax
mov word [ecx], ax
mov ecx, edi
mov dword [ebx + 0x40], eax
mov esi, dword [edi]
push dword [esi + 4]
push edi
call fcn.004067c0
lea ecx, [ebx + 0x4c]
mov dword [esi + 4], esi
mov dword [esi], esi
mov eax, ecx
mov dword [esi + 8], esi
mov dword [edi + 4], 0
cmp dword [ecx + 0x14], 8
mov dword [ebp - 0x260], ecx
jb 0x4082fe
mov eax, dword [ecx]
mov dword [ecx + 0x10], 0
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x25c]
cmp dword [ecx + 0x10], 0
je 0x408b89
cmp dword [ecx + 0x14], 8
mov eax, ecx
mov dword [ebp - 0x258], 0
jb 0x40832e
mov eax, dword [ecx]
lea ecx, [ebp - 0x258]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov edi, eax
mov dword [ebp - 0x254], edi
test edi, edi
je 0x4084ad
mov ecx, dword [ebx + 8]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx]
imul ecx
mov ecx, dword [ebp - 0x258]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jbe 0x408386
cmp ecx, 0xaaaaaaa
ja 0x408ba9
push ecx
mov ecx, ebx
call fcn.004093e0
mov ecx, dword [ebp - 0x258]
xor esi, esi
test ecx, ecx
jle 0x4084a6
mov edx, dword [edi + esi*4]
test edx, edx
je 0x40849d
mov ecx, edx
mov dword [ebp - 0x230], 0
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4083c7
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.00402db0
mov ecx, dword [ebx + 4]
mov dword [ebp - 4], 0
cmp ecx, dword [ebx + 8]
je 0x40843b
mov eax, dword [ebp - 0x230]
mov edx, 7
mov dword [ecx], eax
mov eax, dword [ebp - 0x22c]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0x224]
mov dword [ecx + 0xc], eax
mov eax, dword [ebp - 0x220]
mov dword [ecx + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [ecx + 0x14], eax
xor eax, eax
add dword [ebx + 4], 0x18
mov word [ebp - 0x230], ax
jmp 0x408450
lea eax, [ebp - 0x230]
push eax
push ecx
mov ecx, ebx
call fcn.00406530
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x408491
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408487
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408bb3
push edx
push ecx
call fcn.0046d9fd
add esp, 8
mov edi, dword [ebp - 0x254]
mov ecx, dword [ebp - 0x258]
inc esi
cmp esi, ecx
jl 0x408390
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebx + 4]
mov eax, 0x2aaaaaab
mov esi, dword [ebx]
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jbe 0x408526
cmp dword [esi + 0x2c], 8
lea eax, [esi + 0x18]
mov ecx, dword [eax + 0x10]
jb 0x4084d8
mov eax, dword [eax]
cmp ecx, 0xc
jne 0x408526
push ecx
push 0x49f5fc
push eax
call fcn.00404f20
add esp, 0xc
test eax, eax
jne 0x408526
lea eax, [esi + 0x30]
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.0041e6e0
add esp, 8
mov dword [ebp - 0x250], 1
mov ecx, eax
push 0
push 0x49f794
call fcn.00404f80
mov byte [ebp - 0x249], 1
test eax, eax
je 0x40852d
mov byte [ebp - 0x249], 0
test byte [ebp - 0x250], 1
je 0x408541
lea ecx, [ebp - 0x248]
call fcn.004022a0
cmp byte [ebp - 0x249], 0
je 0x40855b
mov ecx, dword [ebx]
push 0x10
add ecx, 0x18
push str._jsapihttpserver
call fcn.00402db0
mov edi, dword [ebx + 4]
mov eax, 0x2aaaaaab
mov esi, dword [ebx]
mov ecx, edi
sub ecx, esi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x408603
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x408585
mov eax, dword [esi]
push eax
lea edi, [ebx + 0x10]
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x4085df
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0046f980
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4085c6
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
jmp 0x4085f0
cmp edi, esi
je 0x4085f7
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x4085ee
mov esi, dword [esi]
push eax
push esi
mov ecx, edi
call fcn.00402db0
mov dword [ebx + 0x40], 1
mov edi, dword [ebx + 4]
mov esi, dword [ebx]
sub edi, esi
mov eax, 0x2aaaaaab
imul edi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jb 0x408b89
add esi, 0x18
lea edi, [ebx + 0x28]
cmp edi, esi
je 0x40863d
cmp dword [esi + 0x14], 8
mov eax, dword [esi + 0x10]
jb 0x408634
mov esi, dword [esi]
push eax
push esi
mov ecx, edi
call fcn.00402db0
cmp dword [edi + 0x14], 8
jb 0x408645
mov edi, dword [edi]
push str.LocalService
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x408661
mov eax, 1
jmp 0x408712
push str.InstallService
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x40867d
mov eax, 2
jmp 0x408712
push str.UninstallService
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x408696
mov eax, 3
jmp 0x408712
push str.RepairService
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x4086af
mov eax, 4
jmp 0x408712
push str.CheckService
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x4086c8
mov eax, 5
jmp 0x408712
push str.Stop
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x4086e1
mov eax, 6
jmp 0x408712
push 0x49f878
push edi
call fcn.0041e4b0
add esp, 8
test eax, eax
jne 0x4086fa
mov eax, 7
jmp 0x408712
push str.UpdateService
push edi
call fcn.0041e4b0
add esp, 8
neg eax
sbb eax, eax
and eax, 0xfffffff8
add eax, 8
mov dword [ebx + 0xc], eax
mov esi, 2
mov dword [ebx + 0x40], 2
mov eax, 0x2aaaaaab
mov ecx, dword [ebx + 4]
mov edi, dword [ebx]
sub ecx, edi
imul ecx
mov ecx, dword [ebx + 4]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, esi
jbe 0x408808
mov eax, esi
mov edx, edi
mov dword [ebp - 0x254], eax
mov edi, edi
lea eax, [eax + eax*2]
lea esi, [edx + eax*8]
mov edx, dword [esi + 0x10]
cmp edx, 2
jb 0x408893
mov eax, dword [esi + 0x14]
mov ecx, esi
cmp eax, 8
jb 0x40876e
mov ecx, dword [esi]
cmp word [ecx], 0x2f
jne 0x4087a8
mov ecx, esi
cmp eax, 8
jb 0x408782
mov eax, dword [esi]
lea edi, [eax + edx*2]
jmp 0x408787
lea edi, [esi + edx*2]
jb 0x408789
mov ecx, dword [ecx]
xor edx, edx
cmp ecx, edi
je 0x4087a8
nop
cmp word [ecx], 0x2f
lea eax, [edx + 1]
cmovne eax, edx
add ecx, 2
mov edx, eax
cmp ecx, edi
jne 0x408790
cmp edx, 1
je 0x4087b8
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4087b2
mov eax, dword [esi]
cmp word [eax], 0x2d
jne 0x408800
push esi
mov ecx, ebx
call fcn.00407d10
mov esi, dword [ebx + 0x40]
inc esi
mov dword [ebx + 0x40], esi
mov eax, dword [ebx + 4]
mov ecx, eax
mov edi, dword [ebx]
sub ecx, edi
mov dword [ebp - 0x254], eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, edi
cmp esi, eax
jae 0x408805
mov ecx, dword [ebp - 0x254]
mov eax, esi
mov dword [ebp - 0x254], esi
jmp 0x408750
mov edi, dword [ebx]
mov esi, dword [ebx + 0x40]
mov ecx, dword [ebx + 4]
sub ecx, edi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jae 0x408a29
lea eax, [esi + esi*2]
cmp dword [edi + eax*8 + 0x14], 8
lea esi, [edi + eax*8]
mov edi, dword [esi + 0x10]
mov ecx, esi
jb 0x408837
mov ecx, dword [esi]
test edi, edi
je 0x4088a3
or edx, 0xffffffff
lea eax, [edi - 1]
cmp eax, edx
cmovb edx, eax
add edx, edx
cmp word [edx + ecx], 0x2e
lea eax, [edx + ecx]
je 0x40885f
cmp eax, ecx
je 0x4088a3
sub eax, 2
cmp word [eax], 0x2e
jne 0x408852
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x4088a3
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x408872
mov eax, dword [esi]
add edx, eax
cmp word [edx], 0x2e
je 0x40888d
lea ebx, [ebx]
cmp edx, eax
je 0x40889e
sub edx, 2
cmp word [edx], 0x2e
jne 0x408880
sub edx, eax
sar edx, 1
jmp 0x4088a5
mov esi, dword [ebp - 0x254]
jmp 0x408808
or edx, 0xffffffff
jmp 0x4088a5
xor edx, edx
lea eax, [edi - 1]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x250], eax
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
cmp edi, edx
jb 0x408bae
mov eax, edi
mov ecx, 1
sub eax, edx
cmp eax, dword [ebp - 0x250]
cmovb ecx, edx
sub edi, ecx
cmp dword [esi + 0x14], 8
jb 0x4088f9
mov esi, dword [esi]
push edi
lea eax, [esi + edx*2]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402db0
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
mov esi, dword [ebp - 0x230]
mov edx, 4
mov edi, dword [ebp - 0x220]
cmovae ecx, esi
cmp edi, edx
mov dword [ebp - 4], 1
mov eax, edi
cmova eax, edx
push eax
push str..exe
push ecx
call fcn.00404f20
add esp, 0xc
test eax, eax
jne 0x4089e3
cmp edi, 4
jb 0x4089e3
ja 0x4089e3
push 4
mov dword [ebp - 0x248], eax
lea ecx, [ebp - 0x248]
push str._Exe
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.00402db0
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 2
push eax
mov ecx, ebx
call fcn.00407d10
mov edx, dword [ebp - 0x234]
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x4089e3
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4089d9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408bb3
push edx
push ecx
call fcn.0046d9fd
add esp, 8
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x408a24
lea ecx, [eax*2 + 2]
mov eax, esi
cmp ecx, 0x1000
jb 0x408a1a
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408bbd
push ecx
push esi
call fcn.0046d9fd
add esp, 8
mov esi, dword [ebx + 0x40]
mov edi, dword [ebx]
lea eax, [esi + esi*2]
lea ebx, [edi + eax*8]
cmp dword [ebx - 4], 8
lea eax, [ebx - 0x18]
mov edx, dword [eax + 0x10]
jb 0x408a3d
mov eax, dword [eax]
mov edi, dword [ebp - 0x25c]
mov ecx, edi
mov esi, dword [edi + 0x10]
mov edi, dword [edi + 0x14]
cmp edi, 8
jb 0x408a52
mov ecx, dword [ecx]
push edx
push eax
push 0
push esi
push ecx
call fcn.00406930
inc eax
add esp, 0x14
add eax, dword [ebx - 8]
cmp eax, esi
ja 0x408b82
mov ecx, dword [ebp - 0x25c]
sub esi, eax
cmp esi, 0xffffffff
mov dword [ebp - 0x230], 0
mov ebx, 0xffffffff
mov dword [ebp - 0x21c], 7
cmovb ebx, esi
cmp edi, 8
jb 0x408a9a
mov ecx, dword [ecx]
lea eax, [ecx + eax*2]
mov dword [ebp - 0x250], eax
cmp ebx, 7
ja 0x408ace
lea esi, [ebx + ebx]
mov dword [ebp - 0x220], ebx
push esi
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.0046f400
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x230], ax
jmp 0x408b34
cmp ebx, 0x7ffffffe
ja 0x408bb8
mov esi, ebx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x408aee
mov esi, 0x7ffffffe
jmp 0x408af8
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x230]
call fcn.00402bd0
mov dword [ebp - 0x21c], esi
mov edi, eax
lea esi, [ebx + ebx]
mov dword [ebp - 0x220], ebx
push esi
push dword [ebp - 0x250]
push edi
call fcn.0046f400
add esp, 0xc
mov dword [ebp - 0x230], edi
xor eax, eax
mov word [edi + esi], ax
mov ecx, dword [ebp - 0x260]
lea eax, [ebp - 0x230]
push eax
call fcn.00407120
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x408b82
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408b78
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408bbd
push edx
push ecx
call fcn.0046d9fd
add esp, 8
mov eax, 1
jmp 0x408b8b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046dc6a
mov esp, ebp
pop ebp
ret 8
call fcn.00402a00
call fcn.00404da0
call fcn.00478f8e
call fcn.004029f0
call fcn.00478f8e
int3