Function at 0x51f980
Capabilities:
Parse pe header

Disassembly:
lea r12, [rsp - 0xb8]
cmp r12, qword [r14 + 0x10]
jbe 0x520346
push rbp
mov rbp, rsp
sub rsp, 0x130
mov qword [rsp + 0x140], rax
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0x148], rbx
lea rax, [0x0057a8e0]
nop dword [rax]
call sym.runtime.newobject
mov qword [rsp + 0xd0], rax
call sym.runtime.makemap_small
cmp dword [0x00717c60], 0
jne 0x51f9e5
mov rcx, qword [rsp + 0xd0]
jmp 0x51fa00
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov rcx, qword [rsp + 0xd0]
mov rdx, qword [rcx + 0x98]
mov qword [r11 + 8], rdx
mov qword [rcx + 0x98], rax
nop
lea rax, [0x00570480]
call sym.runtime.newobject
mov rcx, qword [rsp + 0xd8]
mov qword [rax], rcx
cmp dword [0x00717c60], 0
jne 0x51fa32
mov rdx, qword [rsp + 0x148]
jmp 0x51fa42
call sym.runtime.gcWriteBarrier1
mov rdx, qword [rsp + 0x148]
mov qword [r11], rdx
mov qword [rsp + 0xb8], rax
mov qword [rax + 8], rdx
movups xmmword [rax + 0x10], xmm15
movabs rcx, 0x7fffffffffffffff
mov qword [rax + 0x20], rcx
lea rax, [0x005546a0]
call sym.runtime.newobject
mov qword [rsp + 0xe8], rax
mov rcx, qword [rsp + 0xd8]
mov rdx, qword [rcx + 0x18]
mov rbx, rax
mov edi, 0x60
xor esi, esi
mov rax, qword [rsp + 0x148]
mov rcx, rdi
call rdx
nop dword [rax + rax]
test rbx, rbx
jne 0x51ff0e
mov rdx, qword [rsp + 0xe8]
cmp byte [rdx], 0x4d
jne 0x51fb96
cmp byte [rdx + 1], 0x5a
nop
jne 0x51fb96
mov ecx, dword [rdx + 0x3c]
mov qword [rsp + 0x70], rcx
nop
lea rax, [0x00552f00]
call sym.runtime.newobject
mov qword [rsp + 0xe0], rax
mov rcx, qword [rsp + 0xd8]
mov rdx, qword [rcx + 0x18]
mov rbx, rax
mov edi, 4
mov rsi, qword [rsp + 0x70]
mov rax, qword [rsp + 0x148]
mov rcx, rdi
call rdx
mov rbx, qword [rsp + 0xe0]
cmp byte [rbx], 0x50
jne 0x51fb33
cmp byte [rbx + 1], 0x45
jne 0x51fb33
cmp byte [rbx + 2], 0
jne 0x51fb33
cmp byte [rbx + 3], 0
jne 0x51fb33
mov rdx, qword [rsp + 0x70]
add rdx, 4
jmp 0x51fb98
movups xmmword [rsp + 0xf0], xmm15
lea rax, [0x00552f00]
call sym.runtime.convTnoptr
lea rcx, [0x00552f00]
mov qword [rsp + 0xf0], rcx
mov qword [rsp + 0xf8], rax
lea rax, [0x0059bddb]
mov ebx, 0x1e
lea rcx, [rsp + 0xf0]
mov edi, 1
mov rsi, rdi
nop dword [rax + rax]
call sym.fmt.Errorf
mov rcx, rbx
mov rbx, rax
xor eax, eax
add rsp, 0x130
pop rbp
ret
xor edx, edx
mov qword [rsp + 0x58], rdx
mov rbx, qword [rsp + 0xb8]
mov r9, qword [rbx + 0x10]
lea r10, [rdx + r9]
cmp r9, r10
jg 0x51fbb6
mov qword [rbx + 0x18], r10
lea rax, [0x005cfb40]
lea rcx, [0x005d0a40]
lea rdi, [0x007179e0]
lea rsi, [0x0054e8c0]
mov r8, qword [rsp + 0xd0]
call sym.encoding_binary.Read
nop
test rax, rax
jne 0x51fefd
mov rax, qword [rsp + 0xd0]
movzx edx, word [rax]
cmp dx, 0x5032
ja 0x51fc2c
nop dword [rax + rax]
cmp dx, 0x14c
ja 0x51fc18
test dx, dx
je 0x51fc5e
cmp dx, 0x14c
je 0x51fc5e
jmp 0x51fea3
cmp dx, 0x1c4
je 0x51fc5e
nop
cmp dx, 0x5032
je 0x51fc5e
jmp 0x51fea3
cmp dx, 0x5128
ja 0x51fc4c
cmp dx, 0x5064
je 0x51fc5e
nop word [rax + rax]
cmp dx, 0x5128
je 0x51fc5e
jmp 0x51fea3
cmp dx, 0x8664
je 0x51fc5e
cmp dx, 0xaa64
jne 0x51fea3
lea rbx, [0x005d00f0]
mov rcx, qword [rsp + 0xb8]
call sym.github.com_mandiant_GoReSym_debug_pe.readStringTable
mov rdx, qword [rsp + 0xd0]
mov qword [rdx + 0x78], rbx
mov qword [rdx + 0x80], rcx
cmp dword [0x00717c60], 0
je 0x51fc9e
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov rsi, qword [rdx + 0x70]
mov qword [r11 + 8], rsi
mov qword [rdx + 0x70], rax
test rdi, rdi
je 0x51fcc9
movups xmmword [rdx + 0x78], xmm15
cmp dword [0x00717c60], 0
je 0x51fcc1
mov rsi, qword [rdx + 0x70]
call sym.runtime.gcWriteBarrier1
mov qword [r11], rsi
mov qword [rdx + 0x70], 0
mov rax, rdx
lea rbx, [0x005d00f0]
mov rcx, qword [rsp + 0xb8]
nop dword [rax + rax]
call sym.github.com_mandiant_GoReSym_debug_pe.readCOFFSymbols
mov rdx, qword [rsp + 0xd0]
mov qword [rdx + 0x60], rbx
mov qword [rdx + 0x68], rcx
cmp dword [0x00717c60], 0
je 0x51fd10
nop
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r9, qword [rdx + 0x58]
mov qword [r11 + 8], r9
mov qword [rdx + 0x58], rax
test rdi, rdi
jne 0x51fe92
mov rdi, qword [rdx + 0x70]
mov rsi, qword [rdx + 0x78]
mov r8, qword [rdx + 0x80]
call sym.github.com_mandiant_GoReSym_debug_pe.removeAuxSymbols
mov rdx, qword [rsp + 0xd0]
mov qword [rdx + 0x48], rbx
mov qword [rdx + 0x50], rcx
cmp dword [0x00717c60], 0
je 0x51fd5a
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r8, qword [rdx + 0x40]
mov qword [r11 + 8], r8
mov qword [rdx + 0x40], rax
nop
test rdi, rdi
jne 0x51fe81
mov rcx, qword [rdx]
mov qword [rsp + 0x7c], rcx
movups xmm0, xmmword [rdx + 4]
movups xmmword [rsp + 0x80], xmm0
lea rax, [0x00578f00]
lea rbx, [rsp + 0x7c]
call sym.encoding_binary.Size
mov rcx, qword [rsp + 0x58]
add rcx, rax
mov rbx, qword [rsp + 0xb8]
mov rdx, qword [rbx + 0x10]
add rcx, rdx
cmp rdx, rcx
jle 0x51fdba
mov rdx, qword [0x006acab0]
mov rsi, qword [0x006acab8]
jmp 0x51fdc2
mov qword [rbx + 0x18], rcx
xor edx, edx
xor esi, esi
test rdx, rdx
jne 0x51fe6f
mov rdx, qword [rsp + 0xd0]
movzx ecx, word [rdx + 0x10]
lea rax, [0x005d00f0]
nop
call sym.github.com_mandiant_GoReSym_debug_pe.readOptionalHeader
mov rdx, qword [rsp + 0xd0]
mov qword [rdx + 0x18], rax
cmp dword [0x00717c60], 0
je 0x51fe0a
call sym.runtime.gcWriteBarrier2
mov qword [r11], rbx
mov rsi, qword [rdx + 0x20]
mov qword [r11 + 8], rsi
mov qword [rdx + 0x20], rbx
test rcx, rcx
jne 0x51fe5e
movzx ecx, word [rdx + 2]
lea rax, [0x00562460]
mov rbx, rcx
call sym.runtime.makeslice
mov rdx, qword [rsp + 0xd0]
movzx esi, word [rdx + 2]
mov qword [rdx + 0x30], rsi
mov qword [rdx + 0x38], rsi
cmp dword [0x00717c60], 0
je 0x51fe53
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r9, qword [rdx + 0x28]
mov qword [r11 + 8], r9
mov qword [rdx + 0x28], rax
xor eax, eax
jmp 0x51ff27
xor eax, eax
mov rbx, rcx
mov rcx, rdi
add rsp, 0x130
pop rbp
ret
xor eax, eax
mov rbx, rdx
mov rcx, rsi
add rsp, 0x130
pop rbp
nop
ret
xor eax, eax
mov rbx, rdi
mov rcx, rsi
add rsp, 0x130
pop rbp
ret
xor eax, eax
mov rbx, rdi
mov rcx, rsi
add rsp, 0x130
pop rbp
ret
movups xmmword [rsp + 0xf0], xmm15
movzx eax, word [rax]
call sym.runtime.convT16
lea rcx, [0x00551e40]
mov qword [rsp + 0xf0], rcx
mov qword [rsp + 0xf8], rax
lea rax, [0x0059a5fe]
mov ebx, 0x1c
lea rcx, [rsp + 0xf0]
mov edi, 1
mov rsi, rdi
call sym.fmt.Errorf
mov rcx, rbx
mov rbx, rax
xor eax, eax
add rsp, 0x130
pop rbp
ret
mov rcx, rbx
mov rbx, rax
xor eax, eax
add rsp, 0x130
pop rbp
ret
xor eax, eax
add rsp, 0x130
pop rbp
ret
mov qword [r12 + r11*8], r9
lea r9, [r11 + 1]
mov rdx, rax
mov rax, r9
movzx r9d, word [rdx + 2]
cmp rax, r9
jge 0x52025c
mov qword [rsp + 0x50], rax
movups xmmword [rsp + 0x90], xmm15
movups xmmword [rsp + 0x98], xmm15
movups xmmword [rsp + 0xa8], xmm15
lea rax, [0x005cfb40]
mov rbx, qword [rsp + 0xb8]
lea rcx, [0x005d0a40]
lea rdi, [0x007179e0]
lea rsi, [0x00559900]
lea r8, [rsp + 0x90]
call sym.encoding_binary.Read
test rax, rax
jne 0x52024b
mov rdx, qword [rsp + 0xd0]
mov rbx, qword [rdx + 0x70]
mov rcx, qword [rdx + 0x78]
mov rdi, qword [rdx + 0x80]
lea rax, [rsp + 0x90]
call sym.github.com_mandiant_GoReSym_debug_pe._SectionHeader32_.fullName
test rcx, rcx
jne 0x52023a
mov qword [rsp + 0xc8], rax
mov qword [rsp + 0x40], rbx
lea rax, [0x00572aa0]
call sym.runtime.newobject
mov qword [rsp + 0xc0], rax
movups xmmword [rsp + 0x100], xmm15
movups xmmword [rsp + 0x110], xmm15
movups xmmword [rsp + 0x120], xmm15
mov rcx, qword [rsp + 0xc8]
mov qword [rsp + 0x100], rcx
mov rcx, qword [rsp + 0x40]
mov qword [rsp + 0x108], rcx
mov ecx, dword [rsp + 0x98]
mov dword [rsp + 0x110], ecx
mov ecx, dword [rsp + 0x9c]
mov dword [rsp + 0x114], ecx
mov ecx, dword [rsp + 0xa0]
mov dword [rsp + 0x118], ecx
mov ecx, dword [rsp + 0xa4]
mov dword [rsp + 0x11c], ecx
mov ecx, dword [rsp + 0xa8]
mov dword [rsp + 0x120], ecx
mov ecx, dword [rsp + 0xac]
mov dword [rsp + 0x124], ecx
movzx ecx, word [rsp + 0xb0]
mov word [rsp + 0x128], cx
movzx ecx, word [rsp + 0xb2]
mov word [rsp + 0x12a], cx
mov ecx, dword [rsp + 0xb4]
mov dword [rsp + 0x12c], ecx
cmp dword [0x00717c60], 0
nop
je 0x5200c1
mov rbx, rax
lea rcx, [rsp + 0x100]
lea rax, [0x0057c700]
call sym.runtime.wbMove
mov rax, qword [rsp + 0xc0]
movups xmm0, xmmword [rsp + 0x100]
movups xmmword [rax], xmm0
movups xmm0, xmmword [rsp + 0x110]
movups xmmword [rax + 0x10], xmm0
movups xmm0, xmmword [rsp + 0x120]
movups xmmword [rax + 0x20], xmm0
mov ecx, dword [rax + 0x1c]
mov qword [rsp + 0x70], rcx
mov edx, dword [rax + 0x18]
movabs rbx, 0x7fffffffffffffff
sub rbx, rdx
mov qword [rsp + 0x68], rbx
add rdx, rcx
mov qword [rsp + 0x38], rdx
mov esi, dword [rsp + 0xa4]
mov dword [rsp + 0x34], esi
test esi, esi
lea rax, [0x00570480]
nop dword [rax]
call sym.runtime.newobject
mov ecx, dword [rsp + 0x34]
test ecx, ecx
mov rcx, qword [rsp + 0xd8]
lea rdx, [0x005cfde0]
mov rbx, rcx
cmove rcx, rdx
mov qword [rax], rcx
mov rcx, qword [rsp + 0x148]
lea rdi, [0x007179e0]
mov rsi, rcx
cmove rcx, rdi
mov r8, qword [rsp + 0x70]
mov r9, qword [rsp + 0x68]
cmp r8, r9
movabs r9, 0x7fffffffffffffff
mov r10, qword [rsp + 0x38]
cmovle r9, r10
cmp dword [0x00717c60], 0
je 0x52018b
call sym.runtime.gcWriteBarrier1
mov qword [r11], rcx
mov qword [rax + 8], rcx
mov qword [rax + 0x10], r8
mov qword [rax + 0x18], r8
mov qword [rax + 0x20], r9
cmp dword [0x00717c60], 0
jne 0x5201ae
mov r9, qword [rsp + 0xc0]
jmp 0x5201c6
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r9, qword [rsp + 0xc0]
mov r10, qword [r9 + 0x58]
mov qword [r11 + 8], r10
mov qword [r9 + 0x58], rax
lea r10, [0x005cf9c0]
mov qword [r9 + 0x48], r10
cmp dword [0x00717c60], 0
je 0x5201f0
nop
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r12, qword [r9 + 0x50]
mov qword [r11 + 8], r12
mov qword [r9 + 0x50], rax
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rax + 0x30]
mov r11, qword [rsp + 0x50]
cmp r11, rcx
jae 0x52033d
mov r12, qword [rax + 0x28]
cmp dword [0x00717c60], 0
je 0x51ff19
mov rcx, r11
call sym.runtime.gcWriteBarrier2
mov qword [r11], r9
mov r13, qword [r12 + rcx*8]
mov qword [r11 + 8], r13
mov r11, rcx
jmp 0x51ff19
xor eax, eax
mov rbx, rcx
mov rcx, rdi
add rsp, 0x130
pop rbp
ret
mov rcx, rbx
mov rbx, rax
xor eax, eax
add rsp, 0x130
pop rbp
ret
mov rsi, qword [rdx + 0x30]
mov qword [rsp + 0x60], rsi
mov rcx, qword [rsp + 0xb8]
xor eax, eax
jmp 0x520282
lea rax, [r9 + 1]
mov rsi, qword [rsp + 0x60]
mov rcx, qword [rsp + 0xb8]
cmp rax, rsi
jge 0x52031a
mov rdi, qword [rdx + 0x30]
cmp rax, rdi
jae 0x520335
mov qword [rsp + 0x48], rax
mov rsi, qword [rdx + 0x28]
mov rsi, qword [rsi + rax*8]
test byte [rsi], al
lea rbx, [0x005d00f0]
mov rax, rsi
call sym.github.com_mandiant_GoReSym_debug_pe.readRelocs
mov rdx, qword [rsp + 0xd0]
mov r8, qword [rdx + 0x30]
mov r9, qword [rsp + 0x48]
cmp r9, r8
jae 0x52032a
mov r8, qword [rdx + 0x28]
mov r8, qword [r8 + r9*8]
mov qword [r8 + 0x38], rbx
mov qword [r8 + 0x40], rcx
cmp dword [0x00717c60], 0
je 0x5202f5
call sym.runtime.gcWriteBarrier2
mov qword [r11], rax
mov r10, qword [r8 + 0x30]
mov qword [r11 + 8], r10
mov qword [r8 + 0x30], rax
nop dword [rax]
test rdi, rdi
je 0x520271
xor eax, eax
mov rbx, rdi
mov rcx, rsi
add rsp, 0x130
pop rbp
ret
mov rax, rdx
xor ebx, ebx
xor ecx, ecx
add rsp, 0x130
pop rbp
ret
mov rax, r9
mov rcx, r8
call sym.runtime.panicIndex
mov rcx, rdi
call sym.runtime.panicIndex
mov rax, r11
call sym.runtime.panicIndex
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
nop
jmp sym.github.com_mandiant_GoReSym_debug_pe.NewFile