Function at 0x1004524e
Capabilities:
Compress data via zlib inflate or deflate

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x18
push esi
xor esi, esi
push edi
cmp eax, esi
je 0x10045ee3
mov edi, dword [eax + 0x1c]
cmp edi, esi
je 0x10045ee3
mov dword [eax + 0x18], esi
mov dword [edi], 0xb
mov dword [edi + 4], esi
mov dword [edi + 0x2c], esi
mov ecx, dword [eax]
push ebx
push ebp
mov dword [esp + 0x10], ecx
cmp ecx, esi
je 0x1004521e
mov ebx, dword [eax + 4]
jmp 0x10045220
xor ebx, ebx
mov eax, dword [edi + 0x34]
mov ecx, dword [edi + 0x28]
mov dword [esp + 0x18], eax
mov eax, dword [edi]
sub eax, 0xb
xor ebp, ebp
mov dword [esp + 0x14], ecx
cmp eax, 0x10
ja case.0x10045247.12
mov edi, edi
movzx edx, byte [eax + 0x10045f0c]
jmp dword [edx*4 + 0x10045ef0]
cmp dword [edi + 4], 0
je 0x10045268
mov ecx, esi
and ecx, 7
shr ebp, cl
sub esi, ecx
mov dword [edi], 0x1a
jmp 0x10045e74
cmp esi, 3
jae 0x100452a8
lea ecx, [ecx]
test ebx, ebx
jne 0x1004528d
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, 3
jb 0x10045270
mov eax, ebp
and eax, 1
shr ebp, 1
mov dword [edi + 4], eax
mov eax, ebp
and eax, 3
dec esi
cmp eax, 3
ja case.default.0x100452bd
jmp dword [eax*4 + 0x10045f20]
shr ebp, 2
mov dword [edi], 0xd
sub esi, 2
jmp 0x10045e74
shr ebp, 2
mov dword [edi + 0x4c], 0x100d5118
mov dword [edi + 0x54], 9
mov dword [edi + 0x50], 0x100d4970
mov dword [edi + 0x58], 5
mov dword [edi], 0x12
sub esi, 2
jmp 0x10045e74
shr ebp, 2
mov dword [edi], 0xf
sub esi, 2
jmp 0x10045e74
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x18], str.invalid_block_type
mov dword [edi], 0x1b
shr ebp, 2
sub esi, 2
jmp 0x10045e74
mov ecx, esi
and ecx, 7
sub esi, ecx
shr ebp, cl
cmp esi, 0x20
jae 0x10045378
lea ecx, [ecx]
test ebx, ebx
jne 0x1004535d
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, 0x20
jb 0x10045340
mov ecx, ebp
mov eax, ebp
not ecx
and eax, 0xffff
shr ecx, 0x10
cmp eax, ecx
je 0x100453a0
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x18], str.invalid_stored_block_lengths
mov dword [edi], 0x1b
jmp 0x10045e74
xor ebp, ebp
xor esi, esi
mov dword [edi + 0x40], eax
test eax, eax
je 0x1004545d
nop
mov eax, dword [edi + 0x40]
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x100453d4
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
cmp dword [esp + 0x14], 0
jne 0x1004540d
mov eax, dword [edi + 0x28]
mov ecx, dword [esp + 0x34]
mov edx, dword [edi + 0x34]
mov dword [edi + 0x2c], eax
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
push eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
push edx
mov edx, dword [eax + 4]
call edx
test eax, eax
jne 0x10045ed5
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jbe 0x1004541b
mov eax, ebx
mov dword [esp + 0x1c], ebx
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jbe 0x10045427
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
push eax
push ecx
push edx
call fcn.10064ea0
mov eax, dword [esp + 0x28]
add dword [esp + 0x1c], eax
sub dword [esp + 0x20], eax
add dword [esp + 0x24], eax
sub dword [edi + 0x40], eax
add esp, 0xc
sub ebx, eax
cmp dword [edi + 0x40], 0
jne 0x100453b0
mov dword [edi], 0xb
jmp 0x10045e74
cmp esi, 0xe
jae 0x100454a8
lea ecx, [ecx]
test ebx, ebx
jne 0x1004548d
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, 0xe
jb 0x10045470
mov eax, ebp
shr ebp, 5
and eax, 0x1f
mov ecx, ebp
shr ebp, 5
add eax, 0x101
mov edx, ebp
mov dword [edi + 0x60], eax
and ecx, 0x1f
and edx, 0xf
mov eax, 1
add ecx, eax
add edx, 4
shr ebp, 4
sub esi, 0xe
cmp dword [edi + 0x60], 0x11e
mov dword [edi + 0x64], ecx
mov dword [edi + 0x5c], edx
ja 0x100459ae
cmp ecx, 0x1e
ja 0x100459ae
mov dword [edi + 0x68], 0
test edx, edx
jbe 0x10045568
lea esp, [esp]
cmp esi, 3
jae 0x1004553d
test ebx, ebx
jne 0x10045522
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, 3
jb 0x10045505
mov ecx, dword [edi + 0x68]
movzx edx, word [ecx*2 + 0x100d5918]
mov eax, ebp
and eax, 7
mov word [edi + edx*2 + 0x70], ax
mov eax, 1
add dword [edi + 0x68], eax
mov ecx, dword [edi + 0x68]
shr ebp, 3
sub esi, 3
cmp ecx, dword [edi + 0x5c]
jb 0x10045500
cmp dword [edi + 0x68], 0x13
jae 0x1004558b
mov edi, edi
mov edx, dword [edi + 0x68]
movzx ecx, word [edx*2 + 0x100d5918]
xor edx, edx
mov word [edi + ecx*2 + 0x70], dx
add dword [edi + 0x68], eax
cmp dword [edi + 0x68], 0x13
jb 0x10045570
lea eax, [edi + 0x530]
lea ecx, [edi + 0x6c]
mov dword [ecx], eax
mov dword [edi + 0x4c], eax
lea eax, [edi + 0x2f0]
push eax
push 0x13
lea eax, [edi + 0x70]
push eax
lea edx, [edi + 0x54]
push 0
mov dword [edx], 7
call fcn.10047500
add esp, 0x10
test eax, eax
je 0x100455d3
mov eax, dword [esp + 0x2c]
mov dword [eax + 0x18], str.invalid_code_lengths_set
mov dword [edi], 0x1b
jmp 0x10045e74
mov ecx, dword [edi + 0x64]
add ecx, dword [edi + 0x60]
mov dword [edi + 0x68], 0
je 0x1004586f
jmp 0x100455f0
mov ecx, dword [edi + 0x54]
mov eax, dword [edi + 0x4c]
mov edx, 1
shl edx, cl
dec edx
and edx, ebp
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx edx, cl
mov dword [esp + 0x1c], eax
cmp edx, esi
jbe 0x1004566b
test ebx, ebx
jne 0x10045630
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov dword [esp + 0x10], eax
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x54]
mov eax, 1
shl eax, cl
mov ecx, dword [edi + 0x4c]
add ebp, edx
add esi, 8
dec eax
and eax, ebp
mov eax, dword [ecx + eax*4]
mov dword [esp + 0x1c], eax
shr eax, 8
movzx edx, al
dec ebx
cmp edx, esi
ja 0x10045613
mov eax, dword [esp + 0x1c]
mov ecx, eax
shr ecx, 0x10
cmp ecx, 0x10
jae 0x100456dd
mov edx, eax
shr edx, 8
movzx ecx, dl
cmp esi, ecx
jae 0x100456c1
test ebx, ebx
jne 0x1004569e
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
inc eax
shl edx, cl
mov dword [esp + 0x10], eax
movzx eax, byte [esp + 0x1d]
add esi, 8
dec ebx
add ebp, edx
cmp esi, eax
jb 0x10045681
mov eax, dword [esp + 0x1c]
mov dx, word [esp + 0x1e]
movzx ecx, ah
shr ebp, cl
sub esi, ecx
mov ecx, dword [edi + 0x68]
mov word [edi + ecx*2 + 0x70], dx
inc dword [edi + 0x68]
jmp 0x10045860
mov cx, word [esp + 0x1e]
cmp cx, 0x10
jne 0x10045763
movzx ecx, ah
lea eax, [ecx + 2]
mov dword [esp + 0x1c], ecx
cmp esi, eax
jae 0x10045738
test ebx, ebx
jne 0x10045713
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov ecx, esi
shl edx, cl
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
add esi, 8
add eax, 2
dec ebx
add ebp, edx
cmp esi, eax
jb 0x100456f6
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x68]
shr ebp, cl
sub esi, ecx
test eax, eax
je 0x100458c2
movzx eax, word [edi + eax*2 + 0x6e]
mov dword [esp + 0x1c], eax
mov eax, ebp
and eax, 3
add eax, 3
shr ebp, 2
sub esi, 2
jmp 0x10045834
cmp cx, 0x11
movzx ecx, ah
mov dword [esp + 0x1c], ecx
jne 0x100457cd
lea eax, [ecx + 3]
cmp esi, eax
jae 0x100457b9
test ebx, ebx
jne 0x10045794
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov ecx, esi
shl edx, cl
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
add esi, 8
add eax, 3
dec ebx
add ebp, edx
cmp esi, eax
jb 0x10045777
mov ecx, dword [esp + 0x1c]
shr ebp, cl
mov edx, 0xfffffffd
mov eax, ebp
and eax, 7
add eax, 3
shr ebp, 3
jmp 0x10045828
lea eax, [ecx + 7]
cmp esi, eax
jae 0x10045816
test ebx, ebx
jne 0x100457f1
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov ecx, esi
shl edx, cl
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
add esi, 8
add eax, 7
dec ebx
add ebp, edx
cmp esi, eax
jb 0x100457d4
mov ecx, dword [esp + 0x1c]
shr ebp, cl
mov edx, 0xfffffff9
mov eax, ebp
and eax, 0x7f
add eax, 0xb
shr ebp, 7
sub edx, ecx
add esi, edx
mov dword [esp + 0x1c], 0
mov edx, dword [edi + 0x64]
mov ecx, dword [edi + 0x68]
add edx, dword [edi + 0x60]
add ecx, eax
cmp ecx, edx
ja 0x100458d8
test eax, eax
je 0x10045860
mov ecx, dword [esp + 0x1c]
nop
mov edx, dword [edi + 0x68]
dec eax
mov word [edi + edx*2 + 0x70], cx
inc dword [edi + 0x68]
test eax, eax
jne 0x10045850
mov eax, dword [edi + 0x64]
add eax, dword [edi + 0x60]
cmp dword [edi + 0x68], eax
jb 0x100455f0
cmp dword [edi], 0x1b
je 0x10045e74
lea eax, [edi + 0x530]
lea ecx, [edi + 0x6c]
mov dword [ecx], eax
mov dword [edi + 0x4c], eax
lea eax, [edi + 0x2f0]
push eax
mov eax, dword [edi + 0x60]
push eax
lea eax, [edi + 0x70]
push eax
lea edx, [edi + 0x54]
push 1
mov dword [edx], 9
call fcn.10047500
add esp, 0x10
test eax, eax
je 0x100458ee
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x18], str.invalid_literal_lengths_set
mov dword [edi], 0x1b
jmp 0x10045e74
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x18], str.invalid_bit_length_repeat
mov dword [edi], 0x1b
jmp 0x10045e74
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x18], str.invalid_bit_length_repeat
mov dword [edi], 0x1b
jmp 0x10045e74
mov edx, dword [edi + 0x6c]
lea eax, [edi + 0x2f0]
push eax
mov eax, dword [edi + 0x64]
push eax
mov eax, dword [edi + 0x60]
lea ecx, [edi + 0x6c]
lea eax, [edi + eax*2 + 0x70]
mov dword [edi + 0x50], edx
push eax
lea edx, [edi + 0x58]
push 2
mov dword [edx], 6
call fcn.10047500
add esp, 0x10
test eax, eax
je 0x10045937
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 0x18], str.invalid_distances_set
mov dword [edi], 0x1b
jmp 0x10045e74
mov dword [edi], 0x12
cmp ebx, 6
jb 0x100459c4
mov ecx, dword [esp + 0x14]
cmp ecx, 0x102
jb 0x100459c4
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
mov dword [eax + 0xc], edx
mov edx, dword [esp + 0x10]
mov dword [eax + 0x10], ecx
mov dword [eax], edx
mov dword [eax + 4], ebx
mov eax, dword [edi + 0x28]
mov dword [edi + 0x38], ebp
mov dword [edi + 0x3c], esi
cmp dword [edi + 0x2c], eax
jae 0x1004597e
mov edx, eax
sub edx, ecx
mov dword [edi + 0x2c], edx
mov esi, dword [esp + 0x2c]
push eax
push esi
call fcn.100479e0
mov edx, dword [esi]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov ebx, dword [esi + 4]
mov dword [esp + 0x18], edx
mov ebp, dword [edi + 0x38]
mov esi, dword [edi + 0x3c]
add esp, 8
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
jmp 0x10045e74
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x18], str.too_many_length_or_distance_symbols
mov dword [edi], 0x1b
jmp 0x10045e74
mov ecx, dword [edi + 0x54]
mov eax, 1
shl eax, cl
mov ecx, dword [edi + 0x4c]
dec eax
and eax, ebp
mov eax, dword [ecx + eax*4]
mov edx, eax
shr edx, 8
movzx ecx, dl
cmp ecx, esi
jbe 0x10045a35
test ebx, ebx
jne 0x10045a00
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov dword [esp + 0x10], eax
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x54]
mov eax, 1
shl eax, cl
mov ecx, dword [edi + 0x4c]
add ebp, edx
add esi, 8
dec eax
and eax, ebp
mov eax, dword [ecx + eax*4]
mov edx, eax
shr edx, 8
movzx ecx, dl
dec ebx
cmp ecx, esi
ja 0x100459e3
test al, al
je 0x10045b01
test al, 0xf0
jne 0x10045b01
mov ecx, eax
shr ecx, 8
movzx edx, cl
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
movzx ecx, al
add ecx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
shr eax, 0x10
dec edx
and edx, ebp
shr edx, cl
add edx, eax
mov eax, dword [edi + 0x4c]
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx edx, cl
movzx ecx, byte [esp + 0x24]
add edx, ecx
cmp edx, esi
jbe 0x10045af8
lea esp, [esp]
test ebx, ebx
jne 0x10045aad
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov ecx, esi
shl edx, cl
movzx ecx, al
add ebp, edx
movzx edx, ah
add ecx, edx
mov eax, 1
shl eax, cl
mov ecx, edx
add esi, 8
dec ebx
dec eax
and eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x1e]
add eax, ecx
mov ecx, dword [edi + 0x4c]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edx
cmp ecx, esi
ja 0x10045a90
movzx ecx, byte [esp + 0x1d]
shr ebp, cl
sub esi, ecx
mov edx, eax
shr edx, 8
movzx ecx, dl
shr ebp, cl
sub esi, ecx
mov ecx, eax
shr ecx, 0x10
mov dword [edi + 0x40], ecx
test al, al
jne 0x10045b6f
cmp dword [esp + 0x14], 0
jne 0x10045b52
mov eax, dword [edi + 0x28]
mov ecx, dword [esp + 0x34]
mov edx, dword [edi + 0x34]
mov dword [edi + 0x2c], eax
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
push eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
push edx
mov edx, dword [eax + 4]
call edx
test eax, eax
jne 0x10045ed5
mov eax, dword [esp + 0x18]
mov cl, byte [edi + 0x40]
mov byte [eax], cl
inc eax
dec dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov dword [edi], 0x12
jmp 0x10045e74
test al, 0x20
je 0x10045b7e
mov dword [edi], 0xb
jmp 0x10045e74
test al, 0x40
je 0x10045b98
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x18], str.invalid_literal_length_code
mov dword [edi], 0x1b
jmp 0x10045e74
movzx eax, al
and eax, 0xf
mov dword [edi + 0x48], eax
je 0x10045bf3
cmp esi, eax
jae 0x10045bdf
test ebx, ebx
jne 0x10045bc4
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, dword [edi + 0x48]
jb 0x10045ba7
mov ecx, dword [edi + 0x48]
mov eax, 1
shl eax, cl
dec eax
and eax, ebp
add dword [edi + 0x40], eax
shr ebp, cl
sub esi, ecx
mov ecx, dword [edi + 0x58]
mov eax, dword [edi + 0x50]
mov edx, 1
shl edx, cl
dec edx
and edx, ebp
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx edx, cl
cmp edx, esi
jbe 0x10045c64
test ebx, ebx
jne 0x10045c2f
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
call eax
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov dword [esp + 0x10], eax
mov ecx, esi
shl edx, cl
mov ecx, dword [edi + 0x58]
mov eax, 1
shl eax, cl
mov ecx, dword [edi + 0x50]
add ebp, edx
add esi, 8
dec eax
and eax, ebp
mov eax, dword [ecx + eax*4]
mov edx, eax
shr edx, 8
movzx ecx, dl
dec ebx
cmp ecx, esi
ja 0x10045c12
test al, 0xf0
jne 0x10045d24
mov ecx, eax
shr ecx, 8
movzx edx, cl
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
movzx ecx, al
add ecx, edx
mov edx, 1
shl edx, cl
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
shr eax, 0x10
dec edx
and edx, ebp
shr edx, cl
add edx, eax
mov eax, dword [edi + 0x50]
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx edx, cl
movzx ecx, byte [esp + 0x24]
add edx, ecx
cmp edx, esi
jbe 0x10045d1b
test ebx, ebx
jne 0x10045cd0
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov ecx, esi
shl edx, cl
movzx ecx, al
add ebp, edx
movzx edx, ah
add ecx, edx
mov eax, 1
shl eax, cl
mov ecx, edx
add esi, 8
dec ebx
dec eax
and eax, ebp
shr eax, cl
movzx ecx, word [esp + 0x1e]
add eax, ecx
mov ecx, dword [edi + 0x50]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edx
cmp ecx, esi
ja 0x10045cb3
movzx ecx, byte [esp + 0x1d]
shr ebp, cl
sub esi, ecx
mov edx, eax
shr edx, 8
movzx ecx, dl
shr ebp, cl
sub esi, ecx
test al, 0x40
je 0x10045d4a
mov eax, dword [esp + 0x2c]
mov dword [eax + 0x18], str.invalid_distance_code
mov dword [edi], 0x1b
jmp 0x10045e74
mov ecx, eax
movzx eax, al
shr ecx, 0x10
and eax, 0xf
mov dword [edi + 0x44], ecx
mov dword [edi + 0x48], eax
je 0x10045dad
cmp esi, eax
jae 0x10045d99
test ebx, ebx
jne 0x10045d7e
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov edx, dword [edx]
lea eax, [esp + 0x10]
push eax
call edx
mov ebx, eax
test ebx, ebx
je 0x10045e9e
mov eax, dword [esp + 0x10]
movzx edx, byte [eax]
mov ecx, esi
shl edx, cl
inc eax
add esi, 8
dec ebx
add ebp, edx
mov dword [esp + 0x10], eax
cmp esi, dword [edi + 0x48]
jb 0x10045d61
mov ecx, dword [edi + 0x48]
mov eax, 1
shl eax, cl
dec eax
and eax, ebp
add dword [edi + 0x44], eax
shr ebp, cl
sub esi, ecx
mov eax, dword [edi + 0x28]
cmp dword [edi + 0x2c], eax
sbb ecx, ecx
and ecx, dword [esp + 0x14]
sub eax, ecx
cmp dword [edi + 0x44], eax
jbe 0x10045dd6
mov edx, dword [esp + 0x2c]
mov dword [edx + 0x18], str.invalid_distance_too_far_back
mov dword [edi], 0x1b
jmp 0x10045e74
cmp dword [esp + 0x14], 0
jne 0x10045e0f
mov eax, dword [edi + 0x28]
mov ecx, dword [esp + 0x34]
mov edx, dword [edi + 0x34]
mov dword [edi + 0x2c], eax
mov ecx, dword [ecx]
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x34]
push eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], edx
push edx
mov edx, dword [eax + 4]
call edx
test eax, eax
jne 0x10045ed5
mov eax, dword [edi + 0x44]
mov edx, dword [edi + 0x28]
sub edx, eax
cmp edx, dword [esp + 0x14]
jae 0x10045e2c
mov eax, dword [esp + 0x18]
lea ecx, [edx + eax]
mov eax, dword [esp + 0x14]
sub eax, edx
jmp 0x10045e36
mov ecx, dword [esp + 0x18]
sub ecx, eax
mov eax, dword [esp + 0x14]
mov edx, dword [edi + 0x40]
mov dword [esp + 0x24], ecx
cmp eax, edx
jbe 0x10045e43
mov eax, edx
sub edx, eax
sub dword [esp + 0x14], eax
mov dword [edi + 0x40], edx
lea esp, [esp]
mov dl, byte [ecx]
mov ecx, dword [esp + 0x18]
mov byte [ecx], dl
inc ecx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x24]
inc ecx
sub eax, 1
mov dword [esp + 0x24], ecx
jne 0x10045e50
cmp dword [edi + 0x40], eax
jne 0x10045dd6
mov eax, dword [edi]
sub eax, 0xb
cmp eax, 0x10
jbe 0x10045240
mov esi, 0xfffffffe
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x10]
pop ebp
mov dword [eax + 4], ebx
pop ebx
mov dword [eax], edx
pop edi
mov eax, esi
pop esi
add esp, 0x18
ret
mov dword [esp + 0x10], 0
mov esi, 0xfffffffb
jmp 0x10045e87
mov eax, dword [edi + 0x28]
mov esi, 1
cmp dword [esp + 0x14], eax
jae 0x10045e87
sub eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
push eax
mov eax, dword [edi + 0x34]
push eax
push ecx
call fcn.10042070
add esp, 0xc
test eax, eax
je 0x10045e87
mov esi, 0xfffffffb
jmp 0x10045e87
mov esi, 0xfffffffd
jmp 0x10045e87
pop edi
mov eax, 0xfffffffe
pop esi
add esp, 0x18
ret