Function at 0x408020
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ae8e3
mov eax, dword fs:[0]
push eax
sub esp, 0x25c
mov eax, dword [0x4ec05c]
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 dword [ebp - 0x258], ebx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x254], 0
push ebx
push dword [ebx + 4]
mov dword [ebp - 0x264], ecx
push dword [ebx]
call fcn.00401c10
mov eax, dword [ebx]
add esp, 0xc
mov dword [ebx + 4], eax
lea eax, [ebx + 0x10]
mov dword [ebx + 0xc], 0
mov dword [eax + 0x10], 0
cmp dword [eax + 0x14], 8
jb 0x408095
mov eax, dword [eax]
xor ecx, ecx
mov word [eax], cx
mov dword [ebx + 0x38], ecx
lea ecx, [ebx + 0x28]
cmp dword [ebx + 0x3c], 8
jb 0x4080a9
mov ecx, dword [ebx + 0x28]
xor eax, eax
lea edi, [ebx + 0x44]
mov word [ecx], ax
mov ecx, edi
mov dword [ebx + 0x40], eax
mov esi, dword [edi]
push dword [esi + 4]
push edi
call fcn.00406710
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
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
mov dword [ebp - 0x268], ecx
jb 0x4080ea
mov eax, dword [ecx]
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x264]
cmp dword [ecx + 0x10], 0
je 0x408a4a
xor eax, eax
mov dword [ebp - 4], 0
xor edi, edi
mov dword [ebp - 0x260], eax
xor esi, esi
mov dword [ebp - 0x234], eax
cmp dword [ecx + 0x14], 8
mov dword [ebp - 0x25c], eax
mov eax, ecx
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x238], esi
mov dword [ebp - 0x254], 2
jb 0x40813e
mov eax, dword [ecx]
lea ecx, [ebp - 0x25c]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x250], eax
test eax, eax
je 0x4082b3
xor ebx, ebx
cmp dword [ebp - 0x25c], ebx
jle 0x4082a6
jmp 0x408170
mov edx, dword [eax + ebx*4]
test edx, edx
je 0x408293
mov ecx, edx
mov dword [ebp - 0x220], 0
xor eax, eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
lea edi, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4081a0
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.004029b0
mov byte [ebp - 4], 1
cmp esi, dword [ebp - 0x260]
je 0x408224
mov eax, dword [ebp - 0x230]
mov edx, 7
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi], eax
mov eax, dword [ebp - 0x22c]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x224]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x220]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [esi + 0x14], eax
xor eax, eax
add esi, 0x18
mov word [ebp - 0x230], ax
mov dword [ebp - 0x238], esi
jmp 0x40824f
lea eax, [ebp - 0x230]
push eax
push esi
lea ecx, [ebp - 0x23c]
call fcn.00406390
mov eax, dword [ebp - 0x234]
mov esi, dword [ebp - 0x238]
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 0x260], eax
mov byte [ebp - 4], 0
cmp edx, 8
jb 0x40828d
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408283
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a6a
push edx
push ecx
call fcn.00473d9c
add esp, 8
mov eax, dword [ebp - 0x250]
inc ebx
cmp ebx, dword [ebp - 0x25c]
jl 0x408170
mov edi, dword [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [ebp - 0x258]
lea eax, [ebp - 0x23c]
cmp ebx, eax
je 0x4082dc
mov ecx, ebx
call fcn.00403320
mov eax, dword [ebp - 0x260]
mov dword [ebx], edi
xor edi, edi
mov dword [ebx + 4], esi
xor esi, esi
mov dword [ebx + 8], eax
mov dword [ebp - 0x260], esi
mov dword [ebp - 0x250], 0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x408349
lea eax, [ebp - 0x23c]
push eax
push esi
push edi
call fcn.00401c10
mov ecx, dword [ebp - 0x260]
mov eax, 0x2aaaaaab
sub ecx, edi
add esp, 0xc
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 3
cmp ecx, 0x1000
jb 0x40833f
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a79
push ecx
push edi
call fcn.00473d9c
add esp, 8
mov ecx, dword [ebx + 4]
mov eax, 0x2aaaaaab
mov edi, dword [ebx]
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jbe 0x4083cb
cmp dword [edi + 0x2c], 8
lea esi, [edi + 0x18]
jb 0x408372
mov esi, dword [edi + 0x18]
cmp dword [edi + 0x28], 0xc
jne 0x4083cb
mov ecx, 0x4b9514
mov edx, 0xc
sub esi, ecx
mov ax, word [esi + ecx]
cmp ax, word [ecx]
jne 0x4083cb
add ecx, 2
sub edx, 1
jne 0x408384
lea eax, [edi + 0x30]
push eax
lea eax, [ebp - 0x230]
push eax
call fcn.0041dc00
add esp, 8
mov dword [ebp - 0x250], 1
mov ecx, eax
push 0
push 0x4b96b0
call fcn.00404ba0
mov byte [ebp - 0x249], 1
test eax, eax
je 0x4083d2
mov byte [ebp - 0x249], 0
test byte [ebp - 0x250], 1
je 0x4083e6
lea ecx, [ebp - 0x230]
call fcn.00402190
cmp byte [ebp - 0x249], 0
je 0x408400
mov ecx, dword [ebx]
push 0x10
add ecx, 0x18
push str._jsapihttpserver
call fcn.004029b0
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 0x4084ad
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40842a
mov eax, dword [esi]
push eax
lea edi, [ebx + 0x10]
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x408488
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00476450
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]
jmp 0x408470
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408470
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
jmp 0x408499
cmp edi, esi
je 0x4084a1
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x408496
mov eax, dword [esi]
push dword [esi + 0x10]
push eax
mov ecx, edi
call fcn.004029b0
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 0x408a4a
add esi, 0x18
lea edi, [ebx + 0x28]
cmp edi, esi
je 0x4084e8
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4084dd
mov eax, dword [esi]
push dword [esi + 0x10]
mov ecx, edi
push eax
call fcn.004029b0
cmp dword [edi + 0x14], 8
jb 0x4084f0
mov edi, dword [edi]
push str.LocalService
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x40850c
mov eax, 1
jmp 0x4085c0
push str.InstallService
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x408528
mov eax, 2
jmp 0x4085c0
push str.UninstallService
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x408544
mov eax, 3
jmp 0x4085c0
push str.RepairService
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x40855d
mov eax, 4
jmp 0x4085c0
push str.CheckService
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x408576
mov eax, 5
jmp 0x4085c0
push str.Stop
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x40858f
mov eax, 6
jmp 0x4085c0
push 0x4b9794
push edi
call fcn.0041d8e0
add esp, 8
test eax, eax
jne 0x4085a8
mov eax, 7
jmp 0x4085c0
push str.UpdateService
push edi
call fcn.0041d8e0
add esp, 8
neg eax
sbb eax, eax
and eax, 0xfffffff8
add eax, 8
mov dword [ebx + 0xc], eax
mov edi, 2
mov dword [ebx + 0x40], 2
mov eax, 0x2aaaaaab
mov esi, dword [ebx + 4]
mov ecx, esi
mov ebx, dword [ebx]
sub ecx, ebx
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, edi
jbe 0x4086b7
mov ecx, ebx
mov eax, edi
mov dword [ebp - 0x25c], esi
lea eax, [eax + eax*2]
lea esi, [ecx + eax*8]
mov ecx, dword [esi + 0x10]
cmp ecx, 2
jb 0x4086b1
mov ebx, dword [esi + 0x14]
mov eax, esi
cmp ebx, 8
jb 0x408619
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x408658
mov eax, esi
cmp ebx, 8
jb 0x408628
mov eax, dword [esi]
lea edi, [eax + ecx*2]
mov ecx, esi
jb 0x408631
mov ecx, dword [esi]
xor edx, edx
cmp ecx, edi
je 0x408658
jmp 0x408640
cmp word [ecx], 0x2f
lea eax, [edx + 1]
cmovne eax, edx
add ecx, 2
mov edx, eax
cmp ecx, edi
jne 0x408640
cmp edx, 1
je 0x408667
mov eax, esi
cmp ebx, 8
jb 0x408661
mov eax, dword [esi]
cmp word [eax], 0x2d
jne 0x4086a1
mov ebx, dword [ebp - 0x258]
mov ecx, ebx
push esi
call fcn.00407b00
mov edi, dword [ebx + 0x40]
mov eax, 0x2aaaaaab
inc edi
mov dword [ebx + 0x40], edi
mov esi, dword [ebx + 4]
mov ecx, esi
mov ebx, dword [ebx]
sub ecx, ebx
imul ecx
mov ecx, ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x4086b7
jmp 0x4085f3
mov eax, dword [ebp - 0x258]
mov esi, dword [eax + 4]
mov ebx, dword [eax]
mov edi, dword [eax + 0x40]
jmp 0x4086b7
mov esi, dword [ebp - 0x25c]
sub esi, ebx
mov eax, 0x2aaaaaab
imul esi
or esi, 0xffffffff
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jae 0x4088e3
lea eax, [edi + edi*2]
cmp dword [ebx + eax*8 + 0x14], 8
lea edi, [ebx + eax*8]
mov ecx, edi
jb 0x4086e6
mov ecx, dword [edi]
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x408748
lea eax, [ebx - 1]
mov edx, esi
cmp eax, 0xffffffff
cmovb edx, eax
add edx, edx
cmp word [edx + ecx], 0x2e
lea eax, [edx + ecx]
je 0x408711
cmp eax, ecx
je 0x408748
sub eax, 2
cmp word [eax], 0x2e
jne 0x408704
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x408748
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x408724
mov eax, dword [edi]
add edx, eax
cmp word [edx], 0x2e
je 0x40873d
lea esp, [esp]
cmp edx, eax
je 0x408743
sub edx, 2
cmp word [edx], 0x2e
jne 0x408730
sub edx, eax
sar edx, 1
jmp 0x40874a
or edx, 0xffffffff
jmp 0x40874a
xor edx, edx
lea eax, [ebx - 1]
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x254], eax
xor eax, eax
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
cmp ebx, edx
jb 0x408a6f
mov eax, ebx
mov ecx, 1
sub eax, edx
cmp eax, dword [ebp - 0x254]
cmovb ecx, edx
sub ebx, ecx
cmp dword [edi + 0x14], 8
jb 0x408794
mov edi, dword [edi]
push ebx
lea eax, [edi + edx*2]
push eax
lea ecx, [ebp - 0x230]
call fcn.004029b0
cmp dword [ebp - 0x21c], 8
lea edi, [ebp - 0x230]
mov ebx, dword [ebp - 0x220]
mov eax, 4
cmovae edi, dword [ebp - 0x230]
mov edx, ebx
cmp ebx, eax
mov dword [ebp - 4], 2
mov ecx, str..exe
cmova edx, eax
test edx, edx
je 0x4087f5
sub edi, ecx
lea esp, [esp]
mov ax, word [edi + ecx]
cmp ax, word [ecx]
jne 0x408891
add ecx, 2
sub edx, 1
jne 0x4087e0
cmp ebx, 4
jb 0x408891
ja 0x408891
push 4
xor eax, eax
mov dword [ebp - 0x238], 0
push str._Exe
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.004029b0
mov ebx, dword [ebp - 0x258]
lea eax, [ebp - 0x248]
push eax
mov ecx, ebx
mov byte [ebp - 4], 3
call fcn.00407b00
mov edx, dword [ebp - 0x234]
mov byte [ebp - 4], 2
cmp edx, 8
jb 0x408897
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408885
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a6a
push edx
push ecx
call fcn.00473d9c
add esp, 8
jmp 0x408897
mov ebx, dword [ebp - 0x258]
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x4088de
mov edx, dword [ebp - 0x230]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4088d4
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a79
push ecx
push edx
call fcn.00473d9c
add esp, 8
mov edi, dword [ebx + 0x40]
mov ebx, dword [ebx]
lea eax, [edi + edi*2]
cmp dword [ebx + eax*8 - 4], 8
lea eax, [ebx + eax*8]
mov dword [ebp - 0x254], eax
lea edx, [eax - 0x18]
jb 0x4088fc
mov edx, dword [eax - 0x18]
mov edi, dword [ebp - 0x264]
mov ecx, edi
mov ebx, dword [edi + 0x14]
cmp ebx, 8
jb 0x40890e
mov ecx, dword [edi]
push dword [eax - 8]
mov edi, dword [edi + 0x10]
push edx
push 0
push edi
push ecx
call fcn.00406830
mov ecx, dword [ebp - 0x254]
add esp, 0x14
mov ecx, dword [ecx - 8]
inc ecx
add eax, ecx
cmp eax, edi
ja 0x408a43
xor ecx, ecx
mov dword [ebp - 0x21c], 7
sub edi, eax
mov word [ebp - 0x230], cx
mov ecx, dword [ebp - 0x264]
cmp edi, 0xffffffff
cmovb esi, edi
mov dword [ebp - 0x254], esi
cmp ebx, 8
jb 0x408963
mov ecx, dword [ecx]
lea ebx, [ecx + eax*2]
cmp esi, 7
ja 0x408990
mov dword [ebp - 0x220], esi
lea eax, [ebp - 0x230]
add esi, esi
push esi
push ebx
push eax
call fcn.00475ed0
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x230], ax
jmp 0x4089f5
cmp esi, 0x7ffffffe
ja 0x408a74
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x4089ae
mov esi, 0x7ffffffe
jmp 0x4089b8
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x230]
call fcn.004027d0
mov edi, eax
mov dword [ebp - 0x21c], esi
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x220], eax
lea esi, [eax + eax]
push esi
push ebx
push edi
call fcn.00475950
add esp, 0xc
mov dword [ebp - 0x230], edi
xor eax, eax
mov word [edi + esi], ax
mov ecx, dword [ebp - 0x268]
lea eax, [ebp - 0x230]
push eax
call fcn.00406de0
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x408a43
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x408a39
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x408a79
push edx
push ecx
call fcn.00473d9c
add esp, 8
mov eax, 1
jmp 0x408a4c
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.00474009
mov esp, ebp
pop ebp
ret 8
call fcn.0047f349
call fcn.00404a20
call fcn.004025c0
call fcn.0047f349
int3