Function at 0x406770
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x499d66
mov eax, dword fs:[0]
push eax
sub esp, 0x254
mov eax, dword [0x4cc498]
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 edi, ecx
mov dword [ebp - 0x258], edi
mov ebx, dword [edi + 4]
mov esi, dword [edi]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x254], eax
mov dword [ebp - 0x24c], 0
cmp esi, ebx
je 0x4067d2
mov ecx, esi
call fcn.00401bf0
add esi, 0x18
cmp esi, ebx
jne 0x4067c2
mov esi, dword [edi]
mov dword [edi + 4], esi
lea ecx, [edi + 0x10]
mov dword [edi + 0xc], 0
cmp dword [edi + 0x24], 8
jb 0x4067e8
mov ecx, dword [edi + 0x10]
xor eax, eax
mov dword [edi + 0x20], 0
mov word [ecx], ax
lea ecx, [edi + 0x28]
cmp dword [edi + 0x3c], 8
jb 0x406800
mov ecx, dword [edi + 0x28]
mov dword [edi + 0x38], eax
xor eax, eax
mov word [ecx], ax
mov dword [edi + 0x40], eax
add edi, 0x44
mov ecx, edi
mov esi, dword [edi]
push dword [esi + 4]
push edi
call fcn.00404f90
mov dword [esi + 4], esi
mov dword [esi], esi
mov dword [esi + 8], esi
mov esi, dword [ebp - 0x258]
lea ecx, [esi + 0x4c]
mov dword [edi + 4], 0
cmp dword [ecx + 0x14], 8
mov eax, ecx
mov dword [ebp - 0x260], ecx
jb 0x406843
mov eax, dword [ecx]
mov dword [ecx + 0x10], 0
xor ecx, ecx
mov word [eax], cx
mov ecx, dword [ebp - 0x254]
cmp dword [ecx + 0x10], 0
je 0x407142
cmp dword [ecx + 0x14], 8
mov eax, ecx
mov dword [ebp - 0x250], 0
jb 0x406873
mov eax, dword [ecx]
lea ecx, [ebp - 0x250]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ebx, eax
mov dword [ebp - 0x25c], ebx
test ebx, ebx
je 0x4069f6
mov ecx, dword [esi + 8]
mov eax, 0x2aaaaaab
sub ecx, dword [esi]
imul ecx
mov ecx, dword [ebp - 0x250]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jbe 0x4068cb
cmp ecx, 0xaaaaaaa
ja 0x407162
push ecx
mov ecx, esi
call fcn.00407a80
mov ecx, dword [ebp - 0x250]
xor edi, edi
test ecx, ecx
jle 0x4069ef
mov edx, dword [ebx + edi*4]
test edx, edx
je 0x4069e6
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 ebx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406910
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x230]
call fcn.00404580
mov ecx, dword [esi + 4]
mov dword [ebp - 4], 0
cmp ecx, dword [esi + 8]
je 0x406984
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 [esi + 4], 0x18
mov word [ebp - 0x230], ax
jmp 0x406999
lea eax, [ebp - 0x230]
push eax
push ecx
mov ecx, esi
call fcn.00401680
mov edx, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x4069da
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4069d0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406aa9
push edx
push ecx
call fcn.0049744e
add esp, 8
mov ebx, dword [ebp - 0x25c]
mov ecx, dword [ebp - 0x250]
inc edi
cmp edi, ecx
jl 0x4068d5
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esi + 4]
mov eax, 0x2aaaaaab
mov edi, dword [esi]
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jbe 0x406a6c
cmp dword [edi + 0x2c], 8
lea eax, [edi + 0x18]
mov ecx, dword [eax + 0x10]
jb 0x406a21
mov eax, dword [eax]
cmp ecx, 0xc
jne 0x406a6c
push ecx
push 0x4a774c
push eax
call fcn.00404690
add esp, 0xc
test eax, eax
jne 0x406a6c
lea eax, [edi + 0x30]
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.00412a60
add esp, 8
mov dword [ebp - 0x24c], 1
mov ecx, eax
push 0
push 0x4a7920
call fcn.00404730
test eax, eax
jne 0x406a6c
mov bl, 1
jmp 0x406a6e
xor bl, bl
test byte [ebp - 0x24c], 1
je 0x406ab9
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x406ab9
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406aaf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406aaf
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049744e
add esp, 8
test bl, bl
je 0x406ace
mov ecx, dword [esi]
push 0x10
add ecx, 0x18
push str._jsapihttpserver
call fcn.00404580
mov ebx, dword [esi + 4]
mov eax, 0x2aaaaaab
mov edi, dword [esi]
mov ecx, ebx
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x406b7d
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x406af8
mov eax, dword [edi]
push eax
lea ebx, [esi + 0x10]
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x406b59
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
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]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406b40
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
jmp 0x406b6a
cmp ebx, edi
je 0x406b71
cmp dword [edi + 0x14], 8
mov eax, dword [edi + 0x10]
jb 0x406b68
mov edi, dword [edi]
push eax
push edi
mov ecx, ebx
call fcn.00404580
mov dword [esi + 0x40], 1
mov ebx, dword [esi + 4]
mov edi, dword [esi]
sub ebx, edi
mov eax, 0x2aaaaaab
imul ebx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jb 0x407142
add edi, 0x18
lea ebx, [esi + 0x28]
cmp ebx, edi
je 0x406bb7
cmp dword [edi + 0x14], 8
mov eax, dword [edi + 0x10]
jb 0x406bae
mov edi, dword [edi]
push eax
push edi
mov ecx, ebx
call fcn.00404580
cmp dword [ebx + 0x14], 8
jb 0x406bbf
mov ebx, dword [ebx]
push str.LocalService
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406bdb
mov eax, 1
jmp 0x406c8c
push str.InstallService
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406bf7
mov eax, 2
jmp 0x406c8c
push str.UninstallService
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406c10
mov eax, 3
jmp 0x406c8c
push str.RepairService
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406c29
mov eax, 4
jmp 0x406c8c
push str.CheckService
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406c42
mov eax, 5
jmp 0x406c8c
push str.Stop
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406c5b
mov eax, 6
jmp 0x406c8c
push 0x4a7a04
push ebx
call fcn.004125e0
add esp, 8
test eax, eax
jne 0x406c74
mov eax, 7
jmp 0x406c8c
push str.UpdateService
push ebx
call fcn.004125e0
add esp, 8
neg eax
sbb eax, eax
and eax, 0xfffffff8
add eax, 8
mov dword [esi + 0xc], eax
mov ebx, 2
mov dword [esi + 0x40], 2
mov eax, 0x2aaaaaab
mov ecx, dword [esi + 4]
mov edi, dword [esi]
mov dword [ebp - 0x250], ecx
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
jbe 0x406d7a
mov edx, edi
mov ecx, dword [ebp - 0x250]
mov eax, ebx
lea eax, [eax + eax*2]
lea esi, [edx + eax*8]
mov edx, dword [esi + 0x10]
cmp edx, 2
jb 0x406e13
mov ebx, dword [esi + 0x14]
mov eax, esi
cmp ebx, 8
jb 0x406ce9
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x406d28
mov ecx, esi
cmp ebx, 8
jb 0x406cfd
mov eax, dword [esi]
lea edi, [eax + edx*2]
jmp 0x406d02
lea edi, [esi + edx*2]
jb 0x406d04
mov ecx, dword [ecx]
xor edx, edx
cmp ecx, edi
je 0x406d28
lea ebx, [ebx]
cmp word [ecx], 0x2f
lea eax, [edx + 1]
cmovne eax, edx
add ecx, 2
mov edx, eax
cmp ecx, edi
jne 0x406d10
cmp edx, 1
je 0x406d3b
mov eax, esi
cmp ebx, 8
jb 0x406d31
mov eax, dword [esi]
cmp word [eax], 0x2d
jne 0x406e03
push esi
mov esi, dword [ebp - 0x258]
mov ecx, esi
call fcn.00406280
mov ebx, dword [esi + 0x40]
inc ebx
mov dword [esi + 0x40], ebx
mov eax, dword [esi + 4]
mov ecx, eax
mov edi, dword [esi]
sub ecx, edi
mov dword [ebp - 0x250], eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, edi
cmp ebx, eax
jb 0x406cc3
mov ecx, dword [esi + 4]
sub ecx, edi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x406fab
lea eax, [ebx + ebx*2]
mov ebx, dword [edi + eax*8 + 0x10]
cmp dword [edi + eax*8 + 0x14], 8
lea edi, [edi + eax*8]
mov ecx, edi
jb 0x406dad
mov ecx, dword [edi]
test ebx, ebx
je 0x406e23
or edx, 0xffffffff
lea eax, [ebx - 1]
cmp eax, edx
cmovb edx, eax
add edx, edx
cmp word [ecx + edx], 0x2e
lea eax, [ecx + edx]
je 0x406dd5
cmp eax, ecx
je 0x406e23
sub eax, 2
cmp word [eax], 0x2e
jne 0x406dc8
sub eax, ecx
sar eax, 1
cmp eax, 0xffffffff
je 0x406e23
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x406de8
mov eax, dword [edi]
add edx, eax
cmp word [edx], 0x2e
je 0x406dfd
cmp edx, eax
je 0x406e1e
sub edx, 2
cmp word [edx], 0x2e
jne 0x406df0
sub edx, eax
sar edx, 1
jmp 0x406e25
mov esi, dword [ebp - 0x258]
mov edi, dword [esi]
mov ebx, dword [esi + 0x40]
jmp 0x406d7a
mov esi, dword [ebp - 0x258]
jmp 0x406d7d
or edx, 0xffffffff
jmp 0x406e25
xor edx, edx
lea eax, [ebx - 1]
mov dword [ebp - 0x230], 0
mov dword [ebp - 0x24c], eax
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
cmp ebx, edx
jb 0x407167
mov eax, ebx
mov ecx, 1
sub eax, edx
cmp eax, dword [ebp - 0x24c]
cmovb ecx, edx
sub ebx, ecx
cmp dword [edi + 0x14], 8
jb 0x406e79
mov edi, dword [edi]
push ebx
lea eax, [edi + edx*2]
push eax
lea ecx, [ebp - 0x230]
call fcn.00404580
cmp dword [ebp - 0x21c], 8
lea ecx, [ebp - 0x230]
mov edi, dword [ebp - 0x230]
mov edx, 4
mov ebx, dword [ebp - 0x220]
cmovae ecx, edi
cmp ebx, edx
mov dword [ebp - 4], 1
mov eax, ebx
cmova eax, edx
push eax
push str..exe
push ecx
call fcn.00404690
add esp, 0xc
test eax, eax
jne 0x406f65
cmp ebx, 4
jb 0x406f65
ja 0x406f65
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.00404580
lea eax, [ebp - 0x248]
mov byte [ebp - 4], 2
push eax
mov ecx, esi
call fcn.00406280
mov edx, dword [ebp - 0x234]
mov byte [ebp - 4], 1
cmp edx, 8
jb 0x406f65
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406f5b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x406f5b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0049744e
add esp, 8
mov eax, dword [ebp - 0x21c]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x406fa6
lea ecx, [eax*2 + 2]
mov eax, edi
cmp ecx, 0x1000
jb 0x406f9c
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40712b
push ecx
push edi
call fcn.0049744e
add esp, 8
mov ebx, dword [esi + 0x40]
mov edi, dword [esi]
lea eax, [ebx + ebx*2]
lea esi, [edi + eax*8]
cmp dword [esi - 4], 8
lea eax, [esi - 0x18]
mov edx, dword [eax + 0x10]
jb 0x406fbf
mov eax, dword [eax]
mov ebx, dword [ebp - 0x254]
mov ecx, ebx
mov edi, dword [ebx + 0x10]
mov ebx, dword [ebx + 0x14]
cmp ebx, 8
jb 0x406fd4
mov ecx, dword [ecx]
push edx
push eax
push 0
push edi
push ecx
call fcn.00405110
inc eax
add esp, 0x14
add eax, dword [esi - 8]
cmp eax, edi
ja 0x40713b
mov ecx, dword [ebp - 0x254]
sub edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x230], 0
mov esi, 0xffffffff
mov dword [ebp - 0x21c], 7
cmovb esi, edi
mov dword [ebp - 0x25c], esi
cmp ebx, 8
jb 0x407022
mov ecx, dword [ecx]
lea eax, [ecx + eax*2]
mov dword [ebp - 0x24c], eax
cmp esi, 7
ja 0x407067
mov dword [ebp - 0x220], esi
add esi, esi
push esi
push eax
lea eax, [ebp - 0x230]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x230], ax
mov edi, dword [ebp - 0x21c]
mov esi, dword [ebp - 0x220]
mov ebx, dword [ebp - 0x230]
jmp 0x4070c0
cmp esi, 0x7ffffffe
ja 0x40716c
mov edi, esi
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x407087
mov edi, 0x7ffffffe
jmp 0x407091
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
push eax
lea ecx, [ebp - 0x230]
call fcn.00401c70
add esi, esi
mov ebx, eax
push esi
push dword [ebp - 0x24c]
push ebx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov word [ebx + esi], ax
mov esi, dword [ebp - 0x25c]
mov ecx, dword [ebp - 0x260]
lea eax, [ebp - 0x230]
cmp ecx, eax
je 0x407105
call fcn.00401bf0
mov ecx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x22c]
mov dword [ecx], ebx
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, 1
mov dword [ecx + 0x10], esi
mov dword [ecx + 0x14], edi
jmp 0x407144
cmp edi, 8
jb 0x40713b
lea edi, [edi*2 + 2]
mov eax, ebx
cmp edi, 0x1000
jb 0x407131
mov ebx, dword [ebx - 4]
add edi, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x407131
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edi
push ebx
call fcn.0049744e
add esp, 8
mov eax, 1
jmp 0x407144
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.0049745c
mov esp, ebp
pop ebp
ret 8
call fcn.00401c60
call fcn.00404510
call fcn.00401c50
int3