Function at 0x4919f0
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
cmp word [rcx], 0x5a4d
mov r13, rcx
mov r15, rdx
mov rdi, r8
mov rsi, r9
jne 0x491e80
movsxd rbp, dword [rcx + 0x3c]
add rbp, rcx
cmp dword [rbp], 0x4550
jne 0x491e80
mov edx, dword [rbp + 0x50]
mov r9d, 4
mov r8d, 0x3000
mov rcx, qword [rbp + 0x30]
mov r14, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call r14
test rax, rax
mov r12, rax
je 0x491e90
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
xor edx, edx
mov r8d, 0x40
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
mov rbx, rax
je 0x491eea
mov qword [rax + 0x28], rdi
mov r9d, 4
mov r8d, 0x1000
mov rcx, r12
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], 0
mov edx, dword [rbp + 0x54]
mov qword [rax + 0x30], rsi
mov qword [rax + 8], r12
mov qword [rax + 0x20], r15
mov rax, qword [rsp + 0xb0]
mov qword [rbx + 0x38], rax
call r14
mov r8d, dword [rbp + 0x54]
mov rdx, r13
add r8d, dword [r13 + 0x3c]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rdi, qword [rbx + 8]
mov r9, rax
movsxd rax, dword [r13 + 0x3c]
add rax, r9
movzx edx, word [rax + 0x14]
mov qword [rbx], rax
cmp word [rax + 6], 0
mov qword [rax + 0x30], r12
lea rsi, [rax + rdx + 0x18]
je 0x491b89
xor r15d, r15d
jmp 0x491b52
mov r8d, dword [rbp + 0x38]
test r8d, r8d
jle 0x491b3e
mov ecx, dword [rsi + 0xc]
movsxd r10, r8d
mov r9d, 4
mov r8d, 0x1000
mov rdx, r10
mov qword [rsp + 0x28], r10
add rcx, rdi
call r14
mov r10, qword [rsp + 0x28]
xor edx, edx
mov dword [rsi + 8], eax
mov rcx, rax
mov r8, r10
call sub.msvcrt.dll_memset
mov rax, qword [rbx]
add r15d, 1
add rsi, 0x28
movzx edx, word [rax + 6]
cmp r15d, edx
jge 0x491b85
mov edx, dword [rsi + 0x10]
test edx, edx
je 0x491b00
mov ecx, dword [rsi + 0xc]
mov r9d, 4
mov r8d, 0x1000
add rcx, rdi
call r14
mov edx, dword [rsi + 0x14]
mov r8d, dword [rsi + 0x10]
mov rcx, rax
add rdx, r13
call sub.msvcrt.dll_memcpy
mov dword [rsi + 8], eax
jmp 0x491b3e
mov rdi, qword [rbx + 8]
mov rsi, r12
sub rsi, qword [rbp + 0x30]
mov rbp, rsi
je 0x491c1d
mov ecx, dword [rax + 0xb4]
test ecx, ecx
je 0x491c1d
mov esi, dword [rax + 0xb0]
add rsi, rdi
mov r10d, dword [rsi]
test r10d, r10d
je 0x491c1d
mov r11d, dword [rsi + 4]
lea r8, [rsi + 8]
add r10, rdi
lea edx, [r11 - 8]
shr edx, 1
je 0x491c12
xor r9d, r9d
jmp 0x491bf0
cmp dx, 0xa
jne 0x491bdd
movzx ecx, cx
add qword [r10 + rcx], rbp
add r9d, 1
add r8, 2
lea edx, [r11 - 8]
shr edx, 1
cmp r9d, edx
jae 0x491c12
movzx edx, word [r8]
mov ecx, edx
shr dx, 0xc
and cx, 0xfff
cmp dx, 3
jne 0x491bd0
movzx ecx, cx
add dword [r10 + rcx], ebp
mov r11d, dword [rsi + 4]
jmp 0x491bdd
add rsi, r11
mov r10d, dword [rsi]
test r10d, r10d
jne 0x491bb4
mov edx, dword [rax + 0x94]
test edx, edx
je 0x491d40
mov ebp, dword [rax + 0x90]
mov r13, qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add rbp, rdi
nop dword [rax + rax]
mov edx, 0x14
mov rcx, rbp
call r13
test eax, eax
jne 0x491d40
mov ecx, dword [rbp + 0xc]
test ecx, ecx
je 0x491d40
add rcx, rdi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x20]
test rax, rax
mov rsi, rax
je 0x491ec0
mov eax, dword [rbx + 0x18]
mov rcx, qword [rbx + 0x10]
lea edx, [rax + 1]
movsxd rdx, edx
shl rdx, 3
call sub.msvcrt.dll_realloc
test rax, rax
je 0x491ed0
movsxd rdx, dword [rbx + 0x18]
mov qword [rbx + 0x10], rax
mov r14d, dword [rbp]
mov r15d, dword [rbp + 0x10]
lea ecx, [rdx + 1]
mov dword [rbx + 0x18], ecx
mov qword [rax + rdx*8], rsi
mov rax, r14
add r15, rdi
add r14, rdi
test eax, eax
cmove r14, r15
mov rdx, qword [r14]
test rdx, rdx
jne 0x491cf6
jmp 0x491e70
lea rdx, [rdi + rdx + 2]
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
je 0x491d13
add r14, 8
mov rdx, qword [r14]
add r15, 8
test rdx, rdx
je 0x491e70
test rdx, rdx
mov rax, qword [rbx + 0x28]
mov r8, qword [rbx + 0x38]
jns 0x491cd0
movzx edx, dx
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
jne 0x491ce2
mov rcx, rsi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x30]
mov ecx, 0x7f
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, rbx
xor ebx, ebx
call fcn.00491930
jmp 0x491e57
movabs rdi, 0xffffffff00000000
mov r9, qword [rbx]
xor r14d, r14d
movzx eax, word [r9 + 0x14]
and rdi, qword [r9 + 0x30]
cmp word [r9 + 6], 0
lea rsi, [r9 + rax + 0x18]
je 0x491e30
lea r15, [0x0088b040]
mov rbp, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r13, qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x491da7
mov ecx, dword [rsi + 8]
lea r9, [rsp + 0x3c]
or rcx, rdi
call rbp
mov r9, qword [rbx]
movzx eax, word [r9 + 6]
add r14d, 1
add rsi, 0x28
cmp r14d, eax
jge 0x491e30
mov eax, dword [rsi + 0x24]
mov edx, dword [rsi + 0x10]
mov r8d, eax
mov ecx, eax
mov r10d, eax
shr r8d, 0x1d
shr ecx, 0x1e
and r8d, 1
and ecx, 1
shr r10d, 0x1f
test eax, 0x2000000
jne 0x491e10
movsxd r8, r8d
movsxd rcx, ecx
lea rcx, [rcx + r8*2]
lea rcx, [r10 + rcx*2]
mov r8d, dword [r15 + rcx*4]
mov ecx, r8d
or ch, 2
test eax, 0x4000000
cmovne r8d, ecx
test edx, edx
jne 0x491d81
test al, 0x40
je 0x491e01
mov edx, dword [r9 + 0x20]
test edx, edx
je 0x491d91
jmp 0x491d81
test al, 0x80
je 0x491d91
mov edx, dword [r9 + 0x24]
jmp 0x491dfb
mov ecx, dword [rsi + 8]
mov r8d, 0x4000
or rcx, rdi
call r13
mov r9, qword [rbx]
jmp 0x491d91
mov eax, dword [r9 + 0x28]
test eax, eax
je 0x491e57
add rax, r12
xor r8d, r8d
mov edx, 1
mov rcx, r12
call rax
test eax, eax
je 0x491f0b
mov dword [rbx + 0x1c], 1
mov rax, rbx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
add rbp, 0x14
jmp 0x491c40
mov ecx, 0xc1
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x491e57
xor ecx, ecx
mov edx, dword [rbp + 0x50]
mov r9d, 4
mov r8d, 0x3000
call r14
test rax, rax
mov r12, rax
jne 0x491a54
mov ecx, 0xe
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x491e57
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x491d28
mov rcx, rsi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x30]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x491d28
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, 0x8000
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x491e57
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x491d28