Function at 0x140080240
Capabilities:
Parse pe header

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x18
lea rbp, [rsp + 0x10]
cmp byte [0x1400f9934], 0
jne 0x1400803e0
mov byte [0x1400f9934], 1
mov rdi, qword [0x1400970a8]
movzx eax, word [rdi]
cmp eax, 0x5a4d
jne 0x1400802a3
movsxd rax, dword [rdi + 0x3c]
cmp dword [rdi + rax], 0x4550
jne 0x1400802a3
movzx ecx, word [rdi + rax + 0x18]
cmp ecx, 0x20b
jne 0x1400802a3
movzx eax, word [rdi + rax + 6]
shl rax, 3
lea rax, [rax + rax*4]
jmp 0x1400802a5
xor eax, eax
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.140014130
sub rsp, rax
mov rax, rsp
mov qword [0x1400fa340], rax
mov dword [0x1400f9a14], 0
lea r14, [0x1400f06e8]
lea rbx, [0x1400f06e8]
mov rax, rbx
sub rax, r14
cmp rax, 7
jle 0x1400803e0
cmp rax, 0xc
jl 0x14008031f
lea r14, [0x1400f06e8]
cmp dword [0x1400f06e8], 0
jne 0x140080330
cmp dword [0x1400f06ec], 0
jne 0x140080330
cmp dword [0x1400f06f0], 0
lea rax, [0x1400f06e8]
lea r14, [0x1400f06f4]
cmovne r14, rax
cmp dword [r14], 0
jne 0x140080330
cmp dword [r14 + 4], 0
je 0x1400803f1
cmp r14, rbx
jae 0x14008036f
lea rsi, [rbp + 4]
nop dword [rax]
mov eax, dword [r14]
mov ecx, dword [r14 + 4]
add eax, dword [rcx + rdi]
add rcx, rdi
mov dword [rbp + 4], eax
sub rsp, 0x20
mov r8d, 4
mov rdx, rsi
call fcn.140080580
add rsp, 0x20
add r14, 8
cmp r14, rbx
jb 0x140080340
mov eax, dword [0x1400f9a14]
test eax, eax
jle 0x1400803e0
mov edi, 0x10
mov rdx, qword [0x1400fa340]
xor ebx, ebx
lea rsi, [rbp - 8]
mov r14, qword [sym.imp.KERNEL32.dll_VirtualProtect]
jmp 0x1400803b0
add rbx, 1
movsxd rcx, eax
add rdi, 0x28
cmp rbx, rcx
jge 0x1400803e0
mov r8d, dword [rdx + rdi - 0x10]
test r8d, r8d
je 0x1400803a0
mov rcx, qword [rdx + rdi - 8]
mov rdx, qword [rdx + rdi]
sub rsp, 0x20
mov r9, rsi
call r14
add rsp, 0x20
mov rdx, qword [0x1400fa340]
mov eax, dword [0x1400f9a14]
jmp 0x1400803a0
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov edx, dword [r14 + 8]
cmp edx, 1
jne 0x140080543
add r14, 0xc
cmp r14, rbx
jae 0x14008036f
lea r15, [0x140080554]
mov r12d, 0x8b
lea r13, [0x1400f0478]
lea rsi, [rbp - 8]
jmp 0x14008043d
add r14, 0xc
cmp r14, rbx
jae 0x14008036f
mov ecx, dword [r14 + 8]
mov r8d, ecx
and r8d, 0xf8
add r8d, 0xfffffff8
shrd r8d, ecx, 3
cmp r8d, 7
ja case.0x140080473.2
mov edx, dword [r14]
mov eax, dword [r14 + 4]
add rax, rdi
mov r9, qword [rdx + rdi]
movsxd r10, dword [r15 + r8*4]
add r10, r15
jmp r10
movzx r11d, byte [rax]
lea r10, [r11 - 0x100]
test r11b, r11b
jmp 0x1400804aa
movzx r11d, word [rax]
lea r10, [r11 - 0x10000]
test r11w, r11w
jmp 0x1400804aa
mov r11d, dword [rax]
movabs r10, 0xffffffff00000000
add r10, r11
test r11d, r11d
cmovns r10, r11
jmp 0x1400804b3
mov r10, qword [rax]
add rdx, rdi
sub r10, rdx
add r10, r9
mov qword [rbp - 8], r10
movzx edx, cl
cmp edx, 0x3f
ja 0x1400804ee
mov r11, 0xffffffffffffffff
mov ecx, edx
shl r11, cl
not r11
cmp r10, r11
jg 0x140080518
lea ecx, [rdx - 1]
mov r11, 0xffffffffffffffff
shl r11, cl
cmp r10, r11
jl 0x140080518
bt r12d, r8d
jae 0x140080430
mov ecx, r8d
mov r8, qword [r13 + rcx*8]
sub rsp, 0x20
mov rcx, rax
mov rdx, rsi
call fcn.140080580
add rsp, 0x20
jmp 0x140080430
sub rsp, 0x30
mov qword [rsp + 0x20], r10
lea rcx, str._d_bit_pseudo_relocation_at__p_out_of_range__targeting__p__yielding_the_value__p._n
mov r8, rax
call fcn.140080770
movzx edx, cl
sub rsp, 0x20
lea rcx, str.__Unknown_pseudo_relocation_bit_size__d._n
call fcn.140080770
sub rsp, 0x20
lea rcx, str.__Unknown_pseudo_relocation_protocol_version__d._n
call fcn.140080770
int3