Function at 0x299ed6770
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xb8
mov rbx, r8
mov rsi, rdx
mov rbp, rcx
xor edx, edx
mov r8d, 0x6c4
mov rcx, rbx
call sub.msvcrt.dll_memset
xor edx, edx
test rsi, rsi
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
mov word [rsp + 0x60], dx
jle 0x299ed67ea
lea rcx, [rsi + rbp]
mov rax, rbp
nop dword [rax + rax]
movzx edx, byte [rax]
add rax, 1
add word [rsp + rdx*2 + 0x40], 1
cmp rcx, rax
jne 0x299ed67d8
movzx edx, word [rsp + 0x42]
xor eax, eax
mov word [rsp + 0x40], ax
cmp dx, 2
ja 0x299ed6cf0
movzx r8d, word [rsp + 0x44]
cmp r8w, 4
ja 0x299ed6cf0
movzx r9d, word [rsp + 0x46]
cmp r9w, 8
ja 0x299ed6cf0
movzx r10d, word [rsp + 0x48]
cmp r10w, 0x10
ja 0x299ed6cf0
movzx r11d, word [rsp + 0x4a]
cmp r11w, 0x20
ja 0x299ed6cf0
movzx r12d, word [rsp + 0x4c]
cmp r12w, 0x40
ja 0x299ed6cf0
movzx r13d, word [rsp + 0x4e]
cmp r13w, 0x80
ja 0x299ed6cf0
movzx r14d, word [rsp + 0x50]
cmp r14w, 0x100
ja 0x299ed6cf0
movzx r15d, word [rsp + 0x52]
cmp r15w, 0x200
ja 0x299ed6cf0
movzx eax, word [rsp + 0x54]
cmp ax, 0x400
mov word [rsp + 0x32], ax
ja 0x299ed6cf0
movzx eax, word [rsp + 0x56]
cmp ax, 0x800
mov word [rsp + 0x34], ax
ja 0x299ed6cf0
movzx eax, word [rsp + 0x58]
cmp ax, 0x1000
mov word [rsp + 0x38], ax
ja 0x299ed6cf0
movzx eax, word [rsp + 0x5a]
cmp ax, 0x2000
mov word [rsp + 0x3a], ax
ja 0x299ed6cf0
movzx eax, word [rsp + 0x5c]
cmp ax, 0x4000
mov word [rsp + 0x3c], ax
ja 0x299ed6cf0
movzx eax, word [rsp + 0x5e]
cmp ax, 0x8000
mov word [rsp + 0x3e], ax
ja 0x299ed6cf0
lea rdi, [rsp + 0x70]
xor eax, eax
mov ecx, 8
mov word [rbx + 0x24], dx
rep stosq qword [rdi], rax
movzx ecx, dx
mov eax, ecx
add ecx, ecx
shl eax, 0xf
mov dword [rsp + 0x78], ecx
mov dword [rbx + 0x44], eax
lea eax, [rdx + rdx]
mov word [rbx + 4], ax
movzx eax, r8w
add eax, ecx
test r8w, r8w
je 0x299ed6946
lea ecx, [rax - 1]
cmp ecx, 3
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r8d
shl ecx, 0xe
mov dword [rsp + 0x7c], eax
mov dword [rbx + 0x48], ecx
movzx ecx, r9w
mov word [rbx + 6], ax
add eax, ecx
test r9w, r9w
mov word [rbx + 0x26], dx
je 0x299ed6977
lea ecx, [rax - 1]
cmp ecx, 7
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r9d
shl ecx, 0xd
mov dword [rsp + 0x80], eax
mov dword [rbx + 0x4c], ecx
movzx ecx, r10w
mov word [rbx + 8], ax
add eax, ecx
test r10w, r10w
mov word [rbx + 0x28], dx
je 0x299ed69ab
lea ecx, [rax - 1]
cmp ecx, 0xf
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r10d
shl ecx, 0xc
mov dword [rsp + 0x84], eax
mov dword [rbx + 0x50], ecx
movzx ecx, r11w
mov word [rbx + 0xa], ax
add eax, ecx
test r11w, r11w
mov word [rbx + 0x2a], dx
je 0x299ed69df
lea ecx, [rax - 1]
cmp ecx, 0x1f
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r11d
shl ecx, 0xb
mov dword [rsp + 0x88], eax
mov dword [rbx + 0x54], ecx
movzx ecx, r12w
mov word [rbx + 0xc], ax
add eax, ecx
test r12w, r12w
mov word [rbx + 0x2c], dx
je 0x299ed6a13
lea ecx, [rax - 1]
cmp ecx, 0x3f
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r12d
shl ecx, 0xa
mov dword [rsp + 0x8c], eax
mov dword [rbx + 0x58], ecx
movzx ecx, r13w
add ecx, eax
test r13w, r13w
mov word [rbx + 0xe], ax
mov word [rbx + 0x2e], dx
je 0x299ed6a47
lea eax, [rcx - 1]
cmp eax, 0x7f
ja 0x299ed6d68
mov eax, ecx
add ecx, ecx
add edx, r13d
shl eax, 9
mov dword [rsp + 0x90], ecx
mov dword [rbx + 0x5c], eax
movzx eax, r14w
add eax, ecx
test r14w, r14w
mov word [rbx + 0x10], cx
mov word [rbx + 0x30], dx
je 0x299ed6a7e
lea ecx, [rax - 1]
cmp ecx, 0xff
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r14d
shl ecx, 8
mov dword [rsp + 0x94], eax
mov dword [rbx + 0x60], ecx
movzx ecx, r15w
mov word [rbx + 0x12], ax
add eax, ecx
test r15w, r15w
mov word [rbx + 0x32], dx
je 0x299ed6ab5
lea ecx, [rax - 1]
cmp ecx, 0x1ff
ja 0x299ed6d68
mov ecx, eax
add eax, eax
add edx, r15d
shl ecx, 7
mov dword [rsp + 0x98], eax
mov dword [rbx + 0x64], ecx
movzx ecx, word [rsp + 0x32]
mov word [rbx + 0x14], ax
mov word [rbx + 0x34], dx
add eax, ecx
test cx, cx
je 0x299ed6aec
lea ecx, [rax - 1]
cmp ecx, 0x3ff
ja 0x299ed6d68
mov ecx, eax
add dx, word [rsp + 0x32]
add eax, eax
shl ecx, 6
mov dword [rsp + 0x9c], eax
mov dword [rbx + 0x68], ecx
movzx ecx, word [rsp + 0x34]
mov word [rbx + 0x16], ax
mov word [rbx + 0x36], dx
add eax, ecx
test cx, cx
je 0x299ed6b25
lea ecx, [rax - 1]
cmp ecx, 0x7ff
ja 0x299ed6d68
mov ecx, eax
add dx, word [rsp + 0x34]
add eax, eax
shl ecx, 5
mov dword [rsp + 0xa0], eax
mov dword [rbx + 0x6c], ecx
movzx ecx, word [rsp + 0x38]
mov word [rbx + 0x18], ax
mov word [rbx + 0x38], dx
add eax, ecx
test cx, cx
je 0x299ed6b5e
lea ecx, [rax - 1]
cmp ecx, 0xfff
ja 0x299ed6d68
mov ecx, eax
add dx, word [rsp + 0x38]
add eax, eax
shl ecx, 4
mov dword [rsp + 0xa4], eax
mov dword [rbx + 0x70], ecx
movzx ecx, word [rsp + 0x3a]
mov word [rbx + 0x1a], ax
mov word [rbx + 0x3a], dx
add eax, ecx
test cx, cx
je 0x299ed6b97
lea ecx, [rax - 1]
cmp ecx, 0x1fff
ja 0x299ed6d68
lea ecx, [rax*8]
add dx, word [rsp + 0x3a]
add eax, eax
mov dword [rbx + 0x74], ecx
movzx ecx, word [rsp + 0x3c]
mov dword [rsp + 0xa8], eax
mov word [rbx + 0x1c], ax
mov word [rbx + 0x3c], dx
add eax, ecx
test cx, cx
je 0x299ed6bd2
lea ecx, [rax - 1]
cmp ecx, 0x3fff
ja 0x299ed6d68
add dx, word [rsp + 0x3c]
lea ecx, [rax*4]
add eax, eax
mov dword [rsp + 0xac], eax
mov word [rbx + 0x1e], ax
mov dword [rbx + 0x78], ecx
mov word [rbx + 0x3e], dx
movzx edx, word [rsp + 0x3e]
add eax, edx
test dx, dx
je 0x299ed6c0d
lea edx, [rax - 1]
cmp edx, 0x7fff
ja 0x299ed6d68
mov dword [rbx + 0x80], 0x10000
add eax, eax
test rsi, rsi
mov dword [rbx + 0x7c], eax
jle 0x299ed6d4f
xor r14d, r14d
mov rdi, rsi
jmp 0x299ed6c46
add r13d, 1
mov dword [rsp + r15*4 + 0x70], r13d
add r14, 1
cmp rdi, r14
je 0x299ed6d4f
movzx r12d, byte [rbp + r14]
test r12b, r12b
je 0x299ed6c39
movzx r15d, r12b
movzx eax, word [rbx + r15*2 + 0x20]
mov r13d, dword [rsp + r15*4 + 0x70]
movzx ecx, word [rbx + r15*2]
add eax, r13d
sub eax, ecx
cmp r12b, 9
mov word [rbx + rax*2 + 0x84], r14w
ja 0x299ed6c30
mov r8d, r12d
movzx ecx, r13w
movzx esi, r12b
shl r8d, 9
or r8d, r14d
mov dword [rsp + 0x34], r8d
call fcn.299e94ab0
mov rcx, qword [0x299f4c780]
mov word [rsp + 0x32], ax
call sub.libgcc_s_seh_1.dll___emutls_get_address
cmp byte [rax], 0
jne 0x299ed6d4f
movzx eax, word [rsp + 0x32]
mov ecx, 0x10
sub ecx, esi
mov r8d, dword [rsp + 0x34]
mov esi, 1
sar eax, cl
mov ecx, r12d
shl esi, cl
mov r9d, esi
nop
movzx ecx, ax
add eax, r9d
mov word [rbx + rcx*2 + 0x2c4], r8w
cmp ax, 0x1ff
jbe 0x299ed6cd0
jmp 0x299ed6c30
mov edx, 8
mov ecx, 0x40
call fcn.299e89bd0
lea rdx, [0x299f31b00]
lea r9, str.inflate.nim
mov rcx, rax
mov rax, qword [0x299f4c590]
mov qword [rcx + 0x10], rdx
lea r8, str.initHuffman
mov qword [rcx + 0x18], 0x24
mov qword [rcx + 8], 0
mov qword [rcx], rax
lea rax, [0x299f31be0]
mov qword [rcx + 0x20], rax
mov qword [rsp + 0x20], 0x22
call fcn.299e8b270
nop
add rsp, 0xb8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov edx, 8
mov ecx, 0x40
call fcn.299e89bd0
lea rdx, [0x299f31b00]
lea r9, str.inflate.nim
mov rcx, rax
mov rax, qword [0x299f4c590]
mov qword [rcx + 0x10], rdx
lea r8, str.initHuffman
mov qword [rcx + 0x18], 0x24
mov qword [rcx + 8], 0
mov qword [rcx], rax
lea rax, [0x299f31be0]
mov qword [rcx + 0x20], rax
mov qword [rsp + 0x20], 0x2e
call fcn.299e8b270
jmp 0x299ed6d4f