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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor eax, eax
cmp edi, eax
je case.default.0x40322b
mov esi, dword [edi + 0x1c]
cmp esi, eax
je case.default.0x40322b
cmp dword [edi + 0xc], eax
je case.default.0x40322b
cmp dword [edi], eax
jne 0x4031e2
cmp dword [edi + 4], eax
jne case.default.0x40322b
cmp dword [esi], 3
jne 0x4031ed
mov dword [esi], 4
mov eax, dword [edi + 0xc]
mov edx, dword [esi + 0x30]
mov ecx, dword [edi + 0x10]
and dword [ebp - 0x1c], 0
mov ebx, dword [esi + 0x34]
mov dword [ebp - 0x14], eax
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [edi + 4]
mov dword [ebp - 4], eax
mov dword [ebp - 0x28], eax
mov eax, dword [esi]
cmp eax, 0x13
mov dword [ebp + 8], edx
mov edx, ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], edx
jbe switch.0x0040322b
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebx
leave
ret
mov edx, dword [ebp - 0x18]
jmp dword [eax*4 + 0x403e2b]
cmp dword [esi + 8], 0
jne 0x403263
mov dword [esi], 4
jmp 0x403d0b
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 0x10
jb 0x403243
movzx eax, byte [ebp + 8]
mov ecx, dword [ebp + 8]
shl eax, 8
shr ecx, 8
add eax, ecx
push 0x1f
xor edx, edx
pop ecx
div ecx
test edx, edx
je 0x40328e
mov dword [edi + 0x18], str.incorrect_header_check
jmp 0x403d05
mov eax, dword [ebp + 8]
and al, 0xf
cmp al, 8
je 0x4032a3
mov dword [edi + 0x18], str.unknown_compression_method
jmp 0x403d05
shr dword [ebp + 8], 4
mov eax, dword [ebp + 8]
and eax, 0xf
add eax, 8
sub ebx, 4
cmp eax, dword [esi + 0x1c]
jbe 0x4032c4
mov dword [edi + 0x18], str.invalid_window_size
jmp 0x403d05
xor ebx, ebx
push ebx
push ebx
push ebx
call fcn.00401d77
mov dword [esi + 0x14], eax
mov dword [edi + 0x30], eax
mov eax, dword [ebp + 8]
shr eax, 8
not eax
and eax, 2
add esp, 0xc
or eax, 1
mov dword [esi], eax
mov dword [ebp + 8], ebx
jmp 0x403d0b
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 0x20
jb 0x4032ef
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 8]
shl ecx, 0x10
and eax, 0xff00
add eax, ecx
xor ecx, ecx
mov ch, byte [ebp + 0xa]
shl eax, 8
add eax, ecx
mov ecx, dword [ebp + 8]
shr ecx, 0x18
add eax, ecx
mov dword [esi + 0x14], eax
xor ebx, ebx
mov dword [edi + 0x30], eax
mov dword [ebp + 8], ebx
mov dword [esi], 2
cmp dword [esi + 0xc], 0
je 0x403d1b
xor eax, eax
push eax
push eax
push eax
call fcn.00401d77
mov dword [esi + 0x14], eax
mov dword [edi + 0x30], eax
add esp, 0xc
mov dword [esi], 3
cmp dword [ebp + 0xc], 5
je 0x403d5d
cmp dword [esi + 4], 0
je 0x4033af
mov ecx, ebx
and ecx, 7
shr dword [ebp + 8], cl
sub ebx, ecx
mov dword [esi], 0x10
jmp 0x403d0b
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 3
jb 0x40338f
mov eax, dword [ebp + 8]
shr dword [ebp + 8], 1
and eax, 1
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
and eax, 3
dec ebx
sub eax, 0
je 0x403410
dec eax
je 0x4033ec
dec eax
je 0x4033e4
dec eax
jne 0x403416
mov dword [edi + 0x18], str.invalid_block_type
mov dword [esi], 0x12
jmp 0x403416
mov dword [esi], 7
jmp 0x403416
mov dword [esi + 0x44], 0x409cc8
mov dword [esi + 0x4c], 9
mov dword [esi + 0x48], 0x40a4c8
mov dword [esi + 0x50], 5
mov dword [esi], 0xa
jmp 0x403416
mov dword [esi], 5
shr dword [ebp + 8], 2
dec ebx
dec ebx
jmp 0x403d0b
mov ecx, ebx
and ecx, 7
shr dword [ebp + 8], cl
sub ebx, ecx
jmp 0x40344d
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 0x20
jb 0x40342d
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 8]
not ecx
and eax, 0xffff
shr ecx, 0x10
cmp eax, ecx
je 0x403472
mov dword [edi + 0x18], str.invalid_stored_block_lengths
jmp 0x403d05
xor ebx, ebx
mov dword [esi + 0x38], eax
mov dword [ebp + 8], ebx
mov dword [esi], 6
mov eax, dword [esi + 0x38]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4034d2
mov eax, dword [ebp - 4]
cmp dword [ebp - 0xc], eax
jbe 0x403495
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc], eax
jbe 0x4034a0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x403d5d
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.0040179d
mov eax, dword [ebp - 0xc]
sub dword [ebp - 4], eax
add dword [ebp - 8], eax
sub dword [ebp - 0x10], eax
add dword [ebp - 0x14], eax
add esp, 0xc
sub dword [esi + 0x38], eax
jmp 0x403d0b
mov dword [esi], 3
jmp 0x403d0b
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 0xe
jb 0x4034dd
mov eax, dword [ebp + 8]
shr dword [ebp + 8], 5
and eax, 0x1f
add eax, 0x101
mov dword [esi + 0x58], eax
mov eax, dword [ebp + 8]
shr dword [ebp + 8], 5
and eax, 0x1f
inc eax
mov dword [esi + 0x5c], eax
mov eax, dword [ebp + 8]
shr dword [ebp + 8], 4
and eax, 0xf
add eax, 4
sub ebx, 0xe
cmp dword [esi + 0x58], 0x11e
mov dword [esi + 0x54], eax
ja 0x403550
cmp dword [esi + 0x5c], 0x1e
ja 0x403550
and dword [esi + 0x60], 0
mov dword [esi], 8
jmp case.0x40322b.8
mov dword [edi + 0x18], str.too_many_length_or_distance_symbols
jmp 0x403d05
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 3
jb 0x40355c
mov ecx, dword [esi + 0x60]
movzx eax, byte [ebp + 8]
movzx ecx, word [ecx*2 + 0x40a548]
shr dword [ebp + 8], 3
and eax, 7
mov word [esi + ecx*2 + 0x68], ax
inc dword [esi + 0x60]
sub ebx, 3
mov eax, dword [esi + 0x60]
cmp eax, dword [esi + 0x54]
jb 0x40357c
jmp 0x4035c0
mov eax, dword [esi + 0x60]
movzx eax, word [eax*2 + 0x40a548]
and word [esi + eax*2 + 0x68], 0
inc dword [esi + 0x60]
cmp dword [esi + 0x60], 0x13
jb 0x4035ac
lea eax, [esi + 0x528]
lea ecx, [esi + 0x64]
mov dword [ecx], eax
mov dword [esi + 0x44], eax
lea edx, [esi + 0x2e8]
push edx
lea eax, [esi + 0x4c]
push eax
push ecx
mov dword [eax], 7
push 0x13
lea eax, [esi + 0x68]
push eax
push 0
call fcn.00403eb9
add esp, 0x18
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x403609
mov dword [edi + 0x18], str.invalid_code_lengths_set
jmp 0x403d05
and dword [esi + 0x60], 0
mov dword [esi], 9
jmp case.0x40322b.9
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
mov ecx, dword [esi + 0x4c]
xor eax, eax
inc eax
shl eax, cl
mov ecx, dword [esi + 0x44]
dec eax
and eax, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, ebx
mov dword [ebp - 0x24], eax
ja 0x403618
mov ecx, eax
shr ecx, 0x10
cmp cx, 0x10
jae 0x4036b1
mov ecx, eax
shr ecx, 8
movzx ecx, cl
jmp 0x403691
cmp dword [ebp - 4], 0
je 0x403d5d
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx]
dec dword [ebp - 4]
mov ecx, ebx
shl edx, cl
movzx ecx, ah
add dword [ebp + 8], edx
inc dword [ebp - 8]
add ebx, 8
cmp ebx, ecx
jb 0x40366e
movzx ecx, ah
shr dword [ebp + 8], cl
mov eax, dword [esi + 0x60]
sub ebx, ecx
mov cx, word [ebp - 0x22]
mov word [esi + eax*2 + 0x68], cx
inc dword [esi + 0x60]
jmp case.0x40322b.9
cmp word [ebp - 0x22], 0x10
jne 0x403712
movzx eax, ah
jmp 0x4036dd
cmp dword [ebp - 4], 0
je 0x403d5d
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx]
dec dword [ebp - 4]
mov ecx, ebx
shl edx, cl
add dword [ebp + 8], edx
inc dword [ebp - 8]
add ebx, 8
lea ecx, [eax + 2]
cmp ebx, ecx
jb 0x4036bd
mov ecx, eax
shr dword [ebp + 8], cl
sub ebx, eax
mov eax, dword [esi + 0x60]
test eax, eax
je 0x4037ae
movzx eax, word [esi + eax*2 + 0x66]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
shr dword [ebp + 8], 2
and eax, 3
add eax, 3
dec ebx
dec ebx
jmp 0x40379f
cmp word [ebp - 0x22], 0x11
movzx edx, ah
jne 0x40377b
jmp 0x40373e
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
lea eax, [edx + 3]
cmp ebx, eax
jb 0x40371e
mov ecx, edx
shr dword [ebp + 8], cl
mov eax, dword [ebp + 8]
and eax, 7
add eax, 3
shr dword [ebp + 8], 3
push 0xfffffffffffffffd
jmp 0x403796
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
lea eax, [edx + 7]
cmp ebx, eax
jb 0x40375b
mov ecx, edx
shr dword [ebp + 8], cl
mov eax, dword [ebp + 8]
and eax, 0x7f
add eax, 0xb
shr dword [ebp + 8], 7
push 0xfffffffffffffff9
and dword [ebp - 0x24], 0
pop ecx
sub ecx, edx
add ebx, ecx
mov ecx, dword [esi + 0x5c]
mov edx, dword [esi + 0x60]
add ecx, dword [esi + 0x58]
add edx, eax
cmp edx, ecx
jbe 0x40380f
mov dword [edi + 0x18], str.invalid_bit_length_repeat
mov dword [esi], 0x12
lea eax, [esi + 0x528]
lea ecx, [esi + 0x64]
mov dword [ecx], eax
mov dword [esi + 0x44], eax
lea edx, [esi + 0x2e8]
push edx
lea eax, [esi + 0x4c]
push eax
push ecx
push dword [esi + 0x58]
mov dword [eax], 9
lea eax, [esi + 0x68]
push eax
push 1
call fcn.00403eb9
add esp, 0x18
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x403824
mov dword [edi + 0x18], str.invalid_literal_lengths_set
jmp 0x403d05
mov ecx, dword [esi + 0x60]
mov dx, word [ebp - 0x24]
dec eax
mov word [esi + ecx*2 + 0x68], dx
inc dword [esi + 0x60]
test eax, eax
jne 0x4037ff
mov eax, dword [esi + 0x5c]
add eax, dword [esi + 0x58]
cmp dword [esi + 0x60], eax
jb 0x403638
jmp 0x4037bb
lea ecx, [esi + 0x64]
mov eax, dword [ecx]
mov dword [esi + 0x48], eax
lea edx, [esi + 0x2e8]
push edx
lea eax, [esi + 0x50]
push eax
push ecx
push dword [esi + 0x5c]
mov dword [eax], 6
mov eax, dword [esi + 0x58]
lea eax, [esi + eax*2 + 0x68]
push eax
push 2
call fcn.00403eb9
add esp, 0x18
test eax, eax
mov dword [ebp - 0x1c], eax
je 0x403866
mov dword [edi + 0x18], str.invalid_distances_set
jmp 0x403d05
mov dword [esi], 0xa
cmp dword [ebp - 4], 6
jb 0x4038cb
cmp dword [ebp - 0x10], 0x102
jb 0x4038cb
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x18]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
push edi
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ebx
call fcn.00402c14
mov eax, dword [edi + 0xc]
mov ebx, dword [esi + 0x34]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [edi]
mov dword [ebp - 8], eax
mov eax, dword [edi + 4]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x30]
pop ecx
pop ecx
mov dword [ebp + 8], eax
jmp 0x403d0b
mov ecx, dword [esi + 0x4c]
mov eax, dword [esi + 0x44]
xor edx, edx
inc edx
shl edx, cl
dec edx
and edx, dword [ebp + 8]
mov eax, dword [eax + edx*4]
jmp 0x403911
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
mov ecx, dword [esi + 0x4c]
add ebx, 8
add dword [ebp + 8], eax
inc dword [ebp - 8]
xor eax, eax
inc eax
shl eax, cl
mov ecx, dword [esi + 0x44]
dec eax
and eax, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, ebx
ja 0x4038df
test al, al
je 0x4039ba
test al, 0xf0
jne 0x4039ba
mov dword [ebp - 0xc], eax
shr dword [ebp - 0xc], 8
movzx edx, byte [ebp - 0xc]
mov dword [ebp - 0x24], edx
movzx ecx, al
add ecx, edx
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
shr eax, 0x10
dec edx
and edx, dword [ebp + 8]
shr edx, cl
add edx, eax
mov eax, dword [esi + 0x44]
mov eax, dword [eax + edx*4]
movzx edx, byte [ebp - 0xc]
jmp 0x4039a3
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
mov ecx, dword [ebp - 0x20]
movzx edx, ch
add dword [ebp + 8], eax
inc dword [ebp - 8]
xor eax, eax
add ecx, edx
inc eax
shl eax, cl
add ebx, 8
mov ecx, edx
dec eax
and eax, dword [ebp + 8]
shr eax, cl
movzx ecx, word [ebp - 0x1e]
add eax, ecx
mov ecx, dword [esi + 0x44]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edx
cmp ecx, ebx
ja 0x403962
movzx ecx, byte [ebp - 0x1f]
shr dword [ebp + 8], cl
sub ebx, ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
shr dword [ebp + 8], cl
sub ebx, ecx
mov dword [ebp - 0x24], ecx
mov ecx, eax
shr ecx, 0x10
test al, al
mov dword [esi + 0x38], ecx
jne 0x4039e1
mov dword [esi], 0xf
jmp 0x403d0b
test al, 0x20
jne 0x4034d2
test al, 0x40
je 0x4039f9
mov dword [edi + 0x18], str.invalid_literal_length_code
jmp 0x403d05
and eax, 0xf
mov dword [esi + 0x40], eax
mov dword [esi], 0xb
mov eax, dword [esi + 0x40]
test eax, eax
je 0x403a48
cmp ebx, eax
jae 0x403a35
cmp dword [ebp - 4], 0
je 0x403d5d
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx]
dec dword [ebp - 4]
mov ecx, ebx
shl edx, cl
add ebx, 8
add dword [ebp + 8], edx
inc dword [ebp - 8]
cmp ebx, dword [esi + 0x40]
jb 0x403a10
xor edx, edx
inc edx
mov ecx, eax
shl edx, cl
dec edx
and edx, dword [ebp + 8]
shr dword [ebp + 8], cl
add dword [esi + 0x38], edx
sub ebx, eax
mov dword [esi], 0xc
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
xor edx, edx
inc edx
shl edx, cl
dec edx
and edx, dword [ebp + 8]
mov eax, dword [eax + edx*4]
jmp 0x403a94
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
mov ecx, dword [esi + 0x50]
add ebx, 8
add dword [ebp + 8], eax
inc dword [ebp - 8]
xor eax, eax
inc eax
shl eax, cl
mov ecx, dword [esi + 0x48]
dec eax
and eax, dword [ebp + 8]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, ebx
ja 0x403a62
test al, 0xf0
jne 0x403b35
mov dword [ebp - 0xc], eax
shr dword [ebp - 0xc], 8
movzx edx, byte [ebp - 0xc]
mov dword [ebp - 0x24], edx
movzx ecx, al
add ecx, edx
xor edx, edx
inc edx
shl edx, cl
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
shr eax, 0x10
dec edx
and edx, dword [ebp + 8]
shr edx, cl
add edx, eax
mov eax, dword [esi + 0x48]
mov eax, dword [eax + edx*4]
movzx edx, byte [ebp - 0xc]
jmp 0x403b1e
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
mov ecx, dword [ebp - 0x20]
movzx edx, ch
add dword [ebp + 8], eax
inc dword [ebp - 8]
xor eax, eax
add ecx, edx
inc eax
shl eax, cl
add ebx, 8
mov ecx, edx
dec eax
and eax, dword [ebp + 8]
shr eax, cl
movzx ecx, word [ebp - 0x1e]
add eax, ecx
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edx
cmp ecx, ebx
ja 0x403add
movzx ecx, byte [ebp - 0x1f]
shr dword [ebp + 8], cl
sub ebx, ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
shr dword [ebp + 8], cl
sub ebx, ecx
test al, 0x40
mov dword [ebp - 0x24], ecx
je 0x403b55
mov dword [edi + 0x18], str.invalid_distance_code
jmp 0x403d05
mov ecx, eax
shr ecx, 0x10
and eax, 0xf
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], eax
mov dword [esi], 0xd
mov eax, dword [esi + 0x40]
test eax, eax
je 0x403bac
cmp ebx, eax
jae 0x403b99
cmp dword [ebp - 4], 0
je 0x403d5d
mov ecx, dword [ebp - 8]
movzx edx, byte [ecx]
dec dword [ebp - 4]
mov ecx, ebx
shl edx, cl
add ebx, 8
add dword [ebp + 8], edx
inc dword [ebp - 8]
cmp ebx, dword [esi + 0x40]
jb 0x403b74
xor edx, edx
inc edx
mov ecx, eax
shl edx, cl
dec edx
and edx, dword [ebp + 8]
shr dword [ebp + 8], cl
add dword [esi + 0x3c], edx
sub ebx, eax
mov eax, dword [esi + 0x24]
sub eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
add eax, edx
cmp dword [esi + 0x3c], eax
jbe 0x403bc8
mov dword [edi + 0x18], str.invalid_distance_too_far_back
jmp 0x403d05
mov dword [esi], 0xe
cmp dword [ebp - 0x10], 0
je 0x403d5d
mov ecx, dword [esi + 0x3c]
mov eax, edx
sub eax, dword [ebp - 0x10]
cmp ecx, eax
jbe 0x403c11
sub ecx, eax
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0xc], ecx
mov ecx, dword [esi + 0x28]
cmp dword [ebp - 0xc], ecx
jbe 0x403bff
add eax, dword [esi + 0x20]
sub dword [ebp - 0xc], ecx
sub eax, dword [ebp - 0xc]
jmp 0x403c04
sub eax, dword [ebp - 0xc]
add eax, ecx
mov ecx, dword [esi + 0x38]
cmp dword [ebp - 0xc], ecx
mov dword [ebp - 0x24], ecx
jbe 0x403c1f
jmp 0x403c1c
mov eax, dword [ebp - 0x14]
sub eax, ecx
mov ecx, dword [esi + 0x38]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0x10]
cmp dword [ebp - 0xc], ecx
jbe 0x403c2a
mov dword [ebp - 0xc], ecx
sub ecx, dword [ebp - 0xc]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 0xc]
mov dword [esi + 0x38], ecx
mov edx, dword [ebp - 0x14]
mov cl, byte [eax]
inc dword [ebp - 0x14]
inc eax
dec dword [ebp - 0xc]
mov byte [edx], cl
jne 0x403c39
cmp dword [esi + 0x38], 0
jne 0x403d0b
mov dword [esi], 0xa
jmp 0x403d0b
cmp dword [ebp - 0x10], 0
je 0x403d5d
mov ecx, dword [ebp - 0x14]
mov al, byte [esi + 0x38]
inc dword [ebp - 0x14]
dec dword [ebp - 0x10]
mov byte [ecx], al
jmp 0x403c53
cmp dword [esi + 8], 0
je 0x403d47
jmp 0x403ca4
cmp dword [ebp - 4], 0
je 0x403d5d
mov eax, dword [ebp - 8]
movzx eax, byte [eax]
dec dword [ebp - 4]
mov ecx, ebx
shl eax, cl
add dword [ebp + 8], eax
inc dword [ebp - 8]
add ebx, 8
cmp ebx, 0x20
jb 0x403c84
sub edx, dword [ebp - 0x10]
add dword [edi + 0x14], edx
add dword [esi + 0x18], edx
test edx, edx
mov dword [ebp - 0x18], edx
je 0x403cd1
mov eax, dword [ebp - 0x14]
push edx
sub eax, edx
push eax
push dword [esi + 0x14]
call fcn.00401d77
mov dword [esi + 0x14], eax
add esp, 0xc
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
shl ecx, 0x10
and eax, 0xff00
add eax, ecx
xor ecx, ecx
mov ch, byte [ebp + 0xa]
shl eax, 8
add eax, ecx
mov ecx, dword [ebp + 8]
shr ecx, 0x18
add eax, ecx
cmp eax, dword [esi + 0x14]
je 0x403d42
mov dword [edi + 0x18], str.incorrect_data_check
mov dword [esi], 0x12
mov eax, dword [esi]
cmp eax, 0x13
jbe 0x403228
jmp case.default.0x40322b
mov eax, dword [ebp - 0x14]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp - 4]
mov dword [edi + 4], eax
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ebx
push 2
jmp 0x403222
xor ebx, ebx
mov dword [ebp + 8], ebx
mov dword [esi], 0x11
mov dword [ebp - 0x1c], 1
jmp 0x403d5d
mov dword [ebp - 0x1c], 0xfffffffd
mov eax, dword [ebp - 0x14]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp - 4]
mov dword [edi + 4], eax
cmp dword [esi + 0x20], 0
mov eax, dword [ebp + 8]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], ebx
jne 0x403d90
cmp dword [esi], 0x10
jge 0x403da9
mov eax, dword [ebp - 0x18]
cmp eax, dword [edi + 0x10]
je 0x403da9
mov eax, dword [ebp - 0x18]
call fcn.004030e3
test eax, eax
je 0x403da9
mov dword [esi], 0x13
push 0xfffffffffffffffc
jmp 0x403222
mov eax, dword [ebp - 0x28]
sub eax, dword [edi + 4]
mov ebx, dword [ebp - 0x18]
sub ebx, dword [edi + 0x10]
add dword [edi + 8], eax
add dword [edi + 0x14], ebx
add dword [esi + 0x18], ebx
cmp dword [esi + 8], 0
mov dword [ebp - 0x28], eax
je 0x403de6
test ebx, ebx
je 0x403de6
mov eax, dword [edi + 0xc]
push ebx
sub eax, ebx
push eax
push dword [esi + 0x14]
call fcn.00401d77
mov dword [esi + 0x14], eax
mov dword [edi + 0x30], eax
mov eax, dword [ebp - 0x28]
add esp, 0xc
cmp dword [esi], 3
jne 0x403df2
mov ecx, 0x80
jmp 0x403df4
xor ecx, ecx
mov edx, dword [esi + 4]
neg edx
sbb edx, edx
and edx, 0x40
add edx, ecx
add edx, dword [esi + 0x34]
test eax, eax
mov dword [edi + 0x2c], edx
jne 0x403e0e
test ebx, ebx
je 0x403e14
cmp dword [ebp + 0xc], 4
jne 0x403e21
cmp dword [ebp - 0x1c], 0
jne 0x403e21
mov dword [ebp - 0x1c], 0xfffffffb
mov eax, dword [ebp - 0x1c]
jmp 0x403223