Function at 0x47f6e0
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 0x47fb70
movsxd rbp, dword [rcx + 0x3c]
add rbp, rcx
cmp dword [rbp], 0x4550
jne 0x47fb70
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 0x47fb80
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 0x47fbda
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 0x47f879
xor r15d, r15d
jmp 0x47f842
mov r8d, dword [rbp + 0x38]
test r8d, r8d
jle 0x47f82e
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 0x47f875
mov edx, dword [rsi + 0x10]
test edx, edx
je 0x47f7f0
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 0x47f82e
mov rdi, qword [rbx + 8]
mov rsi, r12
sub rsi, qword [rbp + 0x30]
mov rbp, rsi
je 0x47f90d
mov ecx, dword [rax + 0xb4]
test ecx, ecx
je 0x47f90d
mov esi, dword [rax + 0xb0]
add rsi, rdi
mov r10d, dword [rsi]
test r10d, r10d
je 0x47f90d
mov r11d, dword [rsi + 4]
lea r8, [rsi + 8]
add r10, rdi
lea edx, [r11 - 8]
shr edx, 1
je 0x47f902
xor r9d, r9d
jmp 0x47f8e0
cmp dx, 0xa
jne 0x47f8cd
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 0x47f902
movzx edx, word [r8]
mov ecx, edx
shr dx, 0xc
and cx, 0xfff
cmp dx, 3
jne 0x47f8c0
movzx ecx, cx
add dword [r10 + rcx], ebp
mov r11d, dword [rsi + 4]
jmp 0x47f8cd
add rsi, r11
mov r10d, dword [rsi]
test r10d, r10d
jne 0x47f8a4
mov edx, dword [rax + 0x94]
test edx, edx
je 0x47fa30
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 0x47fa30
mov ecx, dword [rbp + 0xc]
test ecx, ecx
je 0x47fa30
add rcx, rdi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x20]
test rax, rax
mov rsi, rax
je 0x47fbb0
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 0x47fbc0
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 0x47f9e6
jmp 0x47fb60
lea rdx, [rdi + rdx + 2]
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
je 0x47fa03
add r14, 8
mov rdx, qword [r14]
add r15, 8
test rdx, rdx
je 0x47fb60
test rdx, rdx
mov rax, qword [rbx + 0x28]
mov r8, qword [rbx + 0x38]
jns 0x47f9c0
movzx edx, dx
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
jne 0x47f9d2
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.0047f620
jmp 0x47fb47
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 0x47fb20
lea r15, [0x0096e0a0]
mov rbp, qword [sym.imp.KERNEL32.dll_VirtualProtect]
mov r13, qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x47fa97
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 0x47fb20
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 0x47fb00
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 0x47fa71
test al, 0x40
je 0x47faf1
mov edx, dword [r9 + 0x20]
test edx, edx
je 0x47fa81
jmp 0x47fa71
test al, 0x80
je 0x47fa81
mov edx, dword [r9 + 0x24]
jmp 0x47faeb
mov ecx, dword [rsi + 8]
mov r8d, 0x4000
or rcx, rdi
call r13
mov r9, qword [rbx]
jmp 0x47fa81
mov eax, dword [r9 + 0x28]
test eax, eax
je 0x47fb47
add rax, r12
xor r8d, r8d
mov edx, 1
mov rcx, r12
call rax
test eax, eax
je 0x47fbfb
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 0x47f930
mov ecx, 0xc1
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x47fb47
xor ecx, ecx
mov edx, dword [rbp + 0x50]
mov r9d, 4
mov r8d, 0x3000
call r14
test rax, rax
mov r12, rax
jne 0x47f744
mov ecx, 0xe
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x47fb47
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x47fa18
mov rcx, rsi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x30]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x47fa18
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 0x47fb47
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x47fa18