Function at 0x100156c0
Capabilities:
Packed with generic packer

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push ebx
push ebp
mov ebp, dword [eax]
mov eax, dword [eax + 4]
mov edx, dword [ecx + 0x20]
push esi
mov esi, dword [ecx + 0x30]
push edi
mov edi, dword [ecx + 0x34]
mov dword [esp + 0x10], eax
mov eax, dword [ecx + 0x1c]
cmp edi, esi
mov dword [esp + 0x18], ebp
jae 0x100156f5
sub esi, edi
dec esi
mov dword [esp + 0x14], esi
jmp 0x100156fe
mov ecx, dword [ecx + 0x2c]
sub ecx, edi
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx*4 + 0x1001df00]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx*4 + 0x1001df00]
mov dword [esp + 0x20], ecx
cmp eax, 0x14
jae 0x10015744
mov ecx, dword [esp + 0x10]
dec ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov cl, byte [ebp]
mov esi, ecx
mov ecx, eax
shl esi, cl
add eax, 8
or edx, esi
inc ebp
cmp eax, 0x14
jb 0x10015721
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x30]
and ecx, edx
xor ebx, ebx
mov bl, byte [esi + ecx*8]
lea esi, [esi + ecx*8]
test ebx, ebx
je 0x10015915
xor ecx, ecx
mov cl, byte [esi + 1]
shr edx, cl
sub eax, ecx
mov dword [esp + 0x28], ecx
test bl, 0x10
jne 0x100157a9
test bl, 0x40
jne 0x100159c4
mov ecx, dword [ebx*4 + 0x1001df00]
mov ebx, dword [esi + 4]
and ecx, edx
add ecx, ebx
xor ebx, ebx
mov bl, byte [esi + ecx*8]
lea esi, [esi + ecx*8]
test ebx, ebx
je 0x10015915
xor ecx, ecx
mov cl, byte [esi + 1]
shr edx, cl
sub eax, ecx
mov dword [esp + 0x28], ecx
test bl, 0x10
je 0x10015770
and ebx, 0xf
sub eax, ebx
mov ecx, dword [ebx*4 + 0x1001df00]
and ecx, edx
add ecx, dword [esi + 4]
mov dword [esp + 0x2c], ecx
mov ecx, ebx
shr edx, cl
cmp eax, 0xf
jae 0x100157ea
mov ecx, dword [esp + 0x10]
dec ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov cl, byte [ebp]
mov esi, ecx
mov ecx, eax
shl esi, cl
add eax, 8
or edx, esi
inc ebp
cmp eax, 0xf
jb 0x100157c7
mov dword [esp + 0x18], ebp
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x34]
and ecx, edx
xor ebx, ebx
mov bl, byte [esi + ecx*8]
lea esi, [esi + ecx*8]
xor ecx, ecx
mov cl, byte [esi + 1]
shr edx, cl
sub eax, ecx
mov dword [esp + 0x28], ecx
test bl, 0x10
jne 0x1001583f
test bl, 0x40
jne 0x10015943
mov ecx, dword [ebx*4 + 0x1001df00]
mov ebx, dword [esi + 4]
and ecx, edx
add ecx, ebx
xor ebx, ebx
mov bl, byte [esi + ecx*8]
lea esi, [esi + ecx*8]
xor ecx, ecx
mov cl, byte [esi + 1]
shr edx, cl
sub eax, ecx
mov dword [esp + 0x28], ecx
test bl, 0x10
je 0x1001580e
and ebx, 0xf
cmp eax, ebx
jae 0x1001586c
mov ecx, dword [esp + 0x10]
dec ecx
mov dword [esp + 0x10], ecx
xor ecx, ecx
mov cl, byte [ebp]
mov ebp, ecx
mov ecx, eax
shl ebp, cl
add eax, 8
or edx, ebp
mov ebp, dword [esp + 0x18]
inc ebp
cmp eax, ebx
mov dword [esp + 0x18], ebp
jb 0x10015846
mov ebp, dword [ebx*4 + 0x1001df00]
mov ecx, dword [esi + 4]
mov esi, dword [esp + 0x14]
and ebp, edx
add ebp, ecx
mov ecx, ebx
shr edx, cl
mov ecx, dword [esp + 0x2c]
sub eax, ebx
sub esi, ecx
mov dword [esp + 0x14], esi
mov esi, edi
sub esi, ebp
mov ebp, dword [esp + 0x38]
mov ebx, dword [ebp + 0x28]
cmp esi, ebx
jae 0x100158f6
mov ebp, dword [ebp + 0x2c]
mov dword [esp + 0x28], ebp
sub ebp, ebx
add esi, ebp
cmp esi, ebx
jb 0x100158a6
mov ebp, dword [esp + 0x28]
sub ebp, esi
cmp ecx, ebp
jbe 0x100158d7
sub ecx, ebp
mov bl, byte [esi]
mov byte [edi], bl
inc edi
inc esi
dec ebp
jne 0x100158b8
mov esi, dword [esp + 0x38]
mov esi, dword [esi + 0x28]
mov bl, byte [esi]
mov byte [edi], bl
inc edi
inc esi
dec ecx
jne 0x100158c8
mov ebp, dword [esp + 0x18]
jmp 0x1001592d
mov bl, byte [esi]
mov byte [edi], bl
mov bl, byte [esi + 1]
inc edi
inc esi
mov byte [edi], bl
inc edi
inc esi
sub ecx, 2
mov bl, byte [esi]
mov byte [edi], bl
inc edi
inc esi
dec ecx
jne 0x100158e7
mov ebp, dword [esp + 0x18]
jmp 0x1001592d
mov bl, byte [esi]
mov byte [edi], bl
mov bl, byte [esi + 1]
inc edi
inc esi
mov byte [edi], bl
inc edi
inc esi
sub ecx, 2
mov bl, byte [esi]
mov byte [edi], bl
inc edi
inc esi
dec ecx
jne 0x10015906
mov ebp, dword [esp + 0x18]
jmp 0x1001592d
xor ecx, ecx
mov cl, byte [esi + 1]
shr edx, cl
sub eax, ecx
mov cl, byte [esi + 4]
mov byte [edi], cl
mov ecx, dword [esp + 0x14]
inc edi
dec ecx
mov dword [esp + 0x14], ecx
cmp dword [esp + 0x14], 0x102
jb 0x10015971
cmp dword [esp + 0x10], 0xa
jb 0x10015971
jmp 0x1001571c
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov esi, dword [ecx + 4]
mov dword [ecx + 0x18], str.invalid_distance_code
sub esi, ebx
mov dword [esp + 0x2c], esi
mov esi, eax
mov ebx, dword [esp + 0x2c]
shr esi, 3
cmp esi, ebx
jb 0x10015a48
jmp 0x1002269d
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esi + 4]
sub ecx, ebx
mov ebx, eax
shr ebx, 3
cmp ebx, ecx
jae 0x10015989
mov ecx, ebx
mov ebx, dword [esp + 0x38]
sub ebp, ecx
mov dword [ebx + 0x20], edx
lea edx, [ecx*8]
sub eax, edx
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esi]
add ecx, eax
mov eax, dword [esi + 8]
mov dword [esi + 4], ecx
mov ecx, ebp
mov dword [esi], ebp
sub ecx, edx
add eax, ecx
mov dword [esi + 8], eax
mov dword [ebx + 0x34], edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
test bl, 0x20
je 0x10015a1f
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esi + 4]
sub ecx, ebx
mov ebx, eax
shr ebx, 3
cmp ebx, ecx
jae 0x100159e1
mov ecx, ebx
mov ebx, dword [esp + 0x38]
sub ebp, ecx
mov dword [ebx + 0x20], edx
lea edx, [ecx*8]
sub eax, edx
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esi]
add ecx, eax
mov eax, dword [esi + 8]
mov dword [esi + 4], ecx
mov ecx, ebp
mov dword [esi], ebp
sub ecx, edx
add eax, ecx
mov dword [esi + 8], eax
mov dword [ebx + 0x34], edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x10]
mov esi, dword [ecx + 4]
mov dword [ecx + 0x18], str.invalid_literal_length_code
sub esi, ebx
mov dword [esp + 0x2c], esi
mov esi, eax
mov ebx, dword [esp + 0x2c]
shr esi, 3
cmp esi, ebx
jb 0x10015a48
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x38]
sub ebp, esi
mov dword [ebx + 0x20], edx
lea edx, [esi*8]
sub eax, edx
mov edx, ebp
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x10]
add esi, eax
mov eax, dword [ecx + 8]
mov dword [ecx + 4], esi
mov esi, dword [ecx]
sub edx, esi
mov dword [ecx], ebp
add eax, edx
mov dword [ecx + 8], eax
mov dword [ebx + 0x34], edi
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0x14
ret