Function at 0x408170
Capabilities:
Decompress data using ucl

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
mov ebx, dword [ebx]
push edi
mov edi, ecx
mov dword [esp + 0x14], edx
xor ecx, ecx
xor eax, eax
xor esi, esi
xor edx, edx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x18], ebx
test ecx, ecx
jbe 0x4081a5
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x4081d9
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
test ebx, ebx
je 0x4081ff
cmp esi, dword [esp + 0x14]
jae 0x4084f9
cmp edx, dword [esp + 0x18]
jae 0x40853b
mov ebp, dword [esp + 0x28]
mov bl, byte [esi + edi]
mov byte [edx + ebp], bl
inc edx
inc esi
jmp 0x408197
mov ebp, 1
test ecx, ecx
jbe 0x408212
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x408246
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
lea ebp, [ebx + ebp*2]
mov ebx, dword [esp + 0x14]
cmp esi, ebx
jae 0x4084f9
cmp ebp, 0x1000002
ja 0x408565
test ecx, ecx
jbe 0x40826f
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x4082a3
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
test ebx, ebx
jne 0x4082f9
test ecx, ecx
jbe 0x4082bc
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
lea ebp, [ebx + ebp*2 - 2]
jmp 0x408204
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
lea ebp, [ebx + ebp*2 - 2]
jmp 0x408204
cmp ebp, 2
jne 0x408351
mov ebx, dword [esp + 0x1c]
test ecx, ecx
mov dword [esp + 0x10], ebx
jbe 0x408314
dec ecx
mov ebp, eax
shr ebp, cl
and ebp, 1
jmp 0x408387
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi]
add esi, 4
shl eax, 8
add eax, ebx
mov ebp, eax
mov ebx, eax
shr ebp, 0x1f
dec ecx
shr ebx, cl
and ebx, 1
jmp 0x4083c9
cmp esi, dword [esp + 0x14]
jae 0x4084f9
xor ebx, ebx
add ebp, 0xfffffd
mov bl, byte [esi + edi]
shl ebp, 8
add ebx, ebp
inc esi
cmp ebx, 0xffffffff
je 0x40850e
mov ebp, ebx
not ebp
shr ebx, 1
and ebp, 1
inc ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], ebx
test ecx, ecx
jbe 0x408395
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x4083c9
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
lea ebp, [ebx + ebp*2]
test ebp, ebp
jne 0x408481
mov ebp, 1
test ecx, ecx
jbe 0x4083e7
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x40841b
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
lea ebp, [ebx + ebp*2]
mov ebx, dword [esp + 0x14]
cmp esi, ebx
jae 0x4084f9
cmp ebp, dword [esp + 0x18]
jae 0x40853b
test ecx, ecx
jbe 0x408442
dec ecx
mov ebx, eax
shr ebx, cl
and ebx, 1
jmp 0x408476
xor eax, eax
xor ebx, ebx
mov al, byte [esi + edi + 3]
mov bl, byte [esi + edi + 2]
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi + 1]
add esi, 4
shl eax, 8
add eax, ebx
xor ebx, ebx
mov bl, byte [esi + edi - 4]
mov ecx, 0x1f
shl eax, 8
add eax, ebx
mov ebx, eax
shr ebx, 0x1f
test ebx, ebx
je 0x4083d9
add ebp, 2
mov ebx, 0x500
cmp ebx, dword [esp + 0x10]
sbb ebx, ebx
neg ebx
add ebp, ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x20], ebp
add ebp, edx
cmp ebp, ebx
ja 0x408550
mov ebx, dword [esp + 0x10]
cmp ebx, edx
ja 0x408565
mov ebp, edx
sub ebp, ebx
mov ebx, dword [esp + 0x28]
add ebp, ebx
inc edx
mov dword [esp + 0x10], ebp
mov bl, byte [ebp]
mov ebp, dword [esp + 0x28]
mov byte [edx + ebp - 1], bl
mov ebx, dword [esp + 0x10]
inc ebx
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x28]
inc edx
mov bl, byte [ebx]
mov byte [edx + ebp - 1], bl
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
inc ebp
dec ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebx
jne 0x4084d1
jmp 0x408197
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [eax], edx
mov eax, 0xffffff37
pop ebx
add esp, 0x14
ret 0xc
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
cmp esi, eax
mov dword [ecx], edx
jne 0x408528
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 0xc
sbb eax, eax
pop edi
and al, 0xfc
pop esi
pop ebp
add eax, 0xffffff37
pop ebx
add esp, 0x14
ret 0xc
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [ecx], edx
mov eax, 0xffffff36
pop ebx
add esp, 0x14
ret 0xc
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [eax], edx
mov eax, 0xffffff36
pop ebx
add esp, 0x14
ret 0xc
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [ecx], edx
mov eax, 0xffffff35
pop ebx
add esp, 0x14
ret 0xc