Function at 0x140040640
Capabilities:
Accept command line arguments

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
sub rsp, 0x30
mov r14d, r9d
lea rcx, str.kernel32.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x1400408ad
lea rdx, str.SetDefaultDllDirectories
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1400408ad
mov ecx, 0x800
call qword [case.0x14005a798.0]
cmp eax, 1
jne 0x1400408ad
movzx eax, byte [0x1400f7080]
cmp al, 6
ja 0x1400406bc
mov edx, 6
lea rcx, str._tWinMain_enter
call fcn.1400308d0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov dword [rsp + 0x20], 0x2f
test rax, rax
mov rbx, rax
je 0x14004084c
cmp word [rax], 0
je 0x14004084c
lea rax, [rsp + 0x20]
movzx edx, word [rax]
test dx, dx
je 0x140040700
cmp word [rbx], dx
je 0x14004070b
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
test rax, rax
jne 0x1400406e5
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharNextW]
jmp 0x1400406ca
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharNextW]
xor ebp, ebp
test rax, rax
mov rbx, rax
je 0x14004084e
lea rdx, str.UnregServer
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x1400407e0
xor r9d, r9d
xor r8d, r8d
lea edx, [rax + 0x65]
lea rcx, [0x1400fb060]
call fcn.140021590
lea rcx, [0x1400fb060]
call fcn.14002e7b0
nop
mov rax, qword [0x140100fa8]
test rax, rax
je 0x140040772
call qword [case.0x14005a798.0]
test eax, eax
js 0x1400407e0
xor ecx, ecx
mov rdi, qword [0x1400f71d0]
mov rax, qword [0x1400f71d8]
cmp rdi, rax
jae 0x1400407d1
mov rsi, qword [rdi]
test rsi, rsi
je 0x1400407c4
mov rax, qword [rsi + 0x30]
call qword [case.0x14005a798.0]
xor r8d, r8d
mov rdx, rax
mov rcx, qword [rsi]
call fcn.14002b7d0
test eax, eax
js 0x1400407e0
xor ecx, ecx
mov rax, qword [rsi + 8]
call qword [case.0x14005a798.0]
mov ecx, eax
test eax, eax
js 0x1400407e0
mov rax, qword [0x1400f71d8]
add rdi, 8
cmp rdi, rax
jb 0x140040787
test ecx, ecx
js 0x1400407e0
xor edx, edx
mov rcx, qword [0x1400f71c8]
call fcn.14002bf50
nop
lea rdx, str.Service
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x140040800
call fcn.14002e120
mov ebp, 1
nop
cmp word [rbx], 0
je 0x14004084e
lea rax, [rsp + 0x20]
nop dword [rax + rax]
movzx edx, word [rax]
test dx, dx
je 0x14004082b
cmp word [rbx], dx
je 0x14004083e
mov rcx, rax
call qword [sym.imp.USER32.dll_CharNextW]
test rax, rax
jne 0x140040810
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharNextW]
mov rbx, rax
test rax, rax
je 0x14004084e
jmp 0x140040800
mov rcx, rbx
call qword [sym.imp.USER32.dll_CharNextW]
jmp 0x140040716
xor ebp, ebp
cmp byte [0x140100fb8], 0
jne 0x1400408a4
mov dword [rsp + 0x24], 0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea r8, [rsp + 0x24]
mov rdx, rax
lea rcx, [0x1400fb060]
call fcn.14002d2f0
cmp al, 1
jne 0x14004088c
mov edx, r14d
lea rcx, [0x1400fb060]
call fcn.14002e490
cmp dword [0x1400fb2ec], 0
jne 0x1400408a4
cmp byte [0x1400fb0c2], 0
je 0x1400408a4
call qword [sym.imp.ole32.dll_CoUninitialize]
test ebp, ebp
je 0x1400408ad
call fcn.14002ca50
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop r14
ret