Function at 0x140004d40
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push rbx
push rsi
sub rsp, 0x48
lea rax, [0x1401100b0]
mov qword [rsp + 0x30], 0x14
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x38], rax
call fcn.1400789e0
mov rbx, rax
test rax, rax
je 0x140004da5
xor r8d, r8d
lea rdx, [0x1401100c8]
mov rcx, rax
call fcn.140078c20
xor r8d, r8d
mov qword [0x140159440], rax
lea rdx, [0x1401100d8]
mov rcx, rbx
call fcn.140078c20
mov qword [0x140159428], rax
lea rax, str.uxtheme.dll
mov qword ds:[rsp + 0x30], 0x16
lea rdx, [rsp + 0x30]
mov qword [rsp + 0x38], rax
call fcn.1400789e0
test rax, rax
je 0x140004de3
xor r8d, r8d
lea rdx, str.DrawThemeBackground
mov rcx, rax
call fcn.140078c20
mov qword [0x140159418], rax
cmp dword [0x1401596f8], 0
mov rsi, 0xffffffffffffffff
je 0x140004e0a
mov ebx, 0xc0000476
lfence
mov ecx, ebx
call fcn.14006e580
jmp 0x140004f92
mov rax, qword gs:[0x30]
mov ecx, dword [rax + 0x48]
xor eax, eax
lock cmpxchg dword [0x1401596f8], ecx
je 0x140004e36
mov ebx, 0xc0000476
lfence
mov ecx, ebx
call fcn.14006e580
jmp 0x140004f92
mov qword ss:[rsp + 0x78], rbp
xor ebp, ebp
mov qword [rsp + 0x40], rdi
mov rdi, qword [0x140159a68]
mov qword [0x140159a78], rbp
mov qword [0x140159a70], rbp
mov qword [0x140159a60], rbp
test rdi, rdi
je 0x140004eb5
nop word [rax + rax]
lea rax, ds:[rsp + 0x60]
mov dword [rsp + 0x60], ebp
mov r9d, 0x40
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x68]
mov qword [rsp + 0x70], rdi
lea rdx, [rsp + 0x70]
mov qword [rsp + 0x68], 0x10000
mov rcx, rsi
call qword [sym.imp.ntdll.dll_NtProtectVirtualMemory]
mov ebx, eax
test eax, eax
js 0x140004eb7
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x140004e70
mov ebx, ebp
mov rdi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x78]
mov dword [0x1401596bc], ebx
test ebx, ebx
js 0x140004f3a
cmp byte [0x1401590d1], 0
jne 0x140004edd
cmp byte [0x1401590d2], 0
je 0x140004f0f
lea rdx, [0x140004ac0]
lea rcx, [0x140159418]
call fcn.14007a140
mov ebx, eax
test eax, eax
js 0x140004f3a
lea rdx, [0x140004cc0]
lea rcx, [0x140159428]
call fcn.14007a140
mov ebx, eax
test eax, eax
js 0x140004f3a
lea rdx, [0x140004bc0]
lea rcx, [0x140159440]
nop dword [rax]
call fcn.14007a140
mov ebx, eax
test eax, eax
js 0x140004f3a
call fcn.140079d20
mov ebx, eax
test eax, eax
jns 0x140004ff4
nop word [rax + rax]
cmp ebx, 0xc0000022
je 0x140004f6d
cmp ebx, 0xc0000005
je 0x140004f6d
mov eax, ebx
shr eax, 0x10
and eax, 0xfff
cmp eax, 7
jne 0x140004f64
movzx eax, bx
jmp 0x140004f78
cmp eax, 0xb
jne 0x140004f7c
mov eax, ebx
jmp 0x140004f78
lfence
mov ecx, ebx
call qword [sym.imp.ntdll.dll_RtlNtStatusToDosErrorNoTeb]
test eax, eax
jne 0x140004f88
lfence
mov ecx, ebx
call fcn.14006e580
jmp 0x140004f92
lfence
mov ecx, eax
call fcn.14006e860
xor ecx, ecx
lea r8, [0x14013b8a8]
lea r9, str.Unable_to_commit_detours_transaction.
mov rbx, rax
test rax, rax
je 0x140004fea
lfence
lfence
mov rax, qword [rax + 8]
mov edx, 0x20
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r8
mov r8d, 0xfffe
call fcn.14006eba0
lea rcx, [rbx - 0x10]
lock xadd dword [rcx + 8], esi
cmp esi, 1
jne 0x140004ff4
lfence
add rsp, 0x48
pop rsi
pop rbx
jmp fcn.1400602c0
mov edx, 0x10
call fcn.14006eb20
add rsp, 0x48
pop rsi
pop rbx
ret