Function at 0x140042060
Capabilities:
Parse pe header

Disassembly:
push rsi
push rdi
push r12
push r14
sub rsp, 0x28
cmp word [rcx], 0x5a4d
mov rdi, r9
mov r14, r8
mov r12d, edx
mov rsi, rcx
je 0x14004208b
xor eax, eax
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rsi
ret
mov qword [rsp + 0x50], rbx
movsxd rbx, dword [rcx + 0x3c]
mov edx, 4
add rbx, rcx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1400420b1
cmp dword [rbx], 0x4550
je 0x1400420c3
xor eax, eax
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rsi
ret
mov rdx, qword [rsp + 0x70]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x20], r15
xor r15d, r15d
mov dword [rdi], r15d
mov dword [rdx], r15d
cmp word [rbx + 0x18], 0x20b
mov ebp, r15d
lea r13d, [r15 + 1]
jne 0x140042104
mov eax, dword [rbx + 0x50]
mov ecx, dword [rbx + 0xf8]
mov ebp, r13d
mov dword [rdi], eax
mov eax, dword [rbx + 8]
mov dword [rdx], eax
jmp 0x140042114
mov eax, dword [rbx + 0x50]
mov ecx, dword [rbx + 0xe8]
mov dword [rdi], eax
mov eax, dword [rbx + 8]
mov dword [rdx], eax
test ecx, ecx
je 0x1400421a6
mov edi, ecx
add rdi, rsi
test r12d, r12d
jne 0x140042148
test ebp, ebp
je 0x14004213a
mov r8, rsi
mov rdx, rbx
call fcn.14001aa90
mov rdi, rax
jmp 0x140042148
mov r8, rsi
mov rdx, rbx
call fcn.14001aa90
mov rdi, rax
mov edx, 0x48
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1400421a6
mov ecx, dword [rdi + 8]
sub ecx, 0x10
mov edi, ecx
add rdi, rsi
test r12d, r12d
jne 0x14004218c
test ebp, ebp
je 0x14004217e
mov r8, rsi
mov rdx, rbx
call fcn.14001aa90
mov rdi, rax
jmp 0x14004218c
mov r8, rsi
mov rdx, rbx
call fcn.14001aa90
mov rdi, rax
mov edx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x1400421a6
cmp dword [rdi], 0x424a5342
je 0x1400421ad
xor eax, eax
jmp 0x1400422da
mov ecx, r15d
add r14, r13
mov r11d, 0x20
nop
nop
movzx r8d, byte [r14 - 1]
movzx r9d, byte [r14]
movzx r10d, byte [r14 + 1]
add r8d, r13d
movzx r13d, byte [r14 + 3]
mov eax, 0x80078071
add r14, 5
mul r8d
shr edx, 0xf
mov eax, 0x80078071
imul edx, edx, 0xfff1
sub r8d, edx
add ecx, r8d
add r9d, r8d
mul ecx
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub ecx, edx
mul r9d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub r9d, edx
add r10d, r9d
lea r8d, [rcx + r9]
movzx r9d, byte [r14 - 3]
mul r8d
shr edx, 0xf
mov eax, 0x80078071
imul edx, edx, 0xfff1
sub r8d, edx
mul r10d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub r10d, edx
add r9d, r10d
lea ecx, [r8 + r10]
mul ecx
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub ecx, edx
mul r9d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub r9d, edx
add r13d, r9d
lea r8d, [rcx + r9]
mul r8d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub r8d, edx
mul r13d
mov eax, 0x80078071
shr edx, 0xf
imul edx, edx, 0xfff1
sub r13d, edx
lea ecx, [r8 + r13]
mul ecx
shr edx, 0xf
imul edx, edx, 0xfff1
sub ecx, edx
sub r11, 1
jne 0x1400421c0
shl ecx, 0x10
add ecx, r13d
cmp ecx, dword [rdi + 0xc]
cmovne rdi, r15
mov rax, rdi
mov r13, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov r15, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x50]
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rsi
ret