Function at 0x402767
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push ebx
push esi
mov ebx, ecx
mov byte [ebp - 2], dl
xor eax, eax
lea ecx, [ebp - 0x18]
push edi
mov edi, eax
call fcn.0040539e
test al, al
je 0x40280b
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x40280b
cmp byte [ebp - 0x10], 0
jne 0x40280b
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [ebp - 8]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
mov ecx, ebx
mov dword [ebp - 0x18], 0x9753
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4027b9
sub ecx, edx
mov dword [ebp - 0x10], ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
xor ecx, ecx
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
push eax
push 0x2710
push 2
pop eax
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0xc], ecx
push eax
push ecx
push 0x4a
push esi
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov edi, eax
test edi, edi
je 0x40280b
xor eax, eax
cmp dword [ebp - 0xc], eax
cmove edi, eax
test edi, edi
jne 0x40298c
xor eax, eax
mov byte [ebp - 1], al
call fcn.00401b29
test al, al
jne 0x402843
push str._sidenote
push ebx
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x402843
mov dl, 1
mov ecx, 0x420b
call fcn.004026e0
test al, al
je 0x40299f
mov byte [ebp - 1], 1
cmp word [0x40e8a0], 0
jne 0x4028a9
xor eax, eax
mov ecx, 0x40b3d0
push eax
call fcn.00401909
mov esi, eax
test esi, esi
jne 0x40286a
mov dword [0], 1
push str.MsiProvideQualifiedComponentW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 0x104
push ecx
push 0x40e8a0
push 0xfffffffffffffffe
push str.onenote.exe
push str.5812C571_53F0_4467_BEFA_0A4F47A9437C
call eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp word [0x40e8a0], 0
je 0x40298c
mov ecx, 0x40e8a0
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4028b3
sub ecx, edx
mov edx, ebx
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, di
jne 0x4028c7
sub edx, esi
sar edx, 1
push 2
lea esi, [edx + 4]
add esi, ecx
xor ecx, ecx
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040549a
cmp byte [ebp - 1], 0
mov ecx, 0x40a8bc
mov edi, eax
cmove ecx, ebx
mov dword [ebp - 0xc], edi
push ecx
push 0x40e8a0
push str.__s___s
push esi
push edi
call fcn.00401155
push 0x40
xor ebx, ebx
mov dword [ebp - 0x68], 0x44
lea eax, [ebp - 0x64]
xorps xmm0, xmm0
push ebx
push eax
movups xmmword [ebp - 0x1c], xmm0
call sub.VCRUNTIME140.dll_memset
add esp, 0x24
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x68]
push eax
push ebx
push ebx
push 0x4000000
push ebx
push ebx
push ebx
push edi
push 0x40e8a0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x402983
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
cmp byte [ebp - 2], bl
je 0x402973
push 0x2710
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x1c]
call esi
push dword [ebp - 0xc]
call sub.api_ms_win_crt_heap_l1_1_0.dll_free
pop ecx
call fcn.004022ae
xor eax, eax
test edi, edi
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
jmp 0x402998