Function at 0x140040e10
Capabilities:
Allocate or change rwx memory

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x98
mov dword [rsp + 0x38], 0
cmp qword [rsp + 0xb0], 0
je 0x140040e4d
mov rax, qword [rsp + 0xb0]
mov qword [rax], 0
cmp qword [rsp + 0xb8], 0
je 0x140040e67
mov rax, qword [rsp + 0xb8]
mov qword [rax], 0
cmp qword [rsp + 0xc0], 0
je 0x140040e81
mov rax, qword [rsp + 0xc0]
mov qword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x14005ce10], eax
je 0x140040e99
mov eax, 0x10dd
jmp 0x1400412bf
cmp dword [0x14005ce14], 0
je 0x140040ead
mov eax, dword [0x14005ce14]
jmp 0x1400412bf
cmp qword [rsp + 0xa0], 0
jne 0x140040ec2
mov eax, 6
jmp 0x1400412bf
mov rax, qword [rsp + 0xa0]
cmp qword [rax], 0
jne 0x140040efa
mov dword [rsp + 0x38], 6
mov eax, dword [rsp + 0x38]
mov dword [0x14005ce14], eax
mov rax, qword [rsp + 0xa0]
mov qword [0x14005ce18], rax
mov eax, dword [rsp + 0x38]
jmp 0x1400412bf
mov rax, qword [rsp + 0xa0]
mov rax, qword [rax]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x58], 0
xor edx, edx
mov rcx, qword [rsp + 0x30]
call fcn.140040de0
mov qword [rsp + 0x30], rax
xor edx, edx
mov rcx, qword [rsp + 0xa8]
call fcn.140040de0
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0xa8], rax
jne 0x140040f66
cmp dword [str.lE4], 0
je 0x140040f62
jmp 0x140040fd2
jmp 0x140040fc8
cmp qword [rsp + 0xb8], 0
je 0x140040f81
mov rcx, qword [rsp + 0xb8]
mov rax, qword [rsp + 0x30]
mov qword [rcx], rax
cmp qword [rsp + 0xc0], 0
je 0x140040f9f
mov rcx, qword [rsp + 0xc0]
mov rax, qword [rsp + 0xa8]
mov qword [rcx], rax
mov ecx, 0x30
call fcn.1400286ac
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140041030
mov dword [rsp + 0x38], 8
mov eax, dword [rsp + 0x38]
mov dword [0x14005ce14], eax
cmp qword [rsp + 0x48], 0
je 0x140040fed
mov rcx, qword [rsp + 0x48]
call fcn.140040040
mov qword [rsp + 0x48], 0
cmp qword [rsp + 0x58], 0
je 0x140041018
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x80]
call fcn.1400285b0
mov qword [rsp + 0x58], 0
mov rax, qword [rsp + 0xa0]
mov qword [0x14005ce18], rax
mov eax, dword [rsp + 0x38]
jmp 0x1400412bf
mov rcx, qword [rsp + 0x30]
call fcn.1400403e0
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140041054
mov dword [rsp + 0x38], 8
jmp 0x140040fc8
cmp qword [rsp + 0xb0], 0
je 0x14004106f
mov rcx, qword [rsp + 0xb0]
mov rax, qword [rsp + 0x48]
mov qword [rcx], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0
cmp dword [rsp + 0x20], 5
jge 0x1400410ea
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x68], rax
mov dword [rsp + 0x60], 0
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
add rcx, rax
lea r9, [rsp + 0x60]
xor r8d, r8d
mov rdx, qword [rsp + 0x28]
call fcn.14003f2f0
mov qword [rsp + 0x28], rax
cmp dword [rsp + 0x60], 0
je 0x1400410c7
jmp 0x1400410ea
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x28]
sub rax, rcx
mov dword [rsp + 0x20], eax
mov rcx, qword [rsp + 0x68]
call fcn.1400273d0
test eax, eax
je 0x1400410e8
jmp 0x1400410ea
jmp 0x140041081
cmp dword [rsp + 0x20], 5
jge 0x14004110e
mov dword [rsp + 0x38], 9
cmp dword [str.lE4], 0
je 0x140041109
jmp 0x140040fd2
jmp 0x140040fc8
movsxd rax, dword [rsp + 0x20]
cmp rax, 0x1a
jbe 0x140041126
mov dword [rsp + 0x38], 6
jmp 0x140040fc8
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x30]
add rcx, rax
mov rax, qword [rsp + 0x48]
mov qword [rax + 0x20], rcx
mov rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0xa8]
mov qword [rcx + 0x28], rax
mov rcx, qword [rsp + 0x48]
movzx eax, byte [rsp + 0x20]
mov byte [rcx + 0x1f], al
mov rdx, qword [rsp + 0x48]
add rdx, 0x20
movsxd rax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x48]
add rcx, rax
call fcn.140027210
mov qword [rsp + 0x28], rax
mov rdx, qword [rsp + 0x48]
add rdx, 0x1f
mov rcx, qword [rsp + 0x28]
call fcn.140027290
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x50], 0
movsxd rdx, dword [rsp + 0x20]
lea r9, [rsp + 0x50]
mov r8d, 0x40
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x1400411c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x38], eax
jmp 0x140040fc8
mov rcx, qword [rsp + 0x30]
call fcn.14003ffa0
mov qword [rsp + 0x40], rax
cmp qword [rsp + 0x40], 0
je 0x14004125d
mov rax, qword [rsp + 0x40]
movzx eax, word [rax + 0x1c]
cmp eax, 0x6544
je 0x14004125d
mov dword [rsp + 0x70], 0
lea r9, [rsp + 0x70]
mov r8d, 0x40
mov edx, 0x40
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x140041225
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x38], eax
jmp 0x140040fc8
mov ecx, 0x6544
mov rax, qword [rsp + 0x40]
mov word [rax + 0x1c], cx
mov ecx, 0x6f74
mov rax, qword [rsp + 0x40]
mov word [rax + 0x1e], cx
mov ecx, 0x7275
mov rax, qword [rsp + 0x40]
mov word [rax + 0x20], cx
mov ecx, 0x2173
mov rax, qword [rsp + 0x40]
mov word [rax + 0x22], cx
mov rax, qword [rsp + 0x58]
mov dword [rax + 8], 0
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0xa0]
mov qword [rcx + 0x10], rax
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x48]
mov qword [rcx + 0x20], rax
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x30]
mov qword [rcx + 0x18], rax
mov rcx, qword [rsp + 0x58]
mov eax, dword [rsp + 0x50]
mov dword [rcx + 0x28], eax
mov rcx, qword [rsp + 0x58]
mov rax, qword [0x14005ce28]
mov qword [rcx], rax
mov rax, qword [rsp + 0x58]
mov qword [0x14005ce28], rax
xor eax, eax
add rsp, 0x98
ret