Function at 0x1800031c0
Capabilities:
Parse pe header

Disassembly:
push rsi
push rdi
push r15
sub rsp, 0x40
mov rax, qword [0x180022008]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov eax, 0x5a4d
mov r15, rcx
cmp word [rcx], ax
jne 0x18000357c
movsxd rsi, dword [rcx + 0x3c]
add rsi, rcx
cmp dword [rsi], 0x4550
jne 0x18000357c
mov edx, dword [rsi + 0x50]
mov r9d, 4
mov rcx, qword [rsi + 0x30]
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x20], rax
mov rdi, rax
test rax, rax
jne 0x180003248
mov edx, dword [rsi + 0x50]
lea r9d, [rax + 4]
xor ecx, ecx
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov qword [rsp + 0x20], rax
mov rdi, rax
test rax, rax
je 0x18000357c
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r14
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov rcx, rax
lea r8d, [rdx + 0x20]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r14d, r14d
mov r8d, 0x1000
mov rcx, rdi
mov r12, rax
mov qword [rax + 8], rdi
mov qword [rax + 0x18], r14
lea r9d, [r14 + 4]
mov qword [rax + 0x10], r14
mov edx, dword [rsi + 0x50]
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [rsi + 0x54]
lea r9d, [r14 + 4]
mov r8d, 0x1000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, r15
add r8d, dword [r15 + 0x3c]
mov rcx, rax
mov rbx, rax
call fcn.180007a10
movsxd rax, dword [r15 + 0x3c]
mov ebp, r14d
add rax, rbx
mov qword [r12], rax
mov qword [rax + 0x30], rdi
mov rcx, qword [r12]
mov r13, qword [r12 + 8]
movzx edi, word [rcx + 0x14]
add rdi, 0x28
cmp r14w, word [rcx + 6]
jae 0x180003386
add rdi, rcx
nop dword [rax + rax]
mov eax, dword [rdi]
test eax, eax
jne 0x18000333e
movsxd rax, dword [rsi + 0x38]
test eax, eax
jle 0x180003370
mov ecx, dword [rdi - 4]
mov r9d, 4
add rcx, r13
mov r8d, 0x1000
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8, rbx
xor edx, edx
mov rcx, rax
mov dword [rdi - 8], eax
call fcn.180005320
jmp 0x180003370
mov ecx, dword [rdi - 4]
mov rdx, rax
add rcx, r13
mov r9d, 4
mov r8d, 0x1000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edx, dword [rdi + 4]
mov rcx, rax
mov r8d, dword [rdi]
add rdx, r15
mov rbx, rax
call fcn.180007a10
mov dword [rdi - 8], ebx
mov rcx, qword [r12]
inc ebp
add rdi, 0x28
movzx eax, word [rcx + 6]
cmp ebp, eax
jl 0x180003300
mov rbp, qword [rsp + 0x20]
mov r13, qword [rsp + 0x38]
mov rbx, rbp
sub rbx, qword [rsi + 0x30]
je 0x180003429
cmp dword [rcx + 0xb4], r14d
jbe 0x180003429
mov rdi, qword [r12 + 8]
mov r10d, dword [rcx + 0xb0]
add r10, rdi
mov eax, dword [r10]
test eax, eax
je 0x180003429
mov r11d, dword [r10 + 4]
lea rdx, [r10 + 8]
mov r9d, eax
mov r8d, r14d
add r9, rdi
lea rax, [r11 - 8]
test rax, 0xfffffffffffffffe
jbe 0x18000341c
nop dword [rax]
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x1800033fe
cmp eax, 0xa
jne 0x180003402
add qword [rcx + r9], rbx
jmp 0x180003402
add dword [rcx + r9], ebx
mov r11d, dword [r10 + 4]
inc r8d
add rdx, 2
mov eax, r8d
lea rcx, [r11 - 8]
shr rcx, 1
cmp rax, rcx
jb 0x1800033e0
mov eax, r11d
add r10, rax
mov eax, dword [r10]
test eax, eax
jne 0x1800033c0
mov rcx, r12
call fcn.180003040
test eax, eax
je 0x180003570
mov r10, qword [r12]
movabs rax, 0xffffffff00000000
movzx ebx, word [r10 + 0x14]
mov rdi, qword [r10 + 0x30]
add rbx, 0x28
and rdi, rax
cmp r14w, word [r10 + 6]
jae 0x18000351d
add rbx, r10
lea rsi, [0x18001f5d0]
nop dword [rax]
mov r9d, dword [rbx + 0x14]
mov r8d, dword [rbx]
bt r9d, 0x19
jae 0x180003495
mov ecx, dword [rbx - 8]
mov edx, r8d
or rcx, rdi
mov r8d, 0x4000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x180003504
mov rcx, r9
mov rax, r9
shr rax, 0x1e
and eax, 1
shr rcx, 0x1d
and ecx, 1
lea rcx, [rax + rcx*2]
mov rax, r9
shr rax, 0x1f
lea rcx, [rax + rcx*2]
mov eax, r9d
mov r11d, dword [rsi + rcx*4]
bts r11d, 9
and eax, 0x4000000
cmove r11d, dword [rsi + rcx*4]
test r8d, r8d
jne 0x1800034ed
test r9b, 0x40
je 0x1800034df
mov r8d, dword [r10 + 0x20]
jmp 0x1800034e8
test r9b, r9b
jns 0x180003504
mov r8d, dword [r10 + 0x24]
test r8d, r8d
je 0x180003504
mov ecx, dword [rbx - 8]
lea r9, [rsp + 0x20]
mov edx, r8d
or rcx, rdi
mov r8d, r11d
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r10, qword [r12]
inc r14d
add rbx, 0x28
movzx eax, word [r10 + 6]
cmp r14d, eax
jl 0x180003470
mov eax, dword [r10 + 0x28]
test eax, eax
je 0x180003543
add rax, rbp
je 0x180003570
xor r8d, r8d
mov rcx, rbp
lea edx, [r8 + 1]
call rax
test eax, eax
je 0x180003570
mov dword [r12 + 0x1c], 1
mov rax, r12
mov r12, qword [rsp + 0x78]
mov rbp, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x68]
mov r14, qword [rsp + 0x30]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.180003750
add rsp, 0x40
pop r15
pop rdi
pop rsi
ret
mov rcx, r12
call fcn.180003580
xor eax, eax
jmp 0x180003546
xor eax, eax
jmp 0x18000355a