Function at 0x1400015d0
Capabilities:
Parse pe header

Disassembly:
push rsi
push rdi
push r13
sub rsp, 0x50
mov rax, qword [0x140019008]
xor rax, rsp
mov qword [rsp + 0x30], rax
mov eax, 0x5a4d
mov qword [rsp + 0x20], rdx
cmp word [0x1400199f0], ax
jne 0x1400019a8
movsxd rsi, dword [0x140019a2c]
lea rdi, [0x1400199f0]
add rsi, rdi
cmp dword [rsi], 0x4550
jne 0x1400019a8
mov edx, dword [rsi + 0x50]
mov r9d, 4
mov rcx, qword [rsi + 0x30]
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
jne 0x14000165e
mov edx, dword [rsi + 0x50]
lea r9d, [rax + 4]
xor ecx, ecx
mov r8d, 0x2000
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r13, rax
test rax, rax
je 0x1400019a8
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x88], r12
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r15
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, r13
mov r15, rax
mov qword [rax + 8], r13
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, r13
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov r8d, dword [rsi + 0x54]
mov rdx, rdi
add r8d, dword [0x140019a2c]
mov rcx, rax
mov rbx, rax
call fcn.140003740
movsxd rax, dword [0x140019a2c]
mov ebp, r14d
add rax, rbx
mov qword [r15], rax
mov qword [rax + 0x30], r13
mov rcx, qword [r15]
mov r12, qword [r15 + 8]
movzx edi, word [rcx + 0x14]
add rdi, 0x28
cmp r14w, word [rcx + 6]
jae 0x1400017a9
add rdi, rcx
lea r14, [0x1400199f0]
mov eax, dword [rdi]
test eax, eax
jne 0x14000175f
movsxd rax, dword [rsi + 0x38]
test eax, eax
jle 0x140001791
mov ecx, dword [rdi - 4]
mov r9d, 4
add rcx, r12
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.140002a90
jmp 0x140001791
mov ecx, dword [rdi - 4]
mov rdx, rax
add rcx, r12
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, r14
mov rbx, rax
call fcn.140003740
mov dword [rdi - 8], ebx
mov rcx, qword [r15]
inc ebp
add rdi, 0x28
movzx eax, word [rcx + 6]
cmp ebp, eax
jl 0x140001721
xor r14d, r14d
mov r12, qword [rsp + 0x88]
mov rbx, r13
mov rbp, qword [rsp + 0x80]
sub rbx, qword [rsi + 0x30]
je 0x140001859
cmp dword [rcx + 0xb4], 0
jbe 0x140001859
mov rdi, qword [r15 + 8]
mov r10d, dword [rcx + 0xb0]
add r10, rdi
mov eax, dword [r10]
test eax, eax
je 0x140001859
nop dword [rax + rax]
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 0x14000184c
nop dword [rax]
movzx eax, word [rdx]
mov ecx, eax
shr eax, 0xc
and ecx, 0xfff
cmp eax, 3
je 0x14000182e
cmp eax, 0xa
jne 0x140001832
add qword [rcx + r9], rbx
jmp 0x140001832
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 0x140001810
mov eax, r11d
add r10, rax
mov eax, dword [r10]
test eax, eax
jne 0x1400017f0
mov rcx, r15
call fcn.140001450
test eax, eax
je 0x14000199c
mov r10, qword [r15]
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 0x14000194c
add rbx, r10
lea rsi, [0x140016800]
nop dword [rax + rax]
mov r9d, dword [rbx + 0x14]
mov r8d, dword [rbx]
bt r9d, 0x19
jae 0x1400018c5
mov ecx, dword [rbx - 8]
mov edx, r8d
or rcx, rdi
mov r8d, 0x4000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140001934
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 0x14000191d
test r9b, 0x40
je 0x14000190f
mov r8d, dword [r10 + 0x20]
jmp 0x140001918
test r9b, r9b
jns 0x140001934
mov r8d, dword [r10 + 0x24]
test r8d, r8d
je 0x140001934
mov ecx, dword [rbx - 8]
lea r9, [rsp + 0x28]
mov edx, r8d
or rcx, rdi
mov r8d, r11d
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r10, qword [r15]
inc r14d
add rbx, 0x28
movzx eax, word [r10 + 6]
cmp r14d, eax
jl 0x1400018a0
mov eax, dword [r10 + 0x28]
test eax, eax
je 0x140001974
add rax, r13
je 0x14000199c
mov r8, qword [rsp + 0x20]
mov edx, 1
mov rcx, r13
call rax
test eax, eax
je 0x14000199c
mov dword [r15 + 0x1c], 1
mov rax, r15
mov r14, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x70]
mov r15, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.140001a80
add rsp, 0x50
pop r13
pop rdi
pop rsi
ret
mov rcx, r15
call fcn.1400019b0
xor eax, eax
jmp 0x140001977
xor eax, eax
jmp 0x140001986