Function at 0x18002b6e0
Capabilities:
Enumerate pe sections

Disassembly:
push rsi
push rdi
sub rsp, 0x58
mov rax, qword [0x18005b0d0]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov r9d, dword [rcx + 0x110]
xor eax, eax
mov rdi, rdx
mov rsi, rcx
lea r8, str.RTMP_ReadPacket
lea rdx, str._s:_fd_d
lea ecx, [rax + 5]
mov byte [rsp + 0x20], 0
mov qword [rsp + 0x21], rax
mov qword [rsp + 0x29], rax
mov byte [rsp + 0x31], al
call fcn.180022fd0
lea rdx, [rsp + 0x20]
mov r8d, 1
mov rcx, rsi
call fcn.180026cd0
test eax, eax
jne 0x18002b762
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_read_RTMP_packet_header
lea ecx, [rax + 1]
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc5e
movzx ecx, byte [rsp + 0x20]
mov qword [rsp + 0x50], r12
lea r12, [rsp + 0x21]
movzx eax, cl
shr al, 6
mov byte [rdi], al
mov eax, ecx
and eax, 0x3f
mov dword [rdi + 4], eax
jne 0x18002b7cc
lea rdx, [rsp + 0x21]
mov r8d, 1
mov rcx, rsi
call fcn.180026cd0
cmp eax, 1
je 0x18002b7ba
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_read_RTMP_packet_header_2nd_byte
mov ecx, 1
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc59
movzx eax, byte [rsp + 0x21]
lea r12, [rsp + 0x22]
add eax, 0x40
mov dword [rdi + 4], eax
jmp 0x18002b832
cmp eax, 1
jne 0x18002b832
lea r8d, [rax + 1]
lea rdx, [rsp + 0x21]
mov rcx, rsi
call fcn.180026cd0
lea r8, str.RTMP_ReadPacket
cmp eax, 2
je 0x18002b806
lea rdx, str._s__failed_to_read_RTMP_packet_header_3nd_byte
mov ecx, 1
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc59
movzx ecx, byte [rsp + 0x22]
movzx eax, byte [rsp + 0x21]
lea rdx, str._s__m_nChannel:__0x
shl ecx, 8
lea r9d, [rcx + rax + 0x40]
mov ecx, 4
mov dword [rdi + 4], r9d
call fcn.180022fd0
lea r12, [rsp + 0x23]
movzx eax, byte [rdi]
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x88], rbp
lea rcx, [0x180044b68]
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r14
mov ebp, dword [rcx + rax*4]
mov eax, dword [rdi + 4]
cmp eax, dword [rsi + 0x48]
jl 0x18002b906
mov rcx, qword [rsi + 0x60]
lea r14d, [rax + 0xa]
movsxd rbx, r14d
lea rdx, [rbx*4]
call qword [sym.imp.MSVCR100.dll_realloc]
mov rcx, qword [rsi + 0x50]
lea rdx, [rbx*8]
mov r13, rax
call qword [sym.imp.MSVCR100.dll_realloc]
mov rbx, rax
test r13, r13
jne 0x18002b8a5
mov rcx, qword [rsi + 0x60]
call qword [sym.imp.MSVCR100.dll_free]
test rbx, rbx
jne 0x18002b8b4
mov rcx, qword [rsi + 0x50]
call qword [sym.imp.MSVCR100.dll_free]
mov qword [rsi + 0x60], r13
mov qword [rsi + 0x50], rbx
test r13, r13
je 0x18002b911
test rbx, rbx
je 0x18002b911
movsxd rcx, dword [rsi + 0x48]
mov eax, r14d
xor edx, edx
sub eax, ecx
lea rcx, [r13 + rcx*4]
movsxd r8, eax
shl r8, 2
call sub.MSVCR100.dll_memset
movsxd r11, dword [rsi + 0x48]
mov eax, r14d
sub eax, r11d
xor edx, edx
movsxd r8, eax
mov rax, qword [rsi + 0x50]
lea rcx, [rax + r11*8]
shl r8, 3
call sub.MSVCR100.dll_memset
mov dword [rsi + 0x48], r14d
cmp ebp, 0xc
jne 0x18002b91f
mov byte [rdi + 2], 1
jmp 0x18002b95a
xor r13d, r13d
xor eax, eax
mov dword [rsi + 0x48], r13d
jmp 0x18002bc3f
jge 0x18002b95a
movsxd rcx, dword [rdi + 4]
mov rax, qword [rsi + 0x50]
cmp qword [rax + rcx*8], 0
je 0x18002b95a
mov rcx, qword [rax + rcx*8]
mov rax, qword [rcx]
mov qword [rdi], rax
mov rax, qword [rcx + 8]
mov qword [rdi + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdi + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdi + 0x18], rax
mov rax, qword [rcx + 0x20]
mov qword [rdi + 0x20], rax
dec ebp
test ebp, ebp
jle 0x18002b997
mov r8d, ebp
mov rdx, r12
mov rcx, rsi
call fcn.180026cd0
cmp eax, ebp
je 0x18002b997
movzx r9d, byte [rsp + 0x20]
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_read_RTMP_packet_header._type:__x
mov ecx, 1
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc3f
lea rax, [rsp + 0x20]
mov ebx, r12d
xor r13d, r13d
sub ebx, eax
add ebx, ebp
cmp ebp, 3
jl 0x18002baa3
movzx eax, byte [r12 + 1]
movzx ecx, byte [r12]
shl ecx, 8
or ecx, eax
movzx eax, byte [r12 + 2]
shl ecx, 8
or ecx, eax
mov dword [rdi + 8], ecx
cmp ebp, 6
jl 0x18002ba3a
movzx ecx, byte [r12 + 3]
movzx eax, byte [r12 + 4]
mov dword [rdi + 0x14], r13d
shl ecx, 8
or ecx, eax
movzx eax, byte [r12 + 5]
shl ecx, 8
or ecx, eax
mov dword [rdi + 0x10], ecx
mov rcx, rdi
call fcn.1800253e0
cmp ebp, 6
jle 0x18002ba3a
movzx eax, byte [r12 + 6]
mov byte [rdi + 1], al
cmp ebp, 0xb
jne 0x18002ba3a
movzx eax, byte [r12 + 9]
movzx ecx, byte [r12 + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [r12 + 8]
shl ecx, 8
or ecx, eax
movzx eax, byte [r12 + 7]
shl ecx, 8
or ecx, eax
mov dword [rdi + 0xc], ecx
cmp dword [rdi + 8], 0xffffff
jne 0x18002baa3
movsxd rbp, ebp
mov r8d, 4
mov rcx, rsi
add rbp, r12
mov rdx, rbp
call fcn.180026cd0
cmp eax, 4
je 0x18002ba7e
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_read_extended_timestamp
mov ecx, 1
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc3f
movzx eax, byte [rbp + 1]
movzx ecx, byte [rbp]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [rbp + 3]
shl ecx, 8
or ecx, eax
add ebx, 4
mov dword [rdi + 8], ecx
lea rdx, [rsp + 0x20]
mov r8d, ebx
mov ecx, 5
call fcn.180023000
mov edx, dword [rdi + 0x10]
test edx, edx
je 0x18002baf5
cmp qword [rdi + 0x20], r13
jne 0x18002baf5
mov rcx, rdi
call fcn.1800253a0
test eax, eax
jne 0x18002baeb
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_allocate_packet
lea ecx, [rax + 4]
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc3f
movzx eax, byte [rsp + 0x20]
shr al, 6
mov byte [rdi], al
mov eax, dword [rdi + 0x10]
mov ebp, dword [rsi]
sub eax, dword [rdi + 0x14]
cmp eax, ebp
cmovl ebp, eax
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x18002bb39
mov dword [rax], ebx
mov rcx, qword [rdi + 0x18]
lea rdx, [rsp + 0x20]
add rcx, 0x10
movsxd r8, ebx
call sub.MSVCR100.dll_memcpy
mov r11d, dword [rdi + 0x14]
mov rax, qword [rdi + 0x18]
add r11, qword [rdi + 0x20]
mov qword [rax + 8], r11
mov rax, qword [rdi + 0x18]
mov dword [rax + 4], ebp
mov edx, dword [rdi + 0x14]
mov r8d, ebp
mov rcx, rsi
add rdx, qword [rdi + 0x20]
call fcn.180026cd0
cmp eax, ebp
je 0x18002bb72
mov r9d, dword [rdi + 0x10]
lea r8, str.RTMP_ReadPacket
lea rdx, str._s__failed_to_read_RTMP_packet_body._len:__u
mov ecx, 1
call fcn.180022fd0
xor eax, eax
jmp 0x18002bc3f
mov edx, dword [rdi + 0x14]
mov r8d, ebp
mov ecx, 5
add rdx, qword [rdi + 0x20]
call fcn.180023000
add dword [rdi + 0x14], ebp
mov rbp, qword [rsi + 0x50]
movsxd rbx, dword [rdi + 4]
cmp qword [rbp + rbx*8], r13
jne 0x18002bba8
mov ecx, Ordinal_42
call qword [sym.imp.MSVCR100.dll_malloc]
mov qword [rbp + rbx*8], rax
mov rax, qword [rsi + 0x50]
movsxd rcx, dword [rdi + 4]
mov rdx, qword [rax + rcx*8]
mov rax, qword [rdi]
mov qword [rdx], rax
mov rax, qword [rdi + 8]
mov qword [rdx + 8], rax
mov rax, qword [rdi + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rdi + 0x18]
mov qword [rdx + 0x18], rax
mov rax, qword [rdi + 0x20]
mov qword [rdx + 0x20], rax
mov eax, dword [rdi + 0x10]
cmp dword [rdi + 0x14], eax
jne 0x18002bc36
cmp byte [rdi + 2], r13b
jne 0x18002bbf6
mov rax, qword [rsi + 0x60]
movsxd rcx, dword [rdi + 4]
mov ecx, dword [rax + rcx*4]
add dword [rdi + 8], ecx
mov rcx, qword [rsi + 0x60]
mov eax, dword [rdi + 8]
movsxd rdx, dword [rdi + 4]
mov dword [rcx + rdx*4], eax
mov rax, qword [rsi + 0x50]
movsxd rcx, dword [rdi + 4]
mov rcx, qword [rax + rcx*8]
mov qword [rcx + 0x20], r13
mov rax, qword [rsi + 0x50]
movsxd rcx, dword [rdi + 4]
mov rcx, qword [rax + rcx*8]
mov dword [rcx + 0x14], r13d
movsxd rcx, dword [rdi + 4]
mov rax, qword [rsi + 0x50]
mov rcx, qword [rax + rcx*8]
mov byte [rcx + 2], r13b
jmp 0x18002bc3a
mov qword [rdi + 0x20], r13
mov eax, 1
mov r13, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x88]
mov r14, qword [rsp + 0x40]
mov r12, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.18003c580
add rsp, 0x58
pop rdi
pop rsi
ret