Function at 0x540595
Capabilities:
Decompress data using quicklz

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [eax], 0
mov dword [ebp - 0xc], 0xffffffff
mov edx, dword [ebp - 8]
xor ecx, ecx
mov cx, word [edx + 0xe]
mov esi, dword [ecx*4 + 0x6ccb20]
test esi, esi
je 0x54074c
mov al, byte [esi + 0x12c]
cmp al, 0xf
jb 0x540734
cmp al, 0x10
jbe 0x5405e3
cmp al, 0x2e
jne 0x540734
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 0x1a]
mov eax, dword [ecx + 0x1a]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esi + 0x1e]
mov dword [ebp - 0x10], eax
mov eax, dword [ecx + 0x1e]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
add edx, eax
mov eax, dword [ebp - 0xc]
cmp edx, eax
jae 0x540734
mov edx, dword [ebp - 8]
xor eax, eax
xor edi, edi
mov ax, word [edx + 0xa]
mov ebx, dword [eax*4 + 0x6ccb20]
test ebx, ebx
je 0x5406e2
mov eax, dword [ebx + 0x2fb]
mov ecx, dword [ebx + 0x2f7]
push 0
push eax
push ecx
lea ecx, [ebp - 0x64]
call fcn.005b8b8b
mov ecx, dword [0x6cba64]
lea eax, [ebp - 0x64]
push eax
mov edx, dword [ecx]
call dword [edx + 0x200]
test eax, eax
je 0x5406c0
mov ecx, dword [ebx + 0x2fb]
mov edx, dword [ebx + 0x2f7]
push 0
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.005b8b8b
mov ecx, dword [ebp - 0x70]
mov edx, dword [esi + 0x1a]
mov eax, dword [esi + 0x22]
cmp ecx, edx
mov dword [ebp - 0x68], eax
jne 0x5406c0
mov edx, dword [ebp - 0x6c]
mov ecx, dword [esi + 0x1e]
cmp edx, ecx
jne 0x5406c0
mov ecx, eax
cmp eax, ecx
jne 0x5406c0
cmp byte [ebx + 0x307], 1
je 0x5406da
xor eax, eax
mov ax, word [ebx + 0x238]
mov ebx, dword [eax*4 + 0x6ccb20]
test ebx, ebx
jne 0x540651
jmp 0x5406df
mov edi, 1
mov ecx, dword [ebp + 8]
test edi, edi
jne 0x540734
mov eax, dword [ecx + 0x1a]
mov edx, dword [esi + 0x1a]
sub eax, edx
mov ebx, dword [esi + 0x1e]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x1e]
sub eax, ebx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp + 0xc]
add edx, ecx
mov dword [ebp - 0xc], edx
mov dword [eax], esi
xor ecx, ecx
mov cx, word [esi + 0x12a]
mov esi, dword [ecx*4 + 0x6ccb20]
test esi, esi
jne 0x5405c9
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x540ad3
mov ecx, dword [ebp - 8]
xor eax, eax
mov ax, word [ecx + 0xe]
mov edi, dword [eax*4 + 0x6ccb20]
test edi, edi
je 0x540abc
mov al, byte [edi + 0x12c]
cmp al, 0xf
jb 0x540aa4
cmp al, 0x10
jbe 0x54078a
cmp al, 0x2e
jne 0x540aa4
mov ecx, dword [ebp + 8]
mov edx, dword [edi + 0x1a]
lea esi, [edi + 0x1a]
mov eax, dword [ecx + 0x1a]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esi + 4]
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x1e]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x2c]
add eax, edx
mov edx, dword [ebp - 0xc]
cmp eax, edx
jae 0x540aa4
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [ebp - 0x10], 0
mov dx, word [eax + 0xa]
mov ebx, dword [edx*4 + 0x6ccb20]
test ebx, ebx
je 0x540871
mov ecx, dword [ebx + 0x2f7]
mov eax, dword [ebx + 0x2fb]
mov dword [ebp - 0x58], ecx
mov ecx, dword [0x6cba64]
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 0
mov edx, dword [ecx]
lea eax, [ebp - 0x58]
push eax
call dword [edx + 0x200]
test eax, eax
je 0x540851
mov eax, dword [ebx + 0x2f7]
mov ecx, dword [ebx + 0x2fb]
cmp eax, dword [esi]
mov edx, dword [edi + 0x22]
jne 0x540851
cmp ecx, dword [esi + 4]
jne 0x540851
cmp edx, dword [esi + 8]
jne 0x540851
cmp byte [ebx + 0x307], 2
je 0x540867
xor ecx, ecx
mov cx, word [ebx + 0x238]
mov ebx, dword [ecx*4 + 0x6ccb20]
test ebx, ebx
jne 0x5407fc
jmp 0x54086e
mov dword [ebp - 0x10], 1
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x540aa4
mov eax, dword [ecx + 0x1a]
mov edx, dword [esi]
sub eax, edx
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ecx + 0x1e]
sub eax, dword [esi + 4]
cdq
xor eax, edx
sub eax, edx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x14]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x10]
imul ebx
shrd eax, edx, 0xc
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x34]
mov ecx, esi
add eax, edx
mov dword [ebp - 0xc], eax
mov byte [ebp - 1], 0xff
mov edx, dword [ecx]
mov dword [ebp - 0x4c], edx
lea edx, [ebp - 1]
mov eax, dword [ecx + 4]
push edx
mov dword [ebp - 0x48], eax
push esi
mov ecx, dword [ecx + 8]
mov dword [ebp - 0x44], ecx
mov ecx, dword [0x6cba64]
mov eax, dword [ecx]
call dword [eax + 0x1d4]
mov ecx, eax
call fcn.004a2654
test eax, eax
je 0x54099d
mov ecx, dword [edi + 0x12d]
mov edx, dword [ebp + 8]
xor eax, eax
mov ebx, dword [ebp - 0x4c]
mov ax, word [ecx + 0xf8]
mov ecx, dword [edx + 0x370]
xor edx, edx
mov dx, word [ecx + 0x63a]
shr eax, 1
shr edx, 1
add eax, edx
lea eax, [eax + eax*4]
lea ecx, [eax + eax*4]
mov eax, 0x51eb851f
shl ecx, 2
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, byte [ebp - 1]
add eax, 2
mov esi, edx
cdq
xor eax, edx
sub eax, edx
and eax, 3
xor eax, edx
sub eax, edx
shl eax, 9
and eax, 0x7ff
add eax, 0x180
cdq
xor eax, edx
sub eax, edx
and eax, 0x7ff
xor eax, edx
sub eax, edx
mov word [ebp - 0x38], ax
mov eax, dword [ebp - 0x38]
and eax, 0x7ff
shl eax, 2
mov ecx, dword [eax + 0x7cd488]
mov eax, dword [eax + 0x7cdc88]
imul ecx, esi
sar ecx, 0x10
add ebx, ecx
imul eax, esi
mov dword [ebp - 0x4c], ebx
jmp 0x540a7e
mov esi, dword [esi]
mov eax, dword [edi + 0x1e]
sar esi, 0xc
sar eax, 0xc
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], eax
xor ebx, ebx
mov esi, 0x7c8350
jmp 0x5409ba
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x6cba64]
mov edx, dword [ecx]
mov ecx, dword [esi + 4]
add ecx, eax
mov eax, dword [ebp - 0x10]
push ecx
mov ecx, dword [esi]
add eax, ecx
mov ecx, dword [0x6cba64]
push eax
call dword [edx + 0x1d8]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x3c], 0
push ecx
push 0
mov ecx, eax
call fcn.004a1b35
test eax, eax
je 0x540a05
add esi, 8
inc ebx
cmp esi, 0x7c8370
jb 0x5409b7
jmp 0x540a8b
mov edx, dword [edi + 0x12d]
mov ecx, dword [ebp + 8]
xor eax, eax
and ebx, 3
mov ax, word [edx + 0xf8]
mov edx, dword [ecx + 0x370]
xor ecx, ecx
mov cx, word [edx + 0x63a]
shr eax, 1
shr ecx, 1
add eax, ecx
shl ebx, 9
lea eax, [eax + eax*4]
and ebx, 0x7ff
mov word [ebp - 0x40], bx
mov ebx, dword [ebp - 0x4c]
lea ecx, [eax + eax*4]
mov eax, 0x51eb851f
shl ecx, 2
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, dword [ebp - 0x40]
and eax, 0x7ff
shl eax, 2
mov ecx, dword [eax + 0x7cd488]
mov eax, dword [eax + 0x7cdc88]
imul ecx, edx
sar ecx, 0x10
add ebx, ecx
imul eax, edx
mov dword [ebp - 0x4c], ebx
mov ecx, dword [ebp - 0x48]
neg eax
sar eax, 0x10
add ecx, eax
mov dword [ebp - 0x48], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x4c]
mov dword [ecx], edi
mov ecx, dword [ebp - 0x48]
mov dword [edx], eax
mov eax, dword [ebp - 0x44]
mov dword [edx + 4], ecx
mov dword [edx + 8], eax
xor ecx, ecx
mov cx, word [edi + 0x12a]
mov edi, dword [ecx*4 + 0x6ccb20]
test edi, edi
jne 0x540770
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x540ae1
mov eax, dword [ebp + 8]
mov byte [eax + 0x307], 0
jmp 0x5405b1
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0xc