Function at 0x140142d10
Capabilities:
Parse pe header

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rsp + 0x150], rbx
mov rax, qword [0x1403ad830]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rdi, rdx
mov rbx, rcx
xor r15d, r15d
mov dword [rdx], r15d
lea rcx, [rdx + 8]
call fcn.14001f170
mov qword [rdi + 0x30], r15
mov qword [rdi + 0x40], r15
mov dword [rdi + 0x38], r15d
lea rcx, [rbp - 0x69]
call fcn.140050730
nop
mov rdx, rbx
lea rcx, [rbp - 0x69]
call fcn.1400508d0
test eax, eax
je 0x140142db8
mov dword [rdi], 0xffffffff
lea rdx, str.Open_file_failed
lea rcx, [rsp + 0x48]
call fcn.14001c950
nop
lea rdx, [rsp + 0x48]
lea rcx, [rdi + 8]
call fcn.14001d690
nop
lea rcx, [rsp + 0x48]
call fcn.14001d440
jmp 0x140142ff7
mov rax, qword [rbp - 1]
mov qword [rdi + 0x40], rax
cmp rax, 0x148
jb 0x140142ff7
lea rdx, [0x1404528a0]
mov ecx, 0x40
call fcn.14028375c
mov rsi, rax
mov qword [rsp + 0x30], rax
mov r12d, 0x40
test rax, rax
cmove r12, r15
mov qword [rsp + 0x28], r12
mov r8d, 0x40
mov rdx, rax
lea rcx, [rbp - 0x69]
call fcn.140034ba0
cmp rax, 0x40
je 0x140142e45
mov dword [rdi], 0xfffffffe
lea rdx, str.read_file_head_dos_failed
lea rcx, [rsp + 0x48]
call fcn.14001c950
nop
lea rdx, [rsp + 0x48]
lea rcx, [rdi + 8]
call fcn.14001d690
nop
lea rcx, [rsp + 0x48]
call fcn.14001d440
jmp 0x140142fd9
mov eax, 0x5a4d
cmp word [rsi], ax
jne 0x140142fd9
movsxd r15, dword [rsi + 0x3c]
lea rax, [r15 + 0x108]
cmp rax, qword [rbp - 1]
jae 0x140142fd9
lea rdx, [0x1404528a0]
mov ecx, 0x108
call fcn.14028375c
mov rbx, rax
mov qword [rsp + 0x40], rax
mov r13d, 0x108
test rax, rax
mov eax, 0
cmove r13d, eax
mov qword [rsp + 0x38], r13
mov rdx, r15
lea rcx, [rbp - 0x69]
call fcn.140034cc0
test eax, eax
je 0x140142ede
mov dword [rdi], 0xfffffffe
lea rdx, str.read_file_set_pointer_failed
lea rcx, [rsp + 0x48]
call fcn.14001c950
nop
lea rdx, [rsp + 0x48]
lea rcx, [rdi + 8]
call fcn.14001d690
nop
lea rcx, [rsp + 0x48]
call fcn.14001d440
jmp 0x140142fbb
mov r8d, 0x108
mov rdx, rbx
lea rcx, [rbp - 0x69]
call fcn.140034ba0
cmp rax, 0x108
je 0x140142f2e
mov dword [rdi], 0xfffffffe
lea rdx, str.read_file_head_pe_failed
lea rcx, [rsp + 0x48]
call fcn.14001c950
nop
lea rdx, [rsp + 0x48]
lea rcx, [rdi + 8]
call fcn.14001d690
nop
lea rcx, [rsp + 0x48]
call fcn.14001d440
jmp 0x140142fbb
cmp dword [rbx], 0x4550
jne 0x140142fbb
movzx eax, word [rbx + 0x16]
test al, 2
je 0x140142f4d
mov dword [rdi + 0x30], 1
movzx eax, word [rbx + 0x16]
mov ecx, 0x2000
test cx, ax
je 0x140142f5e
mov dword [rdi + 0x30], 2
movzx eax, word [rbx + 0x18]
mov ecx, 0x10b
cmp ax, cx
jne 0x140142f75
mov dword [rdi + 0x34], 0x20
jmp 0x140142f86
mov ecx, 0x20b
cmp ax, cx
jne 0x140142fbb
mov dword [rdi + 0x34], 0x40
cmp dword [rdi + 0x30], 1
jne 0x140142fbb
movzx eax, word [rbx + 0x5c]
cmp ax, 2
jne 0x140142f9f
mov dword [rdi + 0x38], 1
jmp 0x140142fbb
cmp ax, 3
jne 0x140142fae
mov dword [rdi + 0x38], 2
jmp 0x140142fbb
cmp ax, 1
jne 0x140142fbb
mov dword [rdi + 0x30], 3
test rbx, rbx
je 0x140142fd9
mov rcx, rbx
cmp r13, 1
jne 0x140142fd3
mov rdx, r13
call fcn.140283144
jmp 0x140142fd9
call fcn.140283144
nop
test rsi, rsi
je 0x140142ff7
mov rcx, rsi
cmp r12, 1
jne 0x140142ff1
mov rdx, r12
call fcn.140283144
jmp 0x140142ff7
call fcn.140283144
nop
lea rcx, [rbp - 0x69]
call fcn.140034f20
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.140283120
mov rbx, qword [rsp + 0x150]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret