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

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x44]
push edi
call fcn.00408527
pop ecx
test eax, eax
jne case.default.0x406daa
mov eax, dword [edi + 0xc]
mov dword [esp + 0x2c], eax
test eax, eax
je case.default.0x406daa
mov eax, dword [edi]
mov dword [esp + 0x18], eax
test eax, eax
jne 0x406d56
cmp dword [edi + 4], eax
jne case.default.0x406daa
mov ebp, dword [edi + 0x1c]
mov edx, 0x3f40
mov ecx, dword [ebp + 4]
cmp ecx, 0x3f3f
jne 0x406d7b
mov dword [ebp + 4], edx
mov ecx, edx
mov eax, dword [edi + 0xc]
mov dword [esp + 0x2c], eax
mov eax, dword [edi]
mov dword [esp + 0x18], eax
mov eax, dword [edi + 0x10]
mov esi, dword [edi + 4]
mov edx, dword [ebp + 0x3c]
mov ebx, dword [ebp + 0x40]
mov dword [esp + 0x28], eax
mov dword [esp + 0x34], eax
xor eax, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x30], eax
jmp 0x4073f2
jmp dword [eax*4 + 0x4082ba]
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jne 0x406dc4
mov dword [ebp + 4], 0x3f40
jmp 0x4073ef
push 0x10
pop eax
cmp ebx, eax
jae 0x406e01
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp ebx, 0x10
jb 0x406dcf
mov ecx, dword [ebp + 0xc]
test cl, 2
je 0x406e5e
cmp edx, 0x8b1f
jne 0x406e5e
xor ebx, ebx
cmp dword [ebp + 0x28], ebx
jne 0x406e1c
mov dword [ebp + 0x28], 0xf
push ebx
push ebx
push ebx
call fcn.00408864
mov dword [ebp + 0x1c], eax
push 0x1f
pop eax
mov byte [esp + 0x30], al
lea eax, [esp + 0x30]
push 2
push eax
mov byte [esp + 0x39], 0x8b
push dword [ebp + 0x1c]
call fcn.00408864
mov edx, ebx
mov dword [ebp + 0x1c], eax
add esp, 0x18
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [ebp + 4], 0x3f35
jmp 0x4073ef
and dword [ebp + 0x14], 0
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x406e70
or dword [eax + 0x30], 0xffffffff
mov ecx, dword [ebp + 0xc]
test cl, 1
je 0x406f1d
movzx ecx, dl
mov eax, edx
shl ecx, 8
xor edx, edx
shr eax, 8
add eax, ecx
push 0x1f
pop ecx
div ecx
test edx, edx
mov edx, dword [esp + 0x1c]
jne 0x406f1d
mov eax, edx
and al, 0xf
cmp al, 8
je 0x406eaa
mov dword [edi + 0x18], str.unknown_compression_method
jmp 0x406f24
mov eax, dword [ebp + 0x28]
sub ebx, 4
shr edx, 4
mov ecx, edx
mov dword [esp + 0x1c], edx
and ecx, 0xf
mov dword [esp + 0x20], ebx
add ecx, 8
test eax, eax
jne 0x406ecc
mov dword [ebp + 0x28], ecx
mov eax, ecx
cmp ecx, 0xf
ja 0x406f14
cmp ecx, eax
ja 0x406f14
xor ebx, ebx
xor eax, eax
push ebx
inc eax
shl eax, cl
push ebx
push ebx
mov dword [ebp + 0x18], eax
call fcn.00408622
mov edx, dword [esp + 0x28]
add esp, 0xc
shr edx, 8
not edx
mov dword [ebp + 0x1c], eax
and edx, 2
mov dword [edi + 0x30], eax
or edx, 0x3f3d
mov dword [ebp + 4], edx
mov edx, ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
jmp 0x4073ef
mov dword [edi + 0x18], str.invalid_window_size
jmp 0x406f24
mov dword [edi + 0x18], str.incorrect_header_check
mov dword [ebp + 4], 0x3f51
jmp 0x4073ef
push 0x10
pop eax
cmp ebx, eax
jae 0x406f6a
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp ebx, 0x10
jb 0x406f3b
mov dword [ebp + 0x14], edx
cmp dl, 8
jne 0x406ea1
test edx, 0xe000
je 0x406f87
mov dword [edi + 0x18], str.unknown_header_flags_set
jmp 0x406f24
mov esi, dword [ebp + 0x24]
mov ecx, edx
shr ecx, 8
mov eax, edx
test esi, esi
je 0x406f9f
mov eax, ecx
and eax, 1
mov dword [esi], eax
mov eax, dword [ebp + 0x14]
test eax, 0x200
je 0x406fc9
test byte [ebp + 0xc], 4
je 0x406fc9
push 2
lea eax, [esp + 0x28]
mov byte [esp + 0x28], dl
push eax
mov byte [esp + 0x2d], cl
push dword [ebp + 0x1c]
call fcn.00408864
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov esi, dword [esp + 0x14]
xor eax, eax
mov edx, eax
mov dword [ebp + 4], 0x3f36
mov dword [esp + 0x1c], edx
mov ebx, eax
cmp ebx, 0x20
jae 0x407012
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 0x20
jb 0x406fe7
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x40701c
mov dword [eax + 4], edx
test dword [ebp + 0x14], 0x200
je 0x40705d
test byte [ebp + 0xc], 4
je 0x40705d
mov eax, edx
mov byte [esp + 0x24], dl
shr eax, 8
mov byte [esp + 0x25], al
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x26], al
lea eax, [esp + 0x24]
push 4
shr edx, 0x18
push eax
mov byte [esp + 0x2f], dl
push dword [ebp + 0x1c]
call fcn.00408864
add esp, 0xc
mov dword [ebp + 0x1c], eax
xor eax, eax
mov dword [ebp + 4], 0x3f37
mov edx, eax
mov ebx, eax
mov dword [esp + 0x1c], edx
push 0x10
pop eax
cmp ebx, eax
jae 0x4070a4
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 0x10
jb 0x407079
mov esi, dword [ebp + 0x24]
mov ecx, edx
shr ecx, 8
test esi, esi
je 0x4070bc
movzx eax, dl
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x24]
mov dword [eax + 0xc], ecx
test dword [ebp + 0x14], 0x200
je 0x4070e8
test byte [ebp + 0xc], 4
je 0x4070e8
push 2
lea eax, [esp + 0x28]
mov byte [esp + 0x28], dl
push eax
mov byte [esp + 0x2d], cl
push dword [ebp + 0x1c]
call fcn.00408864
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov esi, dword [esp + 0x14]
xor ecx, ecx
mov edx, ecx
mov dword [ebp + 4], 0x3f38
mov ebx, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
jmp 0x407105
xor ecx, ecx
test dword [ebp + 0x14], 0x400
je 0x407192
push 0x10
pop eax
cmp ebx, eax
jae 0x407148
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 0x10
jb 0x40711d
mov eax, dword [ebp + 0x24]
mov dword [ebp + 0x44], edx
test eax, eax
je 0x407155
mov dword [eax + 0x14], edx
test dword [ebp + 0x14], 0x200
je 0x407184
test byte [ebp + 0xc], 4
je 0x407184
mov byte [esp + 0x24], dl
lea eax, [esp + 0x24]
push 2
shr edx, 8
push eax
mov byte [esp + 0x2d], dl
push dword [ebp + 0x1c]
call fcn.00408864
add esp, 0xc
mov dword [ebp + 0x1c], eax
xor eax, eax
mov ebx, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebx
jmp 0x40719c
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x40719c
mov dword [eax + 0x10], ecx
mov dword [ebp + 4], 0x3f39
mov eax, dword [ebp + 0x14]
test eax, 0x400
je 0x407233
mov ecx, dword [ebp + 0x44]
cmp ecx, dword [esp + 0x14]
cmovbe esi, ecx
test esi, esi
je 0x40722b
mov edx, dword [ebp + 0x24]
test edx, edx
je 0x4071fd
cmp dword [edx + 0x10], 0
je 0x4071fd
mov eax, dword [edx + 0x14]
sub eax, ecx
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x38], eax
add eax, esi
cmp eax, ecx
mov eax, dword [esp + 0x38]
jbe 0x4071e6
sub ecx, eax
jmp 0x4071e8
mov ecx, esi
add eax, dword [edx + 0x10]
push ecx
mov ecx, dword [esp + 0x1c]
push ecx
push eax
call fcn.0040a170
mov eax, dword [ebp + 0x14]
add esp, 0xc
test eax, 0x200
je 0x40721d
test byte [ebp + 0xc], 4
je 0x40721d
push esi
push dword [esp + 0x1c]
push dword [ebp + 0x1c]
call fcn.00408864
add esp, 0xc
mov dword [ebp + 0x1c], eax
sub dword [esp + 0x14], esi
add dword [esp + 0x18], esi
sub dword [ebp + 0x44], esi
mov ecx, dword [ebp + 0x44]
test ecx, ecx
jne 0x40818e
mov esi, dword [esp + 0x14]
xor ecx, ecx
mov dword [ebp + 0x44], ecx
mov dword [ebp + 4], 0x3f3a
jmp 0x407247
xor ecx, ecx
test dword [ebp + 0x14], 0x800
je 0x4072dd
test esi, esi
je 0x40818e
mov edi, dword [esp + 0x14]
mov esi, ecx
mov edx, dword [esp + 0x18]
mov al, byte [esi + edx]
inc esi
mov byte [esp + 0x13], al
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x407292
mov edx, dword [eax + 0x1c]
test edx, edx
je 0x40728e
mov ecx, dword [ebp + 0x44]
cmp ecx, dword [eax + 0x20]
jae 0x40728e
mov al, byte [esp + 0x13]
mov byte [ecx + edx], al
inc dword [ebp + 0x44]
mov edx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x40729e
cmp esi, edi
jb 0x407266
test dword [ebp + 0x14], 0x200
mov edi, dword [esp + 0x44]
je 0x4072c5
test byte [ebp + 0xc], 4
je 0x4072c5
push esi
push edx
push dword [ebp + 0x1c]
call fcn.00408864
mov cl, byte [esp + 0x1f]
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], esi
sub eax, esi
mov dword [esp + 0x14], eax
test cl, cl
jne 0x408192
jmp 0x4072e7
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4072e7
mov dword [eax + 0x1c], ecx
mov esi, dword [esp + 0x14]
xor ecx, ecx
mov dword [ebp + 0x44], ecx
mov dword [ebp + 4], 0x3f3b
jmp 0x4072fb
xor ecx, ecx
test dword [ebp + 0x14], 0x1000
je 0x407391
test esi, esi
je 0x40818e
mov edi, dword [esp + 0x14]
mov esi, ecx
mov edx, dword [esp + 0x18]
mov al, byte [esi + edx]
inc esi
mov byte [esp + 0x13], al
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x407346
mov edx, dword [eax + 0x24]
test edx, edx
je 0x407342
mov ecx, dword [ebp + 0x44]
cmp ecx, dword [eax + 0x28]
jae 0x407342
mov al, byte [esp + 0x13]
mov byte [ecx + edx], al
inc dword [ebp + 0x44]
mov edx, dword [esp + 0x18]
mov cl, byte [esp + 0x13]
test cl, cl
je 0x407352
cmp esi, edi
jb 0x40731a
test dword [ebp + 0x14], 0x200
mov edi, dword [esp + 0x44]
je 0x407379
test byte [ebp + 0xc], 4
je 0x407379
push esi
push edx
push dword [ebp + 0x1c]
call fcn.00408864
mov cl, byte [esp + 0x1f]
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov eax, dword [esp + 0x14]
add dword [esp + 0x18], esi
sub eax, esi
mov dword [esp + 0x14], eax
test cl, cl
jne 0x408192
jmp 0x40739b
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x40739b
mov dword [eax + 0x24], ecx
mov edx, dword [esp + 0x1c]
mov dword [ebp + 4], 0x3f3c
mov esi, dword [ebp + 0x14]
test esi, 0x200
jne 0x407439
xor ecx, ecx
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x4073cf
xor edx, edx
sar esi, 9
inc edx
and esi, edx
mov dword [eax + 0x2c], esi
mov eax, dword [ebp + 0x24]
mov dword [eax + 0x30], edx
push ecx
push ecx
push ecx
call fcn.00408864
mov dword [ebp + 0x1c], eax
add esp, 0xc
mov dword [edi + 0x30], eax
mov dword [ebp + 4], 0x3f3f
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov ecx, dword [ebp + 4]
lea eax, [ecx - 0x3f34]
cmp eax, 0x1e
jbe switch.0x00406daa
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
add ebx, 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
push 0x10
pop eax
cmp ebx, eax
jb 0x40740c
test byte [ebp + 0xc], 4
je 0x40745e
movzx eax, word [ebp + 0x1c]
cmp edx, eax
je 0x40745e
mov dword [edi + 0x18], str.header_crc_mismatch
mov dword [ebp + 4], 0x3f51
jmp 0x4073eb
xor ecx, ecx
mov ebx, ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ebx
jmp 0x4073b7
cmp ebx, 0x20
jae 0x4074a3
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 0x20
jb 0x407478
mov ecx, edx
mov ebx, 0xff00
mov eax, edx
and ecx, ebx
shl eax, 0x10
add ecx, eax
mov eax, edx
shr eax, 8
and eax, ebx
shl ecx, 8
shr edx, 0x18
add eax, ecx
add eax, edx
mov dword [ebp + 0x1c], eax
mov dword [edi + 0x30], eax
xor eax, eax
mov edx, eax
mov dword [ebp + 4], 0x3f3e
mov dword [esp + 0x1c], edx
mov ebx, eax
jmp 0x4074df
xor eax, eax
cmp dword [ebp + 0x10], eax
je 0x408151
push eax
push eax
push eax
call fcn.00408622
mov edx, dword [esp + 0x28]
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov dword [edi + 0x30], eax
mov dword [ebp + 4], 0x3f3f
cmp dword [esp + 0x48], 5
je 0x40818e
cmp dword [esp + 0x48], 6
je 0x40818e
cmp dword [ebp + 8], 0
je 0x40753d
mov ecx, ebx
mov dword [ebp + 4], 0x3f4e
and ecx, 7
shr edx, cl
sub ebx, ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
jmp 0x4073ef
cmp ebx, 3
jae 0x407571
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 3
jb 0x407546
mov eax, edx
shr edx, 1
and eax, 1
mov dword [ebp + 8], eax
mov eax, edx
and eax, 3
sub eax, 0
je 0x4075e6
sub eax, 1
je 0x4075ad
sub eax, 1
je 0x4075a4
sub eax, 1
jne 0x4075ed
mov dword [edi + 0x18], str.invalid_block_type
mov dword [ebp + 4], 0x3f51
jmp 0x4075ed
mov dword [ebp + 4], 0x3f44
jmp 0x4075ed
cmp dword [esp + 0x48], 6
mov dword [ebp + 0x50], 0x427b40
mov dword [ebp + 0x58], 9
mov dword [ebp + 0x54], 0x428340
mov dword [ebp + 0x5c], 5
mov dword [ebp + 4], 0x3f47
jne 0x4075ed
shr edx, 2
sub ebx, 3
mov dword [esp + 0x1c], edx
jmp 0x40818e
mov dword [ebp + 4], 0x3f41
shr edx, 2
sub ebx, 3
jmp 0x406f07
mov ecx, ebx
and ecx, 7
sub ebx, ecx
shr edx, cl
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
cmp ebx, 0x20
jae 0x407641
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp ebx, 0x20
jb 0x407612
mov eax, edx
movzx ecx, dx
not eax
shr eax, 0x10
cmp ecx, eax
je 0x40765b
mov dword [edi + 0x18], str.invalid_stored_block_lengths
jmp 0x406f24
xor eax, eax
mov dword [ebp + 0x44], ecx
cmp dword [esp + 0x48], 6
mov edx, eax
mov ebx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [ebp + 4], 0x3f42
je 0x40818e
mov dword [ebp + 4], 0x3f43
mov ecx, dword [ebp + 0x44]
test ecx, ecx
je 0x4076ce
cmp ecx, esi
mov eax, esi
mov esi, dword [esp + 0x28]
cmovbe eax, ecx
cmp eax, esi
cmovbe esi, eax
test esi, esi
je 0x40818e
mov ecx, dword [esp + 0x2c]
push esi
push dword [esp + 0x1c]
push ecx
call fcn.0040a170
sub dword [esp + 0x20], esi
add esp, 0xc
add dword [esp + 0x18], esi
sub dword [esp + 0x28], esi
add dword [esp + 0x2c], esi
sub dword [ebp + 0x44], esi
jmp 0x4073e7
mov dword [ebp + 4], 0x3f3f
jmp 0x4073ef
cmp ebx, 0xe
jae 0x40770e
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 0xe
jb 0x4076e3
mov ecx, edx
sub ebx, 0xe
push 0x1f
shr edx, 5
pop esi
and ecx, esi
mov dword [esp + 0x20], ebx
and esi, edx
add ecx, 0x101
shr edx, 5
inc esi
mov eax, edx
mov dword [ebp + 0x64], ecx
and eax, 0xf
shr edx, 4
add eax, 4
mov dword [ebp + 0x68], esi
mov dword [ebp + 0x60], eax
mov dword [esp + 0x1c], edx
cmp ecx, 0x11e
ja 0x407761
cmp esi, 0x1e
ja 0x407761
and dword [ebp + 0x6c], 0
mov esi, dword [esp + 0x14]
mov dword [ebp + 4], 0x3f45
jmp case.0x406daa.16197
mov dword [edi + 0x18], str.too_many_length_or_distance_symbols
jmp 0x407455
cmp ebx, 3
jae 0x4077a1
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
cmp ebx, 3
jb 0x407776
mov eax, dword [ebp + 0x6c]
mov ecx, edx
and ecx, 7
shr edx, 3
mov dword [esp + 0x1c], edx
movzx eax, word [eax*2 + 0x4283c0]
mov word [ebp + eax*2 + 0x74], cx
inc dword [ebp + 0x6c]
sub ebx, 3
mov dword [esp + 0x20], ebx
mov eax, dword [ebp + 0x6c]
cmp eax, dword [ebp + 0x60]
jb 0x40776d
cmp eax, 0x13
jae 0x4077ef
mov eax, dword [ebp + 0x6c]
xor ecx, ecx
movzx eax, word [eax*2 + 0x4283c0]
mov word [ebp + eax*2 + 0x74], cx
inc dword [ebp + 0x6c]
cmp dword [ebp + 0x6c], 0x13
jb 0x4077d4
lea eax, [ebp + 0x534]
lea edx, [ebp + 0x70]
mov dword [ebp + 0x50], eax
mov dword [edx], eax
lea ecx, [ebp + 0x58]
lea eax, [ebp + 0x2f4]
mov dword [ecx], 7
push eax
push ecx
push edx
push 0x13
lea eax, [ebp + 0x74]
push eax
push 0
call fcn.00408b26
mov edx, dword [esp + 0x34]
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
je 0x407837
mov dword [edi + 0x18], str.invalid_code_lengths_set
jmp 0x406f24
and dword [ebp + 0x6c], 0
mov eax, 0x3f46
mov dword [ebp + 4], eax
mov ecx, eax
mov eax, dword [ebp + 0x68]
add eax, dword [ebp + 0x64]
cmp dword [ebp + 0x6c], eax
jae 0x407a5c
mov ecx, dword [ebp + 0x58]
xor eax, eax
lea esi, [eax + 1]
shl esi, cl
jmp 0x407889
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
mov dword [esp + 0x1c], edx
add ebx, 8
mov ecx, dword [ebp + 0x50]
lea eax, [esi - 1]
and eax, edx
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x38], eax
cmp ecx, ebx
ja 0x407860
mov esi, eax
push 0x10
shr esi, 0x10
pop ecx
cmp si, cx
jae 0x4078d6
shr eax, 8
movzx ecx, al
mov eax, dword [ebp + 0x6c]
sub ebx, ecx
shr edx, cl
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov word [ebp + eax*2 + 0x74], si
inc dword [ebp + 0x6c]
mov ecx, dword [ebp + 0x6c]
jmp 0x407a2e
jne 0x40794c
mov ecx, eax
shr ecx, 8
movzx esi, cl
add esi, 2
cmp ebx, esi
jae 0x407916
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40818e
dec ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x18]
movzx edx, byte [ecx]
mov ecx, ebx
shl edx, cl
add ebx, 8
add dword [esp + 0x1c], edx
inc dword [esp + 0x18]
cmp ebx, esi
jb 0x4078e7
mov edx, dword [esp + 0x1c]
movzx ecx, ah
mov eax, dword [ebp + 0x6c]
sub ebx, ecx
shr edx, cl
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
test eax, eax
je 0x407a41
movzx eax, word [ebp + eax*2 + 0x72]
mov esi, edx
and esi, 3
shr edx, 2
add esi, 3
mov dword [esp + 0x38], eax
sub ebx, 2
jmp 0x4079f9
cmp word [esp + 0x3a], 0x11
movzx ecx, ah
jne 0x4079a4
lea esi, [ecx + 3]
mov dword [esp + 0x38], ecx
cmp ebx, esi
jae 0x407993
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
add ebx, 8
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
mov dword [esp + 0x1c], edx
cmp ebx, esi
jb 0x407962
mov ecx, dword [esp + 0x38]
shr edx, cl
mov esi, edx
and esi, 7
add esi, 3
shr edx, 3
push 0xfffffffffffffffd
jmp 0x4079ef
lea esi, [ecx + 7]
mov dword [esp + 0x38], ecx
cmp ebx, esi
jae 0x4079e0
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
add ebx, 8
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
mov dword [esp + 0x1c], edx
cmp ebx, esi
jb 0x4079af
mov ecx, dword [esp + 0x38]
shr edx, cl
mov esi, edx
and esi, 0x7f
add esi, 0xb
shr edx, 7
push 0xfffffffffffffff9
pop eax
sub eax, ecx
add ebx, eax
and dword [esp + 0x38], 0
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp + 0x68]
add ecx, esi
add eax, dword [ebp + 0x64]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
cmp ecx, eax
ja 0x407a4d
mov edi, dword [esp + 0x38]
mov eax, dword [ebp + 0x6c]
mov word [ebp + eax*2 + 0x74], di
mov ecx, dword [ebp + 0x6c]
lea ecx, [ecx + 1]
mov dword [ebp + 0x6c], ecx
sub esi, 1
jne 0x407a14
mov edi, dword [esp + 0x44]
mov eax, dword [ebp + 0x68]
add eax, dword [ebp + 0x64]
cmp ecx, eax
jb 0x407854
mov ecx, dword [ebp + 4]
jmp 0x407a5c
mov dword [edi + 0x18], str.invalid_bit_length_repeat
jmp 0x407455
mov ecx, 0x3f51
mov dword [edi + 0x18], str.invalid_bit_length_repeat
mov dword [ebp + 4], ecx
mov esi, 0x3f51
cmp ecx, esi
je 0x4073eb
xor eax, eax
cmp word [ebp + 0x274], ax
jne 0x407a83
mov dword [edi + 0x18], str.invalid_code____missing_end_of_block
mov dword [ebp + 4], esi
jmp 0x4073eb
lea eax, [ebp + 0x534]
lea esi, [ebp + 0x70]
mov dword [ebp + 0x50], eax
mov dword [esi], eax
lea ecx, [ebp + 0x2f4]
push ecx
lea eax, [ebp + 0x58]
push eax
push esi
push dword [ebp + 0x64]
mov dword [eax], 9
lea eax, [ebp + 0x74]
push eax
push 1
call fcn.00408b26
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
je 0x407acf
mov dword [edi + 0x18], str.invalid_literal_lengths_set
mov dword [ebp + 4], 0x3f51
jmp 0x4073e7
mov eax, dword [esi]
lea ecx, [ebp + 0x2f4]
mov dword [ebp + 0x54], eax
lea eax, [ebp + 0x5c]
push ecx
push eax
mov dword [eax], 6
mov eax, dword [ebp + 0x64]
push esi
push dword [ebp + 0x68]
lea eax, [eax*2 + 0x74]
add eax, ebp
push eax
push 2
call fcn.00408b26
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
je 0x407b11
mov dword [edi + 0x18], str.invalid_distances_set
jmp 0x407ac3
cmp dword [esp + 0x48], 6
mov dword [ebp + 4], 0x3f47
je 0x40818e
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
mov dword [ebp + 4], 0x3f48
cmp esi, 6
jb 0x407ba9
mov eax, dword [esp + 0x28]
cmp eax, 0x102
jb 0x407ba9
push dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x1c]
mov dword [edi + 0xc], ecx
mov dword [edi], eax
mov dword [edi + 4], esi
push edi
mov dword [ebp + 0x3c], edx
mov dword [ebp + 0x40], ebx
call fcn.00408f4d
cmp dword [ebp + 4], 0x3f3f
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 4]
mov edx, dword [ebp + 0x3c]
mov ebx, dword [ebp + 0x40]
mov dword [esp + 0x34], eax
mov eax, dword [edi + 0x10]
pop ecx
mov dword [esp + 0x2c], eax
mov eax, dword [edi]
pop ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
jne 0x4073ef
or dword [ebp + 0x1bc8], 0xffffffff
jmp 0x4073ef
and dword [ebp + 0x1bc8], 0
xor eax, eax
mov ecx, dword [ebp + 0x58]
lea esi, [eax + 1]
shl esi, cl
jmp 0x407be9
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
add ebx, 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov ecx, dword [ebp + 0x50]
lea eax, [esi - 1]
and eax, edx
mov eax, dword [ecx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, ebx
ja 0x407bbc
test al, al
je 0x407cbf
test al, 0xf0
jne 0x407cbf
mov ebx, eax
movzx ecx, al
shr ebx, 8
xor edi, edi
movzx esi, bl
inc edi
add ecx, esi
mov edx, eax
shl edi, cl
mov ecx, esi
dec edi
shr eax, 0x10
and edi, dword [esp + 0x1c]
shr edi, cl
mov ecx, dword [ebp + 0x50]
add edi, eax
mov dword [esp + 0x38], edx
mov eax, dword [ecx + edi*4]
mov ecx, eax
shr ecx, 8
movzx esi, cl
movzx ecx, bl
mov ebx, dword [esp + 0x20]
add esi, ecx
cmp esi, ebx
jbe 0x407caa
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40818e
dec esi
movzx edi, dh
mov dword [esp + 0x14], esi
mov ecx, ebx
mov esi, dword [esp + 0x18]
add ebx, 8
movzx eax, byte [esi]
shl eax, cl
add dword [esp + 0x1c], eax
inc esi
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x18], esi
xor esi, esi
inc esi
movzx ecx, dl
add ecx, edi
shl esi, cl
mov ecx, edi
dec esi
and esi, dword [esp + 0x1c]
shr esi, cl
add esi, eax
mov eax, dword [ebp + 0x50]
mov eax, dword [eax + esi*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edi
cmp ecx, ebx
ja 0x407c51
mov edi, dword [esp + 0x44]
movzx ecx, dh
mov edx, dword [esp + 0x1c]
shr edx, cl
sub ebx, ecx
mov dword [ebp + 0x1bc8], ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add dword [ebp + 0x1bc8], ecx
sub ebx, ecx
shr edx, cl
mov ecx, eax
shr ecx, 0x10
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [ebp + 0x44], ecx
test al, al
jne 0x407cf1
mov dword [ebp + 4], 0x3f4d
jmp 0x4073eb
test al, 0x20
je 0x407d08
or dword [ebp + 0x1bc8], 0xffffffff
mov dword [ebp + 4], 0x3f3f
jmp 0x4073eb
test al, 0x40
je 0x407d18
mov dword [edi + 0x18], str.invalid_literal_length_code
jmp 0x407455
movzx eax, al
and eax, 0xf
mov dword [ebp + 4], 0x3f49
mov dword [ebp + 0x4c], eax
mov esi, dword [ebp + 0x4c]
test esi, esi
je 0x407d80
cmp ebx, esi
jae 0x407d61
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
add ebx, 8
movzx eax, byte [edi]
shl eax, cl
add edx, eax
inc edi
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], edi
cmp ebx, esi
jb 0x407d37
xor eax, eax
mov ecx, esi
inc eax
sub ebx, esi
shl eax, cl
dec eax
mov dword [esp + 0x20], ebx
and eax, edx
shr edx, cl
add dword [ebp + 0x44], eax
add dword [ebp + 0x1bc8], esi
mov dword [esp + 0x1c], edx
mov eax, dword [ebp + 0x44]
mov dword [ebp + 0x1bcc], eax
mov dword [ebp + 4], 0x3f4a
mov ecx, dword [ebp + 0x5c]
xor eax, eax
mov edi, dword [ebp + 0x54]
lea esi, [eax + 1]
shl esi, cl
jmp 0x407dcc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
add ebx, 8
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
lea eax, [esi - 1]
and eax, edx
mov eax, dword [edi + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, ebx
ja 0x407d9f
test al, 0xf0
jne 0x407e93
mov ebx, eax
movzx ecx, al
shr ebx, 8
xor edi, edi
movzx esi, bl
inc edi
add ecx, esi
mov edx, eax
shl edi, cl
mov ecx, esi
dec edi
shr eax, 0x10
and edi, dword [esp + 0x1c]
shr edi, cl
mov ecx, dword [ebp + 0x54]
add edi, eax
mov dword [esp + 0x38], edx
mov eax, dword [ecx + edi*4]
mov ecx, eax
shr ecx, 8
movzx esi, cl
movzx ecx, bl
mov ebx, dword [esp + 0x20]
add esi, ecx
cmp esi, ebx
jbe 0x407e82
mov esi, dword [esp + 0x14]
test esi, esi
je 0x40818e
dec esi
movzx edi, dh
mov dword [esp + 0x14], esi
mov ecx, ebx
mov esi, dword [esp + 0x18]
add ebx, 8
movzx eax, byte [esi]
shl eax, cl
add dword [esp + 0x1c], eax
inc esi
movzx eax, word [esp + 0x3a]
mov dword [esp + 0x18], esi
xor esi, esi
inc esi
movzx ecx, dl
add ecx, edi
shl esi, cl
mov ecx, edi
dec esi
and esi, dword [esp + 0x1c]
shr esi, cl
add esi, eax
mov eax, dword [ebp + 0x54]
mov eax, dword [eax + esi*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edi
cmp ecx, ebx
ja 0x407e29
movzx ecx, dh
mov edx, dword [esp + 0x1c]
sub ebx, ecx
shr edx, cl
add dword [ebp + 0x1bc8], ecx
mov edi, dword [esp + 0x44]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add dword [ebp + 0x1bc8], ecx
sub ebx, ecx
shr edx, cl
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
test al, 0x40
je 0x407ec1
mov dword [edi + 0x18], str.invalid_distance_code
jmp 0x407455
mov ecx, eax
mov dword [ebp + 4], 0x3f4b
shr ecx, 0x10
movzx eax, al
and eax, 0xf
mov dword [ebp + 0x48], ecx
mov dword [ebp + 0x4c], eax
mov esi, dword [ebp + 0x4c]
test esi, esi
je 0x407f2e
jmp 0x407f0b
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408192
dec eax
mov ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
movzx eax, byte [eax]
shl eax, cl
add edx, eax
inc dword [esp + 0x18]
mov dword [esp + 0x1c], edx
add ebx, 8
cmp ebx, esi
jb 0x407ee2
xor eax, eax
mov ecx, esi
inc eax
sub ebx, esi
shl eax, cl
dec eax
mov dword [esp + 0x20], ebx
and eax, edx
shr edx, cl
add dword [ebp + 0x48], eax
add dword [ebp + 0x1bc8], esi
mov dword [esp + 0x1c], edx
mov esi, dword [esp + 0x14]
mov dword [ebp + 4], 0x3f4c
mov eax, dword [esp + 0x28]
test eax, eax
je 0x40818e
mov ecx, dword [esp + 0x34]
sub ecx, eax
mov eax, dword [ebp + 0x48]
cmp eax, ecx
jbe 0x407f98
sub eax, ecx
cmp eax, dword [ebp + 0x30]
jbe 0x407f6e
cmp dword [ebp + 0x1bc4], 0
je 0x407f6e
mov dword [edi + 0x18], str.invalid_distance_too_far_back
jmp 0x406f24
cmp eax, dword [ebp + 0x34]
jbe 0x407f80
sub eax, dword [ebp + 0x34]
mov ecx, dword [ebp + 0x2c]
sub ecx, eax
add ecx, dword [ebp + 0x38]
jmp 0x407f88
mov ecx, dword [ebp + 0x38]
sub ecx, eax
add ecx, dword [ebp + 0x34]
mov esi, dword [ebp + 0x44]
cmp eax, esi
mov edi, esi
cmovbe edi, eax
mov dword [esp + 0x38], edi
jmp 0x407fa5
mov ecx, dword [esp + 0x2c]
mov esi, dword [ebp + 0x44]
sub ecx, eax
mov dword [esp + 0x38], esi
mov edi, dword [esp + 0x28]
mov eax, edi
cmp dword [esp + 0x38], edi
cmovbe eax, dword [esp + 0x38]
sub edi, eax
mov dword [esp + 0x38], eax
sub esi, eax
mov dword [esp + 0x28], edi
mov edi, dword [esp + 0x2c]
sub ecx, edi
mov dword [ebp + 0x44], esi
mov esi, eax
mov al, byte [ecx + edi]
mov byte [edi], al
inc edi
sub esi, 1
jne 0x407fcb
cmp dword [ebp + 0x44], 0
mov esi, dword [esp + 0x14]
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x44]
jne 0x4073ef
mov dword [ebp + 4], 0x3f48
jmp 0x4073ef
cmp dword [esp + 0x28], 0
je 0x40818e
mov ecx, dword [esp + 0x2c]
mov al, byte [ebp + 0x44]
mov byte [ecx], al
inc ecx
dec dword [esp + 0x28]
mov dword [esp + 0x2c], ecx
jmp 0x407fec
cmp dword [ebp + 0xc], 0
je 0x4080f7
cmp ebx, 0x20
jae 0x408059
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp ebx, 0x20
jb 0x40802a
mov ecx, dword [esp + 0x34]
sub ecx, dword [esp + 0x28]
add dword [edi + 0x14], ecx
add dword [ebp + 0x20], ecx
mov eax, dword [ebp + 0xc]
test al, 4
je 0x40809f
test ecx, ecx
je 0x40809f
mov eax, dword [esp + 0x2c]
sub eax, ecx
cmp dword [ebp + 0x14], 0
push ecx
push eax
push dword [ebp + 0x1c]
je 0x40808a
call fcn.00408864
jmp 0x40808f
call fcn.00408622
mov edx, dword [esp + 0x28]
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov dword [edi + 0x30], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], ecx
test al, 4
je 0x4080e9
mov ecx, edx
mov eax, edx
shl eax, 0x10
and ecx, 0xff00
add ecx, eax
mov eax, edx
shr eax, 8
and eax, 0xff00
shl ecx, 8
add ecx, eax
mov eax, edx
shr eax, 0x18
add ecx, eax
xor eax, eax
cmp dword [ebp + 0x14], eax
cmovne ecx, edx
cmp ecx, dword [ebp + 0x1c]
je 0x4080eb
mov dword [edi + 0x18], str.incorrect_data_check
jmp 0x406f24
xor eax, eax
mov edx, eax
mov ebx, eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebx
mov dword [ebp + 4], 0x3f4f
xor eax, eax
cmp dword [ebp + 0xc], eax
je 0x40817b
cmp dword [ebp + 0x14], eax
je 0x40817b
cmp ebx, 0x20
jae 0x408140
mov eax, dword [esp + 0x18]
test esi, esi
je 0x40818e
movzx eax, byte [eax]
mov ecx, ebx
shl eax, cl
dec esi
add edx, eax
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x18]
add ebx, 8
inc eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov dword [esp + 0x20], ebx
cmp ebx, 0x20
jb 0x408113
xor eax, eax
cmp edx, dword [ebp + 0x20]
je 0x408175
mov dword [edi + 0x18], str.incorrect_length_check
jmp 0x406f24
mov eax, dword [esp + 0x2c]
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x28]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [edi], eax
mov dword [edi + 4], esi
mov dword [ebp + 0x3c], edx
mov dword [ebp + 0x40], ebx
push 2
jmp 0x407403
mov dword [esp + 0x1c], eax
mov ebx, eax
mov dword [ebp + 4], 0x3f50
xor eax, eax
inc eax
jmp 0x40818a
push 0xfffffffffffffffd
pop eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x34]
mov dword [esi + 0xc], ecx
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x10], ecx
mov ecx, dword [esp + 0x18]
mov dword [esi + 4], eax
mov eax, dword [esp + 0x1c]
mov dword [esi], ecx
mov dword [ebp + 0x40], ebx
xor ebx, ebx
mov dword [ebp + 0x3c], eax
cmp dword [ebp + 0x2c], ebx
jne 0x4081e0
cmp edi, dword [esi + 0x10]
je 0x408204
cmp dword [ebp + 4], 0x3f51
jge 0x408204
cmp dword [ebp + 4], 0x3f4e
jl 0x4081e0
cmp dword [esp + 0x48], 4
je 0x408204
mov eax, edi
sub eax, dword [esi + 0x10]
push eax
push dword [esi + 0xc]
push esi
call fcn.0040855a
add esp, 0xc
test eax, eax
je 0x408204
mov dword [ebp + 4], 0x3f52
push 0xfffffffffffffffc
jmp 0x407403
mov edx, dword [esp + 0x3c]
sub edx, dword [esi + 4]
sub edi, dword [esi + 0x10]
add dword [esi + 8], edx
add dword [esi + 0x14], edi
add dword [ebp + 0x20], edi
test byte [ebp + 0xc], 4
mov dword [esp + 0x3c], edx
je 0x40824d
test edi, edi
je 0x40824d
mov eax, dword [esi + 0xc]
sub eax, edi
push edi
push eax
push dword [ebp + 0x1c]
cmp dword [ebp + 0x14], ebx
je 0x40823b
call fcn.00408864
jmp 0x408240
call fcn.00408622
mov edx, dword [esp + 0x48]
add esp, 0xc
mov dword [ebp + 0x1c], eax
mov dword [esi + 0x30], eax
cmp dword [ebp + 4], 0x3f47
je 0x40825f
cmp dword [ebp + 4], 0x3f42
jne 0x408264
mov ebx, 0x100
mov ecx, dword [ebp + 8]
neg ecx
mov dword [esp + 0x3c], 0x80
sbb ecx, ecx
xor eax, eax
and ecx, 0x40
cmp dword [ebp + 4], 0x3f3f
cmove eax, dword [esp + 0x3c]
add ecx, eax
add ecx, dword [ebp + 0x40]
add ecx, ebx
mov dword [esi + 0x2c], ecx
test edx, edx
jne 0x408296
test edi, edi
je 0x40829d
cmp dword [esp + 0x48], 4
jne 0x4082ae
mov eax, dword [esp + 0x30]
test eax, eax
push 0xfffffffffffffffb
pop ecx
cmove eax, ecx
jmp 0x407404
mov eax, dword [esp + 0x30]
jmp 0x407404