Function at 0x6a9db220
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x98
cmp rdx, 0x3f
mov r13, rcx
mov r14, rdx
mov qword [rsp + 0xf8], r9
mov r12, r8
jbe 0x6a9db674
cmp word [rcx], 0x5a4d
jne 0x6a9db650
movsxd rdi, dword [rcx + 0x3c]
lea rax, [rdi + 0x108]
cmp rdx, rax
jb 0x6a9db674
add rdi, rcx
cmp dword [rdi], 0x4550
jne 0x6a9db650
cmp word [rdi + 4], 0x8664
jne 0x6a9db650
mov r9d, dword [rdi + 0x38]
test r9b, 1
jne 0x6a9db650
movzx edx, word [rdi + 6]
movzx eax, word [rdi + 0x14]
test edx, edx
lea rax, [rdi + rax + 0x18]
je 0x6a9db970
sub edx, 1
xor ebx, ebx
lea rdx, [rdx + rdx*4]
lea r10, [rax + rdx*8 + 0x28]
nop dword [rax]
mov r8d, dword [rax + 0x10]
mov edx, dword [rax + 0xc]
test r8d, r8d
lea rcx, [rdx + r9]
lea edx, [r8 + rdx]
cmove rdx, rcx
cmp rbx, rdx
cmovb rbx, rdx
add rax, 0x28
cmp rax, r10
jne 0x6a9db2c0
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov edx, dword [rsp + 0x64]
mov esi, dword [rdi + 0x50]
lea rax, [rdx - 1]
neg rdx
add rsi, rax
add rbx, rax
and rsi, rdx
and rbx, rdx
cmp rsi, rbx
jne 0x6a9db650
mov rcx, qword [rdi + 0x30]
mov r9d, 4
mov r8d, 0x3000
mov rdx, rsi
mov rax, qword [rsp + 0x118]
mov qword [rsp + 0x20], rax
call r12
test rax, rax
mov rbx, rax
je 0x6a9db683
xor ebp, ebp
jmp 0x6a9db39d
mov ecx, 0x10
call sub.msvcrt.dll_malloc
test rax, rax
mov r15, rax
je 0x6a9db6c0
mov qword [rax], rbp
xor ecx, ecx
mov r9d, 4
mov rdx, rsi
mov qword [rax + 8], rbx
mov rax, qword [rsp + 0x118]
mov r8d, 0x3000
mov rbp, r15
mov qword [rsp + 0x20], rax
call r12
test rax, rax
mov rbx, rax
je 0x6a9db6da
lea rax, [rbx + rsi]
mov rdx, rbx
shr rdx, 0x20
shr rax, 0x20
cmp rdx, rax
jb 0x6a9db350
mov qword [rsp + 0x38], rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, 0x78
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r10, qword [rsp + 0x38]
test rax, rax
mov rsi, rax
je 0x6a9dba39
mov qword [rax + 8], rbx
movzx eax, word [rdi + 0x16]
mov edx, dword [rdi + 0x54]
mov qword [rsi + 0x28], r12
mov qword [rsi + 0x70], rbp
shr ax, 0xd
and eax, 1
cmp r14, rdx
mov dword [rsi + 0x20], eax
mov rax, qword [rsp + 0xf8]
mov qword [rsi + 0x30], rax
mov rax, qword [rsp + 0x100]
mov qword [rsi + 0x38], rax
mov rax, qword [rsp + 0x108]
mov qword [rsi + 0x40], rax
mov rax, qword [rsp + 0x110]
mov qword [rsi + 0x48], rax
mov rax, qword [rsp + 0x118]
mov qword [rsi + 0x58], rax
mov eax, dword [rsp + 0x64]
mov dword [rsi + 0x68], eax
jb 0x6a9db960
mov rax, qword [rsp + 0x118]
mov qword [rsp + 0x38], r10
mov r9d, 4
mov rcx, rbx
mov r8d, 0x1000
mov qword [rsp + 0x20], rax
call r12
mov r8d, dword [rdi + 0x54]
mov rdx, r13
mov rcx, rax
call sub.msvcrt.dll_memcpy
movsxd rdx, dword [r13 + 0x3c]
mov rbp, qword [rsi + 8]
mov r10, qword [rsp + 0x38]
add rdx, rax
movzx eax, word [rdx + 0x14]
mov qword [rsi], rdx
cmp word [rdx + 6], 0
mov qword [rdx + 0x30], rbx
lea r15, [rdx + rax + 0x18]
je 0x6a9db522
xor r12d, r12d
mov edx, dword [r15 + 0x10]
test edx, edx
jne 0x6a9db704
movsxd r10, dword [rdi + 0x38]
test r10d, r10d
jle 0x6a9db506
mov ecx, dword [r15 + 0xc]
mov r9d, 4
mov rdx, r10
mov r8d, 0x1000
mov rax, qword [rsi + 0x58]
mov qword [rsp + 0x38], r10
add rcx, rbp
mov qword [rsp + 0x20], rax
call qword [rsi + 0x28]
test rax, rax
je 0x6a9db640
mov ecx, dword [r15 + 0xc]
xor edx, edx
mov r10, qword [rsp + 0x38]
add rcx, rbp
mov dword [r15 + 8], ecx
mov r8, r10
call sub.msvcrt.dll_memset
mov rdx, qword [rsi]
add r12d, 1
add r15, 0x28
movzx eax, word [rdx + 6]
cmp r12d, eax
jl 0x6a9db4a7
mov r10, qword [rdx + 0x30]
mov rbp, qword [rsi + 8]
sub r10, qword [rdi + 0x30]
jne 0x6a9db75e
mov dword [rsi + 0x24], 1
mov ecx, dword [rdx + 0x94]
test ecx, ecx
je 0x6a9db80b
mov r12d, dword [rdx + 0x90]
mov r13, qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add r12, rbp
mov edx, 0x14
mov rcx, r12
call r13
test eax, eax
jne 0x6a9db808
mov ecx, dword [r12 + 0xc]
test ecx, ecx
je 0x6a9db808
add rcx, rbp
mov rdx, qword [rsi + 0x58]
call qword [rsi + 0x38]
test rax, rax
mov rdi, rax
je 0x6a9dba7b
mov eax, dword [rsi + 0x18]
mov rcx, qword [rsi + 0x10]
lea edx, [rax + 1]
movsxd rdx, edx
shl rdx, 3
call sub.msvcrt.dll_realloc
test rax, rax
je 0x6a9dba8b
movsxd rdx, dword [rsi + 0x18]
mov qword [rsi + 0x10], rax
mov r14d, dword [r12]
mov r15d, dword [r12 + 0x10]
lea ecx, [rdx + 1]
mov dword [rsi + 0x18], ecx
mov qword [rax + rdx*8], rdi
mov rax, r14
add r15, rbp
add r14, rbp
test eax, eax
cmove r14, r15
mov rdx, qword [r14]
test rdx, rdx
jne 0x6a9db606
jmp 0x6a9db7e3
lea rdx, [rbp + rdx + 2]
mov rcx, rdi
call rax
test rax, rax
mov qword [r15], rax
je 0x6a9db623
add r14, 8
mov rdx, qword [r14]
add r15, 8
test rdx, rdx
je 0x6a9db7e3
test rdx, rdx
mov rax, qword [rsi + 0x40]
mov r8, qword [rsi + 0x58]
jns 0x6a9db5e0
movzx edx, dx
mov rcx, rdi
call rax
test rax, rax
mov qword [r15], rax
jne 0x6a9db5f2
mov rcx, rdi
mov rdx, qword [rsi + 0x58]
call qword [rsi + 0x48]
mov ecx, 0x7f
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rcx, rsi
xor esi, esi
call fcn.6a9db140
jmp 0x6a9db65d
mov ecx, 0xc1
xor esi, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, rsi
add rsp, 0x98
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 0xd
xor esi, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db65d
mov rax, qword [rsp + 0x118]
xor ecx, ecx
mov r9d, 4
mov rdx, rsi
mov r8d, 0x3000
mov qword [rsp + 0x20], rax
call r12
test rax, rax
mov rbx, rax
jne 0x6a9db343
mov ecx, 0xe
xor esi, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db65d
mov r9, qword [rsp + 0x118]
mov r8d, 0x8000
xor edx, edx
mov rcx, rbx
call qword [rsp + 0xf8]
mov r8, qword [rsp + 0x118]
mov rcx, rbp
xor esi, esi
mov rdx, qword [rsp + 0xf8]
call fcn.6a9dac80
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db65d
mov eax, edx
add eax, dword [r15 + 0x14]
cmp r14, rax
jb 0x6a9db960
mov ecx, dword [r15 + 0xc]
mov r9d, 4
mov r8d, 0x1000
mov rax, qword [rsi + 0x58]
add rcx, rbp
mov qword [rsp + 0x20], rax
call qword [rsi + 0x28]
test rax, rax
je 0x6a9db640
mov r9d, dword [r15 + 0xc]
mov edx, dword [r15 + 0x14]
mov r8d, dword [r15 + 0x10]
add r9, rbp
add rdx, r13
mov rcx, r9
call sub.msvcrt.dll_memcpy
mov dword [r15 + 8], eax
jmp 0x6a9db506
mov r8d, dword [rdx + 0xb4]
xor eax, eax
test r8d, r8d
je 0x6a9db800
mov r11d, dword [rdx + 0xb0]
add r11, rbp
mov r9d, dword [r11]
test r9d, r9d
je 0x6a9db7fb
mov edi, dword [r11 + 4]
lea rcx, [r11 + 8]
add r9, rbp
lea eax, [rdi - 8]
shr eax, 1
je 0x6a9db7f0
xor r8d, r8d
jmp 0x6a9db7c0
cmp r12w, 0xa
jne 0x6a9db7ae
movzx eax, ax
add qword [r9 + rax], r10
add r8d, 1
add rcx, 2
lea eax, [rdi - 8]
shr eax, 1
cmp r8d, eax
jae 0x6a9db7f0
movzx eax, word [rcx]
mov r12d, eax
and ax, 0xfff
shr r12w, 0xc
cmp r12w, 3
jne 0x6a9db7a0
movzx eax, ax
add dword [r9 + rax], r10d
mov edi, dword [r11 + 4]
jmp 0x6a9db7ae
add r12, 0x14
jmp 0x6a9db552
add r11, rdi
mov r9d, dword [r11]
test r9d, r9d
jne 0x6a9db782
mov eax, 1
mov dword [rsi + 0x24], eax
jmp 0x6a9db533
mov rdx, qword [rsi]
movabs r12, 0xffffffff00000000
movzx eax, word [rdx + 0x14]
mov ebp, dword [rsi + 0x68]
and r12, qword [rdx + 0x30]
lea r14, [rdx + rax + 0x18]
mov ecx, dword [r14 + 8]
mov r9, rbp
mov eax, dword [r14 + 0x10]
neg r9
mov r8d, dword [r14 + 0x24]
or rcx, r12
and r9, rcx
test eax, eax
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], r9
jne 0x6a9db858
test r8b, 0x40
je 0x6a9dba1c
mov eax, dword [rdx + 0x20]
add r14, 0x28
cmp word [rdx + 6], 1
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x58], r8d
mov dword [rsp + 0x5c], 0
jbe 0x6a9db977
lea rax, [rsp + 0x40]
mov r15d, 1
mov qword [rsp + 0x38], rax
jmp 0x6a9db8e1
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
call fcn.6a9dacd0
test eax, eax
je 0x6a9db640
mov eax, dword [r14 + 0x24]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x58], eax
mov rdx, qword [rsi]
add r15d, 1
add r14, 0x28
movzx eax, word [rdx + 6]
cmp r15d, eax
jge 0x6a9db981
mov r9, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
mov ebp, dword [rsi + 0x68]
mov edi, dword [r14 + 8]
neg rbp
mov eax, dword [r14 + 0x10]
or rdi, r12
and rbp, rdi
test eax, eax
mov r13d, eax
jne 0x6a9db905
mov eax, dword [r14 + 0x24]
test al, 0x40
je 0x6a9db953
mov r13d, dword [rdx + 0x20]
cmp rbp, r9
je 0x6a9db91b
mov rax, qword [rsp + 0x50]
add rax, rcx
cmp rbp, rax
jae 0x6a9db890
mov edx, dword [r14 + 0x24]
mov r9d, dword [rsp + 0x58]
mov eax, edx
or eax, r9d
and edx, 0x2000000
je 0x6a9db93a
and r9d, 0x2000000
jne 0x6a9db93f
and eax, 0xfdffffff
sub rdi, rcx
mov dword [rsp + 0x58], eax
add rdi, r13
mov qword [rsp + 0x50], rdi
jmp 0x6a9db8bc
xor r13d, r13d
test al, 0x80
je 0x6a9db905
mov r13d, dword [rdx + 0x24]
jmp 0x6a9db905
mov ecx, 0xd
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db640
xor ebx, ebx
jmp 0x6a9db2e6
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov rdx, qword [rsp + 0x38]
mov rcx, rsi
mov dword [rsp + 0x5c], 1
call fcn.6a9dacd0
test eax, eax
je 0x6a9db640
mov rdx, qword [rsi]
mov eax, dword [rdx + 0xd0]
test eax, eax
je 0x6a9db9dd
mov rbp, qword [rsi + 8]
mov rdi, qword [rbp + rax + 0x18]
test rdi, rdi
je 0x6a9db9dd
mov rax, qword [rdi]
test rax, rax
je 0x6a9db9dd
add rdi, 8
xor r8d, r8d
mov edx, 1
mov rcx, rbp
call rax
mov rax, qword [rdi]
test rax, rax
jne 0x6a9db9c1
mov rdx, qword [rsi]
mov eax, dword [rdx + 0x28]
test eax, eax
je 0x6a9dba0f
mov edx, dword [rsi + 0x20]
add rax, rbx
test edx, edx
je 0x6a9dba30
xor r8d, r8d
mov edx, 1
mov rcx, rbx
call rax
test eax, eax
je 0x6a9dbaa5
mov dword [rsi + 0x1c], 1
jmp 0x6a9db65d
mov qword [rsi + 0x60], 0
jmp 0x6a9db65d
xor eax, eax
test r8b, 0x80
je 0x6a9db858
mov eax, dword [rdx + 0x24]
jmp 0x6a9db858
mov qword [rsi + 0x60], rax
jmp 0x6a9db65d
mov r9, qword [rsp + 0x118]
xor edx, edx
mov rcx, rbx
mov r8d, 0x8000
call qword [rsp + 0xf8]
mov r8, qword [rsp + 0x118]
mov rcx, rbp
mov rdx, qword [rsp + 0xf8]
call fcn.6a9dac80
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db65d
mov ecx, 0x7e
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db640
mov rcx, rdi
mov rdx, qword [rsi + 0x58]
call qword [rsi + 0x48]
mov ecx, 0xe
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db640
mov ecx, 0x45a
call qword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x6a9db640