Function at 0x180040bd0
Capabilities:
Allocate or change rwx memory
Resolve function by parsing pe exports

Disassembly:
sub rsp, 0x248
mov byte [rsp + 0x24], 0
movzx eax, byte [0x1800a525c]
test eax, eax
je 0x180040bee
mov al, 1
jmp 0x18004117e
xor edx, edx
lea rcx, [0x18007c690]
call fcn.18004a600
mov qword [0x1800a5270], rax
cmp qword [0x1800a5270], 0
je 0x180041179
xor edx, edx
lea rcx, [0x18007c830]
call fcn.18004a430
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
jne 0x180040c3f
xor edx, edx
lea rcx, [0x18007c818]
call fcn.18004a430
mov qword [rsp + 0x60], rax
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0xa0]
call fcn.18004dcc0
mov dword [rsp + 0x20], 0
jmp 0x180040c65
mov eax, dword [rsp + 0x20]
inc eax
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x218]
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x50]
cmp dword [rsp + 0x20], eax
jge 0x18004116c
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
cmp qword [rcx + rax + 0x28], 0
jne 0x180040cb4
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
cmp qword [rcx + rax + 0x30], 0
je 0x180041167
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rdx, qword [0x1800a5270]
cmp qword [rcx + rax + 0x18], rdx
jne 0x180041167
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
cmp dword [rcx + rax + 0x20], 0
je 0x180040e69
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
mov rdx, qword [rax + 0x10]
mov ecx, 0xe
call fcn.1800493a0
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov eax, 0x25ff
mov rcx, qword [rsp + 0x28]
mov word [rcx], ax
mov rax, qword [rsp + 0x28]
add rax, 2
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov dword [rax], 0
mov rax, qword [rsp + 0x28]
add rax, 4
mov qword [rsp + 0x28], rax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rdx, qword [rsp + 0x28]
mov rax, qword [rcx + rax + 0x18]
mov qword [rdx], rax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x28]
mov rcx, qword [rsp + 0x58]
sub rcx, rax
mov rax, rcx
sub rax, 4
mov dword [rsp + 0x54], eax
lea r9, [rsp + 0x30]
mov r8d, 0x20
mov edx, 0xe
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x98], rax
lea r9, [rsp + 0x30]
mov r8d, 0x40
mov edx, 4
mov rax, qword [rsp + 0x98]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180040e64
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x28]
mov qword [0x1800a5250], rax
mov rax, qword [0x1800a5250]
mov eax, dword [rax]
mov dword [0x1800a5258], eax
mov rax, qword [0x1800a5250]
mov ecx, dword [rsp + 0x54]
mov dword [rax], ecx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
lea r9, [rsp + 0x30]
mov r8d, dword [rsp + 0x30]
mov edx, 4
mov rcx, qword [rcx + rax + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x18004112b
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
cmp qword [rcx + rax + 0x30], 0
je 0x180041073
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov rdx, qword [rax + 0x10]
mov ecx, 8
call fcn.1800493a0
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x48]
lea rcx, [0x18003ee10]
mov qword [rax], rcx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
cmp dword [rcx + rax + 0x38], 0
je 0x180040fac
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x70], rax
lea r9, [rsp + 0x3c]
mov r8d, 0x40
mov edx, 4
mov rax, qword [rsp + 0x70]
mov rcx, qword [rax + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180040fa7
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x30]
mov qword [0x1800a5250], rax
mov rax, qword [0x1800a5250]
mov eax, dword [rax]
mov dword [0x1800a5258], eax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x30]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov rax, rcx
sub rax, 4
mov rcx, qword [0x1800a5250]
mov dword [rcx], eax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
lea r9, [rsp + 0x3c]
mov r8d, dword [rsp + 0x3c]
mov edx, 4
mov rcx, qword [rcx + rax + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x180041053
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x80], rax
lea r9, [rsp + 0x40]
mov r8d, 0x40
mov edx, 8
mov rax, qword [rsp + 0x80]
mov rcx, qword [rax + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x180041053
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x30]
mov qword [0x1800a5260], rax
mov rax, qword [0x1800a5260]
mov rax, qword [rax]
mov qword [0x1800a5268], rax
mov rax, qword [0x1800a5260]
mov rcx, qword [rsp + 0x48]
mov qword [rax], rcx
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x40]
mov edx, 8
mov rcx, qword [rcx + rax + 0x30]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea r9, [rsp + 0x78]
mov r8d, 0x20
mov edx, 8
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x18004112b
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
add rax, qword [rsp + 0x210]
mov qword [rsp + 0x90], rax
lea r9, [rsp + 0x34]
mov r8d, 0x40
mov edx, 8
mov rax, qword [rsp + 0x90]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x18004112b
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rax, qword [rcx + rax + 0x28]
mov qword [0x1800a5260], rax
mov rax, qword [0x1800a5260]
mov rax, qword [rax]
mov qword [0x1800a5268], rax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
mov rdx, qword [0x1800a5260]
mov rax, qword [rcx + rax + 0x18]
mov qword [rdx], rax
movsxd rax, dword [rsp + 0x20]
imul rax, rax, 0x40
mov rcx, qword [rsp + 0x210]
lea r9, [rsp + 0x34]
mov r8d, dword [rsp + 0x34]
mov edx, 8
mov rcx, qword [rcx + rax + 0x28]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp qword [0x1800a5260], 0
jne 0x180041149
cmp qword [0x1800a5250], 0
jne 0x180041149
mov dword [rsp + 0x38], 0
jmp 0x180041151
mov dword [rsp + 0x38], 1
movzx eax, byte [rsp + 0x38]
mov byte [rsp + 0x24], al
movzx eax, byte [rsp + 0x24]
mov byte [0x1800a525c], al
jmp 0x18004116c
jmp 0x180040c5b
lea rcx, [rsp + 0xa0]
call fcn.18004ddd0
movzx eax, byte [rsp + 0x24]
add rsp, 0x248
ret