Function at 0x140091d50
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, 0x58
movaps xmmword [rsp + 0x40], xmm6
cmp word [rcx], 0x5a4d
mov rbp, rcx
movq xmm6, rdx
mov qword [rsp + 0xb0], r8
mov rsi, r9
jne 0x1400921c0
movsxd r13, dword [rcx + 0x3c]
add r13, rcx
cmp dword [r13], 0x4550
jne 0x1400921c0
mov edx, dword [r13 + 0x50]
mov r9d, 4
mov r8d, 0x3000
mov rcx, qword [r13 + 0x30]
mov r14, qword [sym.imp.KERNEL32.dll_VirtualAlloc]
call r14
test rax, rax
mov r12, rax
je 0x140092204
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 0x140092247
movhps xmm6, qword [rsp + 0xb0]
mov qword [rax + 0x30], rsi
mov r9d, 4
mov r8d, 0x1000
movups xmmword [rax + 0x20], xmm6
mov rcx, r12
mov edx, dword [r13 + 0x54]
mov qword [rax + 8], r12
mov qword [rax + 0x10], 0
mov qword [rax + 0x18], 0
mov rax, qword [rsp + 0xc0]
mov qword [rbx + 0x38], rax
call r14
mov r8d, dword [r13 + 0x54]
mov rdx, rbp
add r8d, dword [rbp + 0x3c]
mov rcx, rax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov rdi, qword [rbx + 8]
mov r10, rax
movsxd rax, dword [rbp + 0x3c]
add r10, rax
movzx eax, word [r10 + 0x14]
mov qword [rbx], r10
cmp word [r10 + 6], 0
mov qword [r10 + 0x30], r12
lea rsi, [r10 + rax + 0x18]
je 0x140091ef4
xor r15d, r15d
jmp 0x140091ebd
mov r8d, dword [r13 + 0x38]
test r8d, r8d
jle 0x140091ea8
mov ecx, dword [rsi + 0xc]
mov edx, r8d
mov r9d, 4
mov r8d, 0x1000
mov qword [rsp + 0x28], rdx
add rcx, rdi
call r14
mov r8, qword [rsp + 0x28]
xor edx, edx
mov rcx, rax
mov dword [rsi + 8], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov r10, qword [rbx]
add r15d, 1
add rsi, 0x28
movzx eax, word [r10 + 6]
cmp r15d, eax
jge 0x140091ef0
mov edx, dword [rsi + 0x10]
test edx, edx
je 0x140091e70
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, rbp
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov dword [rsi + 8], eax
jmp 0x140091ea8
mov rdi, qword [rbx + 8]
mov edx, dword [r10 + 0xb4]
test edx, edx
je 0x140091f8b
mov r9d, dword [r10 + 0xb0]
add r9, rdi
mov r8d, dword [r9]
test r8d, r8d
je 0x140091f8b
mov r11, r12
sub r11, qword [r13 + 0x30]
nop dword [rax]
mov esi, dword [r9 + 4]
add r8, rdi
lea eax, [rsi - 8]
shr eax, 1
je 0x140091f80
xor edx, edx
jmp 0x140091f52
cmp cx, 0xa
jne 0x140091f45
movzx eax, ax
add qword [r8 + rax], r11
add rdx, 1
lea eax, [rsi - 8]
shr eax, 1
cmp edx, eax
jae 0x140091f80
movzx eax, word [r9 + rdx*2 + 8]
mov ecx, eax
and ax, 0xfff
shr cx, 0xc
cmp cx, 3
jne 0x140091f38
movzx eax, ax
add rdx, 1
add dword [r8 + rax], r11d
mov esi, dword [r9 + 4]
lea eax, [rsi - 8]
shr eax, 1
cmp edx, eax
jb 0x140091f52
add r9, rsi
mov r8d, dword [r9]
test r8d, r8d
jne 0x140091f20
mov eax, dword [r10 + 0x94]
test eax, eax
je 0x1400920c0
mov ebp, dword [r10 + 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 0x1400920c0
mov ecx, dword [rbp + 0xc]
test ecx, ecx
je 0x1400920c0
add rcx, rdi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x20]
test rax, rax
mov rsi, rax
je 0x140092237
mov eax, dword [rbx + 0x18]
mov rcx, qword [rbx + 0x10]
lea edx, [rax + 1]
movsxd rdx, edx
shl rdx, 3
call sub.api_ms_win_crt_heap_l1_1_0.dll_realloc
test rax, rax
je 0x14009227a
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 0x140092067
jmp 0x140092190
lea rdx, [rdi + rdx + 2]
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
je 0x140092084
mov rdx, qword [r14 + 8]
add r14, 8
add r15, 8
test rdx, rdx
je 0x140092190
test rdx, rdx
mov rax, qword [rbx + 0x28]
mov r8, qword [rbx + 0x38]
jns 0x140092040
movzx edx, dx
mov rcx, rsi
call rax
test rax, rax
mov qword [r15], rax
jne 0x140092052
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.140091c90
nop
movaps xmm6, xmmword [rsp + 0x40]
mov rax, rbx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
movabs rdi, 0xffffffff00000000
mov r9, qword [rbx]
xor r15d, r15d
movzx eax, word [r9 + 0x14]
and rdi, qword [r9 + 0x30]
cmp word [r9 + 6], 0
lea rsi, [r9 + rax + 0x18]
je 0x1400921d8
mov r13, qword [sym.imp.KERNEL32.dll_VirtualProtect]
lea rbp, [0x140152500]
mov r14, qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x140092137
mov edx, dword [r9 + 0x20]
test edx, edx
je 0x140092121
mov ecx, dword [rsi + 8]
lea r9, [rsp + 0x3c]
or rcx, rdi
call r13
mov r9, qword [rbx]
movzx eax, word [r9 + 6]
add r15d, 1
add rsi, 0x28
cmp r15d, eax
jge 0x1400921d8
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 0x1400921a0
lea rcx, [rcx + r8*2]
lea rcx, [r10 + rcx*2]
mov r8d, dword [rbp + rcx*4]
mov ecx, r8d
or ch, 2
test eax, 0x4000000
cmovne r8d, ecx
test edx, edx
jne 0x140092110
test al, 0x40
jne 0x140092108
test al, 0x80
je 0x140092121
mov edx, dword [r9 + 0x24]
jmp 0x14009210c
add rbp, 0x14
jmp 0x140091fb0
mov ecx, dword [rsi + 8]
mov r8d, 0x4000
or rcx, rdi
call r14
mov r9, qword [rbx]
jmp 0x140092121
mov ecx, 0xc1
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400920a4
mov eax, dword [r9 + 0x28]
test eax, eax
je 0x1400920a4
add rax, r12
xor r8d, r8d
mov edx, 1
mov rcx, r12
call rax
test eax, eax
je 0x14009226a
mov dword [rbx + 0x1c], 1
jmp 0x1400920a4
xor ecx, ecx
mov edx, dword [r13 + 0x50]
mov r9d, 4
mov r8d, 0x3000
call r14
test rax, rax
mov r12, rax
jne 0x140091dc2
mov ecx, 0xe
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1400920a4
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140092099
mov ecx, 0xe
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, 0x8000
xor edx, edx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x1400920a4
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140092099
mov rcx, rsi
mov rdx, qword [rbx + 0x38]
call qword [rbx + 0x30]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x140092099