Function at 0x140040610
Capabilities:
Link many functions at runtime

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x60
mov r14, rcx
mov rcx, qword [0x14016f810]
mov ebx, r9d
mov edi, r8d
mov ebp, edx
call fcn.1400554ac
mov rsi, rax
call fcn.14004a674
call fcn.140045ad4
cmp dword [0x14016da20], 0
jne 0x14004082e
mov r15d, 0x140
lea rcx, [0x14016da30]
xor edx, edx
mov r8d, r15d
call sub.msvcrt.dll_memset
lea rax, [0x140040240]
lea rcx, str.RICHED20.DLL
mov qword [0x14016da38], rax
lea rax, [0x1400400e8]
mov dword [0x14016da30], 0x16
mov qword [0x14016da68], rax
lea rax, [0x1400405a4]
mov dword [0x14016da34], r15d
mov qword [0x14016da58], rax
lea rax, [0x140040cd4]
mov qword [0x14016da60], rax
lea rax, [0x140040298]
mov qword [0x14016da90], rax
lea rax, [fcn.140040274]
mov qword [0x14016da80], rax
lea rax, [0x1400409e8]
mov qword [0x14016da78], rax
lea rax, [0x1400404f0]
mov qword [0x14016daa8], rax
lea rax, [0x140040c04]
mov qword [0x14016dab0], rax
lea rax, [0x140040478]
mov qword [0x14016daf8], rax
lea rax, [fcn.140040aac]
mov qword [0x14016db00], rax
lea rax, [0x1400404cc]
mov qword [0x14016db20], rax
lea rax, [fcn.140040b28]
mov qword [0x14016db18], rax
lea rax, [0x1400404e8]
mov qword [0x14016db58], rax
lea rax, [0x140040bd4]
mov qword [0x14016db60], rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x14016da28], rax
test rax, rax
jne 0x140040779
lea rcx, str.RICHED32.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [0x14016da18]
test rcx, rcx
je 0x140040824
lea rdx, str.OpenThemeData
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14016da18]
lea rdx, str.CloseThemeData
mov qword [0x14016db78], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14016da18]
lea rdx, str.GetThemeBackgroundContentRect
mov qword [0x14016db80], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14016da18]
lea rdx, str.IsThemeBackgroundPartiallyTransparent
mov qword [0x14016db88], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14016da18]
lea rdx, str.DrawThemeParentBackground
mov qword [0x14016db90], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, qword [0x14016da18]
lea rdx, str.DrawThemeBackground
mov qword [0x14016db98], rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14016dba0], rax
mov dword [0x14016da20], 1
mov eax, dword [0x14016da14]
mov r9d, dword [rsp + 0xa8]
lea rdx, str.RichEdit20W
neg eax
lea rax, str.RichEdit
sbb ecx, ecx
not ecx
and ecx, 0x200
cmp qword [0x14016da28], 0
cmove rdx, rax
and qword [rsp + 0x58], 0
mov rax, qword [0x14016bf44]
mov qword [rsp + 0x50], rax
mov rax, qword [rsi]
or r15, 0xffffffffffffffff
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], rax
mov eax, dword [rsp + 0xa0]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ebx
or r9d, 0x503111c4
xor r8d, r8d
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], ebp
call qword [sym.imp.USER32.DLL_CreateWindowExW]
mov rbx, rax
test rax, rax
je 0x1400409c6
mov rcx, qword [0x14016f850]
mov rdx, r14
call fcn.140055710
lea edx, [r15 + 9]
lea r8d, [r15 + 0x11]
mov qword [rax + 0x30], r15
mov qword [rax + 0x28], r15
mov rcx, qword [rsi + 0x10]
mov qword [rax + 0x38], rcx
mov rcx, qword [0x14016bf3c]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
lea rdx, str.PB_ClientRect
mov rcx, rbx
mov r8, rax
call qword [sym.imp.USER32.DLL_SetPropW]
xor r9d, r9d
mov r8, r15
mov edx, 0xc5
mov rcx, rbx
call qword [sym.imp.USER32.DLL_SendMessageW]
lea r8, [0x1400402d8]
lea edx, [r15 - 3]
mov rcx, rbx
call qword [sym.imp.USER32.DLL_SetWindowLongPtrW]
mov dword [rsp + 0x30], 0x37
and dword [rsp + 0x28], 0
and dword [rsp + 0x20], 0
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rbx
mov qword [0x14016db70], rax
call qword [sym.imp.USER32.DLL_SetWindowPos]
mov r9d, 0x541
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.USER32.DLL_RedrawWindow]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x43b
mov rcx, rbx
call qword [sym.imp.USER32.DLL_SendMessageW]
xor r8d, r8d
mov edx, 0x445
or rax, 1
mov rcx, rbx
mov r9, rax
call qword [sym.imp.USER32.DLL_SendMessageW]
lea r9, [0x14016da30]
mov r8, rbx
mov rdx, rdi
mov rcx, r14
call fcn.140045d3c
mov edx, 0x10000000
mov rbx, rax
test dword [rsp + 0xa8], edx
je 0x1400409c6
lea r8d, [r15 + 2]
mov rcx, rdi
call fcn.140040aac
call fcn.14004a68c
lea r11, [rsp + 0x60]
mov rax, rbx
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret