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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64
push ebx
push esi
mov ebx, ecx
mov byte [esp + 0xb], dl
xor eax, eax
lea ecx, [esp + 0x14]
push edi
mov edi, eax
call fcn.004053ef
test al, al
je 0x4027c5
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4027c5
cmp byte [esp + 0x20], 0
jne 0x4027c5
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edi
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
mov ecx, ebx
mov dword [esp + 0x18], 0x9753
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40276d
sub ecx, edx
mov dword [esp + 0x20], ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
xor ecx, ecx
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
push 0x2710
push 2
pop eax
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x20], ecx
push eax
push ecx
push 0x4a
push esi
call dword [sym.imp.USER32.dll_SendMessageTimeoutW]
mov edi, eax
test edi, edi
je 0x4027c5
xor eax, eax
cmp dword [esp + 0x14], eax
cmove edi, eax
test edi, edi
jne 0x40295e
xor eax, eax
mov byte [esp + 0xe], al
call fcn.00401b37
test al, al
jne 0x4027ff
push str._sidenote
push ebx
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x4027ff
mov dl, 1
mov ecx, 0x420b
call fcn.00402684
test al, al
je 0x40296f
mov byte [esp + 0xe], 1
cmp word [0x40d848], 0
jne 0x402867
xor eax, eax
mov ecx, str.msi.dll
push eax
call fcn.00401916
mov esi, eax
test esi, esi
jne 0x402826
mov dword [0], 1
push str.MsiProvideQualifiedComponentW
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x104
push ecx
push 0x40d848
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 [0x40d848], 0
je 0x40295e
mov ecx, 0x40d848
xor edi, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x402871
sub ecx, edx
mov edx, ebx
sar ecx, 1
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
cmp ax, di
jne 0x402885
sub edx, esi
lea esi, [ecx + 4]
sar edx, 1
xor ecx, ecx
add esi, edx
push 2
pop edx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040635d
cmp byte [esp + 0x12], 0
pop ecx
mov ecx, 0x40958c
mov dword [esp + 0x14], eax
cmove ecx, ebx
push ecx
push 0x40d848
push str.__s___s
push esi
push eax
call fcn.00401148
xor eax, eax
mov dword [esp + 0x3c], 0x44
lea edi, [esp + 0x2c]
add esp, 0x14
stosd dword es:[edi], eax
xor ebx, ebx
push 0x40
stosd dword es:[edi], eax
push ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x4000000
push ebx
push ebx
push ebx
mov ebx, dword [esp + 0x34]
push ebx
push 0x40d848
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x402956
push dword [esp + 0x20]
call dword [sym.imp.USER32.dll_AllowSetForegroundWindow]
cmp byte [esp + 0xf], 0
je 0x402944
push 0x2710
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x18]
call esi
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
call fcn.00402278
test edi, edi
setne al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
jmp 0x402968