Function at 0x140065c10
Capabilities:
Enumerate pe sections

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x48
mov r14, qword [rdx + 0x10]
mov esi, dword [rdx + 0x18]
mov rbx, rcx
mov rcx, qword [rdx]
movsxd r12, dword [rbx + 0x34]
xor ebp, ebp
movzx edx, byte [rcx + 5]
movzx eax, byte [rcx + 4]
movzx r13d, byte [rcx + 0x11]
movzx edi, byte [rcx + 0x1a]
mov r15d, edx
mov dword [rsp + 0x98], eax
mov eax, edx
and edx, 4
shl r13d, 8
mov dword [rsp + 0x20], edx
movzx edx, byte [rcx + 0xd]
and eax, 1
shl rdx, 8
mov dword [rsp + 0xa8], eax
movzx eax, byte [rcx + 0xc]
or rdx, rax
movzx eax, byte [rcx + 0xb]
and r15d, 2
shl rdx, 8
mov qword [rsp + 0x28], rcx
or rdx, rax
movzx eax, byte [rcx + 0xa]
shl rdx, 8
or rdx, rax
movzx eax, byte [rcx + 9]
shl rdx, 8
or rdx, rax
movzx eax, byte [rcx + 8]
shl rdx, 8
or rdx, rax
movzx eax, byte [rcx + 7]
shl rdx, 8
or rdx, rax
movzx eax, byte [rcx + 6]
shl rdx, 8
or rdx, rax
movzx eax, byte [rcx + 0x10]
or r13d, eax
movzx eax, byte [rcx + 0xf]
mov qword [rsp + 0x30], rdx
movzx edx, byte [rcx + 0x15]
shl r13d, 8
or r13d, eax
movzx eax, byte [rcx + 0xe]
shl edx, 8
shl r13d, 8
or r13d, eax
movzx eax, byte [rcx + 0x14]
or edx, eax
movzx eax, byte [rcx + 0x13]
shl edx, 8
or edx, eax
movzx eax, byte [rcx + 0x12]
shl edx, 8
or edx, eax
movsxd rax, dword [rbx + 0x10]
mov dword [rsp + 0xa0], edx
test eax, eax
je 0x140065d28
sub dword [rbx + 0xc], eax
je 0x140065d25
mov rcx, qword [rbx]
movsxd r8, dword [rbx + 0xc]
lea rdx, [rcx + rax]
call sub.msvcrt.dll_memmove
mov dword [rbx + 0x10], ebp
test r12d, r12d
je 0x140065d6e
mov eax, dword [rbx + 0x2c]
sub eax, r12d
je 0x140065d63
mov rcx, qword [rbx + 0x18]
movsxd r8, eax
lea rdx, [rcx + r12*4]
shl r8, 2
call sub.msvcrt.dll_memmove
mov eax, dword [rbx + 0x2c]
mov rcx, qword [rbx + 0x20]
sub eax, r12d
lea rdx, [rcx + r12*8]
movsxd r8, eax
shl r8, 3
call sub.msvcrt.dll_memmove
sub dword [rbx + 0x2c], r12d
sub dword [rbx + 0x30], r12d
mov dword [rbx + 0x34], ebp
cmp r13d, dword [rbx + 0x160]
je 0x140065d7f
or eax, 0xffffffff
jmp 0x140065f7b
cmp dword [rsp + 0x98], ebp
jg 0x140065d77
mov ecx, dword [rbx + 0x2c]
mov r8d, dword [rbx + 0x28]
lea edx, [rdi + 1]
add ecx, edx
cmp r8d, ecx
jg 0x140065dcb
mov rcx, qword [rbx + 0x18]
lea eax, [r8 + 0x20]
add eax, edx
movsxd rdx, eax
mov dword [rbx + 0x28], eax
shl rdx, 2
call sub.msvcrt.dll_realloc
movsxd rdx, dword [rbx + 0x28]
mov rcx, qword [rbx + 0x20]
shl rdx, 3
mov qword [rbx + 0x18], rax
call sub.msvcrt.dll_realloc
mov qword [rbx + 0x20], rax
mov r11d, dword [rbx + 0x164]
mov r13d, dword [rsp + 0xa0]
cmp r13d, r11d
je 0x140065e2e
movsxd r9, dword [rbx + 0x30]
mov r10d, dword [rbx + 0x2c]
cmp r9d, r10d
jge 0x140065e12
mov rcx, qword [rbx + 0x18]
mov edx, dword [rbx + 0xc]
sub r10d, r9d
lea r8, [rcx + r9*4]
mov ecx, r10d
nop dword [rax]
movzx eax, byte [r8]
lea r8, [r8 + 4]
sub edx, eax
mov dword [rbx + 0xc], edx
dec rcx
jne 0x140065e00
mov dword [rbx + 0x2c], r9d
cmp r11d, 0xffffffff
je 0x140065e2e
mov rax, qword [rbx + 0x18]
mov dword [rax + r9*4], 0x400
inc dword [rbx + 0x2c]
inc dword [rbx + 0x30]
movsxd rdi, edi
cmp dword [rsp + 0xa8], ebp
je 0x140065e82
movsxd rax, dword [rbx + 0x2c]
cmp eax, 1
jl 0x140065e54
mov rcx, rax
mov rax, qword [rbx + 0x18]
cmp dword [rax + rcx*4 - 4], 0x400
jne 0x140065e82
mov r12, qword [rsp + 0x28]
xor r15d, r15d
xor edx, edx
test rdi, rdi
jle 0x140065e87
movzx ecx, byte [r12 + rdx + 0x1b]
inc ebp
add r14, rcx
sub esi, ecx
cmp ecx, 0xff
jl 0x140065e87
inc rdx
cmp rdx, rdi
jl 0x140065e63
jmp 0x140065e87
mov r12, qword [rsp + 0x28]
test esi, esi
je 0x140065ec5
mov ecx, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
add ecx, esi
cmp edx, ecx
jg 0x140065eb0
mov rcx, qword [rbx]
lea eax, [rdx + 0x400]
add eax, esi
movsxd rdx, eax
mov dword [rbx + 8], eax
call sub.msvcrt.dll_realloc
mov qword [rbx], rax
movsxd rcx, dword [rbx + 0xc]
movsxd r8, esi
mov rdx, r14
add rcx, qword [rbx]
call sub.msvcrt.dll_memcpy
add dword [rbx + 0xc], esi
movsxd rdx, ebp
or r9d, 0xffffffff
cmp rdx, rdi
jge 0x140065f47
movsxd rcx, dword [rbx + 0x2c]
mov rax, qword [rbx + 0x18]
movzx r8d, byte [r12 + rdx + 0x1b]
mov dword [rax + rcx*4], r8d
movsxd rcx, dword [rbx + 0x2c]
mov rax, qword [rbx + 0x20]
mov qword [rax + rcx*8], 0xffffffffffffffff
test r15d, r15d
je 0x140065f0a
movsxd rcx, dword [rbx + 0x2c]
mov rax, qword [rbx + 0x18]
or dword [rax + rcx*4], 0x100
xor r15d, r15d
cmp r8d, 0xff
jge 0x140065f17
mov r9d, dword [rbx + 0x2c]
inc dword [rbx + 0x2c]
mov eax, dword [rbx + 0x2c]
inc rdx
cmp r8d, 0xff
jge 0x140065f2c
mov dword [rbx + 0x30], eax
cmp rdx, rdi
jl 0x140065ed1
cmp r9d, 0xffffffff
je 0x140065f47
mov rax, qword [rbx + 0x20]
mov rdx, qword [rsp + 0x30]
movsxd rcx, r9d
mov qword [rax + rcx*8], rdx
cmp dword [rsp + 0x20], 0
je 0x140065f6f
movsxd rax, dword [rbx + 0x2c]
mov dword [rbx + 0x158], 1
test eax, eax
jle 0x140065f6f
mov rcx, rax
mov rax, qword [rbx + 0x18]
or dword [rax + rcx*4 - 4], 0x200
lea eax, [r13 + 1]
mov dword [rbx + 0x164], eax
xor eax, eax
add rsp, 0x48
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret