Function at 0x180331490
Capabilities:
Parse pe header

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
lea rbp, [rsp - 0x2f]
sub rsp, 0xd8
mov rax, qword [0x18066dcd8]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov rax, qword [rcx + 0x98]
mov r12d, edx
mov rbx, qword [rcx + 0xa0]
mov rsi, rcx
mov qword [rbp - 0x61], rax
xor edi, edi
mov eax, edx
mov qword [rcx + 0xd8], rdi
cdq
mov rcx, rbx
xor eax, edx
sub eax, edx
xor edx, edx
movzx r13d, ax
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b86
lea r8, [rsp + 0x28]
mov rcx, rbx
lea rdx, [0x18050f808]
call fcn.180301150
mov edx, eax
test eax, eax
jne 0x180331b86
mov eax, 0x5a4d
mov qword [rsp + 0x120], r14
mov qword [rsp + 0xd0], r15
mov dword [rsp + 0x20], 2
cmp word [rsp + 0x28], ax
jne 0x180331b6a
movzx edx, word [rbp - 0x7f]
mov rcx, rbx
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x7d]
mov rcx, rbx
lea rdx, [0x18050f820]
call fcn.180301150
mov edx, eax
test eax, eax
jne 0x180331b76
movzx eax, word [rbp - 0x7d]
mov ecx, 0x454e
mov edx, 2
mov dword [rsp + 0x20], edx
cmp ax, cx
jne 0x18033175d
movzx edx, word [rbp - 0x7b]
mov rcx, rbx
movzx eax, word [rbp - 0x7f]
mov r14d, edi
add edx, eax
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
movzx edx, word [rbp - 0x79]
mov rcx, rbx
movzx eax, word [rbp - 0x7b]
sub edx, eax
call fcn.180300b30
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
mov rcx, rbx
call fcn.180300e30
movzx r15d, ax
mov rcx, rbx
cmp ax, 0x10
jbe 0x1803315fa
mov edx, 3
mov dword [rsp + 0x20], edx
call fcn.180300c50
jmp 0x180331b72
call fcn.180300e30
movzx edi, ax
test ax, ax
je 0x180331640
mov rcx, rbx
call fcn.180300e30
mov ecx, 0x8008
cmp di, cx
je 0x18033173e
movzx eax, ax
lea rcx, [rax + rax*2]
lea rcx, [rcx*4 + 4]
add qword [rbx + 0x38], rcx
mov rcx, rbx
call fcn.180300e30
movzx edi, ax
test ax, ax
jne 0x180331607
xor edi, edi
mov rcx, rbx
call fcn.180300c50
test di, di
je 0x180331b53
test r14d, r14d
je 0x180331b53
movzx edx, di
imul eax, edx, 0x76
cmp eax, dword [rbx + 8]
ja 0x180331b53
mov dword [rsi], edx
test r12d, r12d
js 0x180331b72
cmp r13d, edx
jae 0x180331b5f
mov rcx, qword [rbp - 0x61]
lea r8, [rsp + 0x20]
mov edx, 0xb8
call fcn.180303860
mov edx, dword [rsp + 0x20]
mov qword [rsi + 0xd8], rax
test edx, edx
jne 0x180331b76
lea eax, [r13*2]
mov rcx, rbx
add eax, r13d
lea edx, [r14 + rax*4]
call fcn.180301730
mov dword [rsp + 0x20], eax
test eax, eax
jne 0x180331b6a
lea edx, [rax + 0xc]
mov rcx, rbx
call fcn.180300b30
mov dword [rsp + 0x20], eax
test eax, eax
jne 0x180331b6a
mov rcx, rbx
movzx edi, r15w
call fcn.180300e30
movzx edx, ax
mov ecx, edi
mov rax, qword [rsi + 0xd8]
shl edx, cl
mov rcx, rbx
mov dword [rax], edx
call fcn.180300e30
movzx edx, ax
mov ecx, edi
mov rax, qword [rsi + 0xd8]
shl edx, cl
mov rcx, rbx
mov dword [rax + 0xa8], edx
add qword [rbx + 0x38], 8
call fcn.180300c50
mov rcx, qword [rsi + 0xd8]
mov rdx, rbx
call fcn.180331c30
mov edx, eax
mov dword [rsp + 0x20], eax
jmp 0x180331b4d
mov rcx, rbx
movzx edi, ax
call fcn.1800cc580
mov r14d, dword [rbx + 0x38]
sub r14d, dword [rbx + 0x40]
add r14d, 4
add r14d, eax
jmp 0x180331642
mov edi, 0x4550
cmp ax, di
jne 0x180331b4d
movzx edx, word [rbp - 0x7f]
mov rcx, rbx
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x51]
mov rcx, rbx
lea rdx, [0x18050f838]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
cmp dword [rbp - 0x51], edi
jne 0x180331b53
mov eax, 0x14c
cmp word [rbp - 0x4d], ax
jne 0x180331b53
mov eax, 0xe0
cmp word [rbp - 0x49], ax
jne 0x180331b53
mov eax, 0x10b
cmp word [rbp - 0x47], ax
jne 0x180331b53
xor r12d, r12d
movzx edi, r12w
mov dword [rsi], r12d
cmp r12w, word [rbp - 0x4b]
jae 0x180331b53
lea r8, [rbp - 0x39]
mov rcx, rbx
lea rdx, [0x18050f870]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
mov eax, dword [rbp - 0x31]
cmp dword [rbp - 0x45], eax
je 0x18033182d
inc di
cmp di, word [rbp - 0x4b]
jb 0x1803317f1
mov edx, 3
jmp 0x180331b76
mov edx, dword [rbp - 0x29]
mov rcx, rbx
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 1]
mov rcx, rbx
lea rdx, [0x18050f890]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
movzx ecx, word [rbp + 0xd]
movzx eax, word [rbp + 0xb]
mov r15d, dword [rbp - 0x29]
mov word [rsp + 0x26], r12w
add ecx, eax
je 0x180331b4d
mov r8d, r12d
nop dword [rax]
nop dword [rax + rax]
lea r8d, [r8 + 2]
mov rcx, rbx
lea edx, [r15 + r8*8]
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x69]
mov rcx, rbx
lea rdx, [0x18050f8b0]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
mov ecx, dword [rbp - 0x65]
test ecx, ecx
jns 0x180331b53
mov edi, dword [rbp - 0x29]
btr ecx, 0x1f
add edi, ecx
mov dword [rbp - 0x65], ecx
mov edx, edi
mov dword [rbp - 0x75], edi
mov rcx, rbx
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x11]
mov rcx, rbx
lea rdx, [0x18050f890]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
movzx ecx, word [rbp - 3]
movzx eax, word [rbp - 5]
mov word [rsp + 0x24], r12w
add ecx, eax
je 0x180331b29
mov r8d, r12d
nop dword [rax + rax]
lea r8d, [r8 + 2]
mov rcx, rbx
lea edx, [rdi + r8*8]
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x71]
mov rcx, rbx
lea rdx, [0x18050f8b0]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
mov ecx, dword [rbp - 0x6d]
test ecx, ecx
jns 0x180331b53
mov r14d, dword [rbp - 0x29]
btr ecx, 0x1f
add r14d, ecx
mov dword [rbp - 0x6d], ecx
mov edx, r14d
mov rcx, rbx
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x21]
mov rcx, rbx
lea rdx, [0x18050f890]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
movzx ecx, word [rbp - 0x13]
movzx edi, r12w
movzx eax, word [rbp - 0x15]
add ecx, eax
je 0x180331b02
mov r8d, r12d
nop dword [rax]
lea r8d, [r8 + 2]
mov rcx, rbx
lea edx, [r14 + r8*8]
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp - 0x59]
mov rcx, rbx
lea rdx, [0x18050f8b0]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
test dword [rbp - 0x6d], 0x80000000
jne 0x180331b53
cmp dword [rbp - 0x69], 8
jne 0x180331ae8
mov edx, dword [rbp - 0x55]
mov rcx, rbx
add edx, r15d
call fcn.180301730
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
lea r8, [rbp + 0xf]
mov rcx, rbx
lea rdx, [0x18050f8c0]
call fcn.180301150
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b76
cmp r13d, dword [rsi]
jne 0x180331ae6
mov rcx, qword [rbp - 0x61]
lea r8, [rsp + 0x20]
mov edx, 0xb8
call fcn.180303860
mov edx, dword [rsp + 0x20]
mov qword [rsi + 0xd8], rax
test edx, edx
jne 0x180331b76
mov ecx, dword [rbp + 0xf]
mov rdx, rbx
sub ecx, dword [rbp - 0x31]
add ecx, dword [rbp - 0x29]
mov dword [rax], ecx
mov rcx, qword [rsi + 0xd8]
mov eax, dword [rbp + 0x13]
mov dword [rcx + 0xa8], eax
mov rcx, qword [rsi + 0xd8]
call fcn.180331c30
mov dword [rsp + 0x20], eax
mov edx, eax
test eax, eax
jne 0x180331b6a
inc dword [rsi]
movzx ecx, word [rbp - 0x13]
inc di
movzx eax, word [rbp - 0x15]
movzx r8d, di
add ecx, eax
cmp r8d, ecx
jb 0x1803319f0
movzx edi, word [rsp + 0x24]
movzx ecx, word [rbp - 3]
inc di
movzx eax, word [rbp - 5]
movzx r8d, di
add ecx, eax
mov word [rsp + 0x24], di
mov edi, dword [rbp - 0x75]
cmp r8d, ecx
jb 0x180331940
movzx edi, word [rsp + 0x26]
movzx ecx, word [rbp + 0xd]
inc di
movzx eax, word [rbp + 0xb]
movzx r8d, di
add ecx, eax
mov word [rsp + 0x26], di
cmp r8d, ecx
jb 0x180331890
mov eax, dword [rsi]
test eax, eax
jne 0x180331b5a
mov edx, 3
jmp 0x180331b76
cmp r13d, eax
jl 0x180331b66
mov edx, 6
jmp 0x180331b76
test edx, edx
je 0x180331b76
mov rcx, rsi
call fcn.180331bb0
mov edx, dword [rsp + 0x20]
mov r14, qword [rsp + 0x120]
mov r15, qword [rsp + 0xd0]
mov eax, edx
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.18042cdf0
add rsp, 0xd8
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret