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

Disassembly:
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3c]
push edi
test esi, esi
je case.default.0x46e091
mov ebp, dword [esi + 0x1c]
test ebp, ebp
je case.default.0x46e091
xor ecx, ecx
cmp dword [esi + 0xc], ecx
je case.default.0x46e091
cmp dword [esi], ecx
jne 0x46e03f
cmp dword [esi + 4], ecx
jne case.default.0x46e091
cmp dword [ebp], 0xb
jne 0x46e04c
mov dword [ebp], 0xc
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 4]
mov ebx, dword [ebp + 0x38]
mov edi, dword [ebp + 0x3c]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x28], eax
mov eax, dword [esi]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x38], edx
mov dword [esp + 0x30], ecx
cmp eax, 0x1e
ja case.default.0x46e091
jmp dword [eax*4 + 0x46f429]
cmp dword [ebp + 8], 0
jne 0x46e0aa
mov dword [ebp], 0xc
jmp 0x46e180
push 0x10
pop eax
cmp edi, eax
jae 0x46e0e6
mov eax, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [eax]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x14]
add edi, 8
inc eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], edi
cmp edi, 0x10
jb 0x46e0b5
xor ecx, ecx
test byte [ebp + 8], 2
je 0x46e13b
cmp ebx, 0x8b1f
jne 0x46e13b
push ecx
push ecx
push ecx
call fcn.0046f746
mov dword [ebp + 0x18], eax
push 0x1f
pop eax
mov byte [esp + 0x2c], al
lea eax, [esp + 0x2c]
push 2
push eax
mov byte [esp + 0x35], 0x8b
push dword [ebp + 0x18]
call fcn.0046f746
add esp, 0x18
mov dword [ebp + 0x18], eax
mov dword [ebp], 1
xor ecx, ecx
mov edi, ecx
mov ebx, ecx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
mov edx, dword [esp + 0x10]
jmp 0x46e180
mov eax, dword [ebp + 0x20]
mov dword [ebp + 0x10], ecx
test eax, eax
je 0x46e149
or dword [eax + 0x30], 0xffffffff
test byte [ebp + 8], 1
je 0x46e1ef
movzx ecx, bl
mov eax, ebx
shl ecx, 8
xor edx, edx
shr eax, 8
add eax, ecx
push 0x1f
pop ecx
div ecx
test edx, edx
jne 0x46e1e9
mov eax, ebx
and al, 0xf
cmp al, 8
je 0x46e195
mov dword [ebp], 0x1d
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov eax, dword [ebp]
cmp eax, 0x1e
ja case.default.0x46e091
mov esi, dword [esp + 0x40]
jmp switch.0x0046e091
shr ebx, 4
sub edi, 4
mov ecx, ebx
mov dword [esp + 0x1c], ebx
and ecx, 0xf
mov dword [esp + 0x18], edi
add ecx, 8
cmp dword [ebp + 0x24], 0
jne 0x46e1b6
mov dword [ebp + 0x24], ecx
jmp 0x46e1bb
cmp ecx, dword [ebp + 0x24]
ja 0x46e173
xor eax, eax
inc eax
shl eax, cl
mov dword [ebp + 0x14], eax
xor eax, eax
push eax
push eax
push eax
call fcn.0046f82e
shr ebx, 8
add esp, 0xc
not ebx
mov dword [ebp + 0x18], eax
and ebx, 2
mov dword [esi + 0x30], eax
or ebx, 9
mov dword [ebp], ebx
jmp 0x46e127
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov dword [ebp], 0x1d
jmp 0x46e180
push 0x10
pop eax
cmp edi, eax
jae 0x46e232
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
push 0x10
add edi, 8
mov dword [esp + 0x20], ebx
inc esi
mov dword [esp + 0x1c], edi
pop eax
mov dword [esp + 0x14], esi
cmp edi, eax
jb 0x46e203
xor ecx, ecx
mov dword [ebp + 0x10], ebx
cmp bl, 8
jne 0x46e1ef
test ebx, 0xe000
jne 0x46e1ef
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x46e253
mov eax, ebx
shr eax, 8
and eax, 1
mov dword [ecx], eax
test dword [ebp + 0x10], 0x200
je 0x46e280
mov byte [esp + 0x20], bl
lea eax, [esp + 0x20]
push 2
shr ebx, 8
push eax
mov byte [esp + 0x29], bl
push dword [ebp + 0x18]
call fcn.0046f746
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebp + 0x18], eax
xor esi, esi
mov dword [ebp], 2
mov ebx, esi
mov edi, esi
jmp 0x46e291
xor esi, esi
cmp edi, 0x20
jae 0x46e2c1
mov eax, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [eax]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0x14]
add edi, 8
inc eax
mov dword [esp + 0x14], eax
cmp edi, 0x20
jb 0x46e29a
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e2cb
mov dword [eax + 4], ebx
test dword [ebp + 0x10], 0x200
je 0x46e306
mov eax, ebx
mov byte [esp + 0x20], bl
shr eax, 8
mov byte [esp + 0x21], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x22], al
lea eax, [esp + 0x20]
push 4
shr ebx, 0x18
push eax
mov byte [esp + 0x2b], bl
push dword [ebp + 0x18]
call fcn.0046f746
add esp, 0xc
mov dword [ebp + 0x18], eax
mov edx, dword [esp + 0x10]
mov ebx, esi
mov edi, esi
mov dword [ebp], 3
push 0x10
pop eax
cmp edi, eax
jae 0x46e345
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
push 0x10
inc esi
add edi, 8
pop eax
mov dword [esp + 0x14], esi
cmp edi, eax
jb 0x46e320
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x46e35d
movzx eax, bl
mov dword [ecx + 8], eax
mov ecx, ebx
mov eax, dword [ebp + 0x20]
shr ecx, 8
mov dword [eax + 0xc], ecx
test dword [ebp + 0x10], 0x200
je 0x46e386
mov byte [esp + 0x20], bl
lea eax, [esp + 0x20]
push 2
shr ebx, 8
push eax
mov byte [esp + 0x29], bl
push dword [ebp + 0x18]
call fcn.0046f746
add esp, 0xc
mov dword [ebp + 0x18], eax
mov edx, dword [esp + 0x10]
xor ecx, ecx
mov ebx, ecx
mov dword [ebp], 4
mov edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
test dword [ebp + 0x10], 0x400
je 0x46e41e
push 0x10
pop eax
cmp edi, eax
jae 0x46e3d8
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
push 0x10
inc esi
add edi, 8
pop eax
mov dword [esp + 0x14], esi
cmp edi, eax
jb 0x46e3b3
mov eax, dword [ebp + 0x20]
mov dword [ebp + 0x40], ebx
test eax, eax
je 0x46e3e5
mov dword [eax + 0x14], ebx
test dword [ebp + 0x10], 0x200
je 0x46e40e
mov byte [esp + 0x20], bl
lea eax, [esp + 0x20]
push 2
shr ebx, 8
push eax
mov byte [esp + 0x29], bl
push dword [ebp + 0x18]
call fcn.0046f746
add esp, 0xc
mov dword [ebp + 0x18], eax
xor ecx, ecx
mov ebx, ecx
mov edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jmp 0x46e428
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e428
mov dword [eax + 0x10], ecx
mov edx, dword [esp + 0x10]
mov dword [ebp], 5
test dword [ebp + 0x10], 0x400
je 0x46e4c4
mov esi, dword [ebp + 0x40]
cmp esi, edx
cmova esi, edx
test esi, esi
je 0x46e4bb
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x46e48c
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x34], eax
test eax, eax
je 0x46e48c
mov edx, dword [ecx + 0x14]
sub edx, dword [ebp + 0x40]
mov ecx, dword [ecx + 0x18]
lea eax, [esi + edx]
cmp eax, ecx
jbe 0x46e472
sub ecx, edx
jmp 0x46e474
mov ecx, esi
mov eax, dword [esp + 0x34]
push ecx
push dword [esp + 0x18]
add eax, edx
push eax
call fcn.0046fa71
mov edx, dword [esp + 0x1c]
add esp, 0xc
test dword [ebp + 0x10], 0x200
je 0x46e4ac
push esi
push dword [esp + 0x18]
push dword [ebp + 0x18]
call fcn.0046f746
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebp + 0x18], eax
add dword [esp + 0x14], esi
sub edx, esi
sub dword [ebp + 0x40], esi
xor ecx, ecx
mov dword [esp + 0x10], edx
cmp dword [ebp + 0x40], ecx
jne 0x46f313
mov dword [ebp + 0x40], ecx
mov dword [ebp], 6
test dword [ebp + 0x10], 0x800
je 0x46e55e
test edx, edx
je 0x46f313
mov edi, dword [esp + 0x14]
mov esi, ecx
movzx eax, byte [esi + edi]
inc esi
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e516
mov edx, dword [eax + 0x1c]
test edx, edx
je 0x46e512
mov ecx, dword [ebp + 0x40]
cmp ecx, dword [eax + 0x20]
jae 0x46e512
mov eax, dword [esp + 0x34]
mov byte [edx + ecx], al
inc dword [ebp + 0x40]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x46e522
cmp esi, edx
jb 0x46e4e9
test dword [ebp + 0x10], 0x200
mov edi, dword [esp + 0x18]
je 0x46e54a
push esi
push dword [esp + 0x18]
push dword [ebp + 0x18]
call fcn.0046f746
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov dword [ebp + 0x18], eax
add dword [esp + 0x14], esi
sub edx, esi
mov dword [esp + 0x10], edx
test ecx, ecx
jne 0x46f313
jmp 0x46e568
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e568
mov dword [eax + 0x1c], ecx
mov dword [ebp + 0x40], ecx
mov dword [ebp], 7
test dword [ebp + 0x10], 0x1000
je 0x46e602
test edx, edx
je 0x46f313
mov edi, dword [esp + 0x14]
mov esi, ecx
movzx eax, byte [esi + edi]
inc esi
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e5ba
mov edx, dword [eax + 0x24]
test edx, edx
je 0x46e5b6
mov ecx, dword [ebp + 0x40]
cmp ecx, dword [eax + 0x28]
jae 0x46e5b6
mov eax, dword [esp + 0x34]
mov byte [edx + ecx], al
inc dword [ebp + 0x40]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x46e5c6
cmp esi, edx
jb 0x46e58d
test dword [ebp + 0x10], 0x200
mov edi, dword [esp + 0x18]
je 0x46e5ee
push esi
push dword [esp + 0x18]
push dword [ebp + 0x18]
call fcn.0046f746
mov ecx, dword [esp + 0x40]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov dword [ebp + 0x18], eax
add dword [esp + 0x14], esi
sub edx, esi
mov dword [esp + 0x10], edx
test ecx, ecx
jne 0x46f313
jmp 0x46e60c
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x46e60c
mov dword [eax + 0x24], ecx
mov esi, dword [esp + 0x40]
mov dword [ebp], 8
test dword [ebp + 0x10], 0x200
je 0x46e680
push 0x10
pop eax
cmp edi, eax
jae 0x46e65c
mov ecx, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [ecx]
dec edx
mov ecx, edi
mov dword [esp + 0x10], edx
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
push 0x10
inc ecx
mov dword [esp + 0x20], ebx
pop eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
cmp edi, eax
jb 0x46e62b
movzx eax, word [ebp + 0x18]
cmp ebx, eax
je 0x46e670
mov dword [ebp], 0x1d
jmp 0x46e17e
xor edx, edx
mov ebx, edx
mov edi, edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jmp 0x46e682
xor edx, edx
mov ecx, dword [ebp + 0x20]
test ecx, ecx
je 0x46e69f
mov eax, dword [ebp + 0x10]
sar eax, 9
and eax, 1
mov dword [ecx + 0x2c], eax
mov eax, dword [ebp + 0x20]
mov dword [eax + 0x30], 1
push edx
push edx
push edx
call fcn.0046f746
mov dword [ebp + 0x18], eax
add esp, 0xc
mov dword [esi + 0x30], eax
mov dword [ebp], 0xb
jmp 0x46e17a
cmp edi, 0x20
jae 0x46e6ec
mov ecx, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [ecx]
dec edx
mov ecx, edi
mov dword [esp + 0x10], edx
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp edi, 0x20
jb 0x46e6c5
mov ecx, ebx
mov edi, 0xff00
mov eax, ebx
and ecx, edi
shl eax, 0x10
add ecx, eax
mov eax, ebx
shr eax, 8
and eax, edi
shl ecx, 8
shr ebx, 0x18
add eax, ecx
add eax, ebx
xor ecx, ecx
mov dword [ebp + 0x18], eax
mov ebx, ecx
mov dword [esi + 0x30], eax
mov edi, ecx
mov dword [ebp], 0xa
cmp dword [ebp + 0xc], ecx
je 0x46f2e8
push ecx
push ecx
push ecx
call fcn.0046f82e
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebp + 0x18], eax
xor ecx, ecx
mov dword [esi + 0x30], eax
mov dword [ebp], 0xb
cmp dword [esp + 0x44], 5
je 0x46f313
cmp dword [esp + 0x44], 6
je 0x46f313
cmp dword [ebp + 4], ecx
je 0x46e77f
mov ecx, edi
mov dword [ebp], 0x1a
and ecx, 7
shr ebx, cl
sub edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jmp 0x46e17e
cmp edi, 3
jae 0x46e7ad
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
inc esi
add edi, 8
mov dword [esp + 0x14], esi
cmp edi, 3
jb 0x46e788
xor ecx, ecx
mov eax, ebx
shr ebx, 1
and eax, 1
mov dword [ebp + 4], eax
mov eax, ebx
and eax, 3
sub eax, ecx
je 0x46e80f
dec eax
je 0x46e7da
dec eax
je 0x46e7d2
dec eax
jne 0x46e816
mov dword [ebp], 0x1d
jmp 0x46e816
push 0x10
pop eax
mov dword [ebp], eax
jmp 0x46e816
cmp dword [esp + 0x44], 6
mov dword [ebp + 0x4c], 0x4dff18
mov dword [ebp + 0x54], 9
mov dword [ebp + 0x50], 0x4e0718
mov dword [ebp + 0x58], 5
mov dword [ebp], 0x13
jne 0x46e816
shr ebx, 2
sub edi, 3
jmp 0x46f313
mov dword [ebp], 0xd
shr ebx, 2
sub edi, 3
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jmp 0x46e180
mov ecx, edi
and ecx, 7
sub edi, ecx
shr ebx, cl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
cmp edi, 0x20
jae 0x46e86e
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
add edi, 8
mov dword [esp + 0x1c], ebx
inc esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
cmp edi, 0x20
jb 0x46e843
mov eax, ebx
mov ecx, ebx
not eax
and ecx, 0xffff
shr eax, 0x10
cmp ecx, eax
jne 0x46e664
mov dword [ebp + 0x40], ecx
xor ecx, ecx
cmp dword [esp + 0x44], 6
mov ebx, ecx
mov edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
mov dword [ebp], 0xe
je 0x46f313
mov dword [ebp], 0xf
mov esi, dword [ebp + 0x40]
test esi, esi
je 0x46e8fb
cmp esi, edx
cmova esi, edx
cmp esi, dword [esp + 0x28]
cmova esi, dword [esp + 0x28]
test esi, esi
je 0x46f313
push esi
push dword [esp + 0x18]
push dword [esp + 0x2c]
call fcn.0046fa71
mov edx, dword [esp + 0x1c]
add esp, 0xc
add dword [esp + 0x14], esi
sub edx, esi
sub dword [esp + 0x28], esi
add dword [esp + 0x24], esi
sub dword [ebp + 0x40], esi
mov dword [esp + 0x10], edx
jmp 0x46e17e
mov dword [ebp], 0xb
jmp 0x46e180
cmp edi, 0xe
jae 0x46e935
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
inc esi
add edi, 8
mov dword [esp + 0x14], esi
cmp edi, 0xe
jb 0x46e910
xor ecx, ecx
mov eax, ebx
sub edi, 0xe
push 0x1f
pop esi
and eax, esi
shr ebx, 5
add eax, 0x101
mov dword [esp + 0x18], edi
mov dword [ebp + 0x60], eax
mov eax, ebx
and eax, esi
shr ebx, 5
inc eax
mov dword [ebp + 0x64], eax
mov eax, ebx
and eax, 0xf
shr ebx, 4
add eax, 4
mov dword [esp + 0x1c], ebx
cmp dword [ebp + 0x60], 0x11e
mov dword [ebp + 0x5c], eax
ja 0x46e1ef
cmp dword [ebp + 0x64], 0x1e
ja 0x46e1ef
push 0x11
pop eax
mov dword [ebp + 0x68], ecx
mov dword [ebp], eax
jmp case.0x46e091.17
cmp edi, 3
jae 0x46e9b9
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
inc esi
add edi, 8
mov dword [esp + 0x14], esi
cmp edi, 3
jb 0x46e996
mov eax, dword [ebp + 0x68]
mov ecx, ebx
and ecx, 7
shr ebx, 3
mov dword [esp + 0x1c], ebx
movzx eax, word [eax*2 + 0x4e0798]
mov word [ebp + eax*2 + 0x70], cx
inc dword [ebp + 0x68]
sub edi, 3
mov dword [esp + 0x18], edi
mov eax, dword [ebp + 0x68]
cmp eax, dword [ebp + 0x5c]
jb 0x46e98d
jmp 0x46e9fe
mov eax, dword [ebp + 0x68]
xor ecx, ecx
movzx eax, word [eax*2 + 0x4e0798]
mov word [ebp + eax*2 + 0x70], cx
inc dword [ebp + 0x68]
cmp dword [ebp + 0x68], 0x13
jb 0x46e9e9
lea eax, [ebp + 0x530]
xor esi, esi
lea ecx, [ebp + 0x6c]
mov dword [ebp + 0x4c], eax
mov dword [ecx], eax
lea edx, [ebp + 0x54]
lea eax, [ebp + 0x2f0]
mov dword [edx], 7
push eax
push edx
push ecx
push 0x13
lea eax, [ebp + 0x70]
push eax
push esi
call fcn.004711bd
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
jne 0x46e173
mov dword [ebp + 0x68], esi
mov dword [ebp], 0x12
jmp case.0x46e091.18
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x46f317
mov edx, dword [esp + 0x14]
dec ecx
mov dword [esp + 0x10], ecx
mov ecx, edi
movzx eax, byte [edx]
shl eax, cl
add ebx, eax
inc edx
mov dword [esp + 0x14], edx
add edi, 8
mov ecx, dword [ebp + 0x54]
xor edx, edx
mov eax, dword [ebp + 0x4c]
inc edx
shl edx, cl
dec edx
and edx, ebx
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
mov dword [esp + 0x1c], eax
cmp ecx, edi
ja 0x46ea50
mov edx, eax
push 0x10
shr edx, 0x10
pop ecx
cmp dx, cx
jae 0x46eac3
shr eax, 8
movzx ecx, al
shr ebx, cl
sub edi, ecx
mov word [ebp + esi*2 + 0x70], dx
inc dword [ebp + 0x68]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jmp case.0x46e091.18
jne 0x46eb2e
mov ecx, eax
shr ecx, 8
movzx esi, cl
add esi, 2
jmp 0x46eaf7
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x46f317
dec ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x14]
movzx edx, byte [ecx]
mov ecx, edi
shl edx, cl
add ebx, edx
inc dword [esp + 0x14]
add edi, 8
cmp edi, esi
jb 0x46ead2
movzx ecx, ah
mov eax, dword [esp + 0x34]
sub edi, ecx
shr ebx, cl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
test eax, eax
je 0x46e173
movzx esi, word [ebp + eax*2 + 0x6e]
mov edx, ebx
and edx, 3
shr ebx, 2
add edx, 3
sub edi, 2
jmp 0x46ebe0
push 0x11
pop ecx
cmp word [esp + 0x1e], cx
movzx ecx, ah
jne 0x46eb89
lea edx, [ecx + 3]
mov dword [esp + 0x1c], ecx
cmp edi, edx
jae 0x46eb78
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x46f313
movzx eax, byte [ecx]
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp edi, edx
jb 0x46eb4e
mov ecx, dword [esp + 0x1c]
shr ebx, cl
mov edx, ebx
and edx, 7
add edx, 3
shr ebx, 3
push 0xfffffffffffffffd
jmp 0x46ebd5
lea edx, [ecx + 7]
mov dword [esp + 0x1c], ecx
cmp edi, edx
jae 0x46ebc6
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x46f313
movzx eax, byte [ecx]
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp edi, edx
jb 0x46eb9c
mov ecx, dword [esp + 0x1c]
shr ebx, cl
mov edx, ebx
and edx, 0x7f
add edx, 0xb
shr ebx, 7
push 0xfffffffffffffff9
pop eax
sub eax, ecx
xor esi, esi
add edi, eax
mov eax, dword [esp + 0x34]
mov ecx, dword [ebp + 0x64]
add eax, edx
add ecx, dword [ebp + 0x60]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
cmp eax, ecx
ja 0x46ec1d
test edx, edx
je case.0x46e091.18
mov eax, dword [ebp + 0x68]
mov word [ebp + eax*2 + 0x70], si
inc dword [ebp + 0x68]
dec edx
jne 0x46ebf8
mov eax, dword [ebp + 0x64]
add eax, dword [ebp + 0x60]
mov esi, dword [ebp + 0x68]
mov dword [esp + 0x34], esi
cmp esi, eax
jb 0x46ea76
jmp 0x46ec24
mov dword [ebp], 0x1d
xor ecx, ecx
cmp dword [ebp], 0x1d
je 0x46e135
cmp word [ebp + 0x270], cx
jne 0x46ec45
mov dword [ebp], 0x1d
jmp 0x46e135
lea eax, [ebp + 0x530]
lea esi, [ebp + 0x6c]
mov dword [ebp + 0x4c], eax
mov dword [esi], eax
lea ecx, [ebp + 0x54]
lea eax, [ebp + 0x2f0]
mov dword [ecx], 9
push eax
push ecx
push esi
push dword [ebp + 0x60]
lea eax, [ebp + 0x70]
push eax
push 1
call fcn.004711bd
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
jne 0x46e173
mov eax, dword [esi]
lea ecx, [ebp + 0x58]
mov dword [ebp + 0x50], eax
lea eax, [ebp + 0x2f0]
push eax
mov eax, dword [ebp + 0x60]
push ecx
push esi
push dword [ebp + 0x64]
lea eax, [eax*2 + 0x70]
mov dword [ecx], 6
add eax, ebp
push eax
push 2
call fcn.004711bd
add esp, 0x18
mov dword [esp + 0x30], eax
test eax, eax
jne 0x46e173
cmp dword [esp + 0x44], 6
mov dword [ebp], 0x13
je 0x46f313
mov esi, dword [esp + 0x40]
xor ecx, ecx
mov edx, dword [esp + 0x10]
mov dword [ebp], 0x14
cmp edx, 6
jb 0x46ed56
mov eax, dword [esp + 0x28]
cmp eax, 0x102
jb 0x46ed56
push dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 0xc], ecx
mov dword [esi], eax
mov dword [esi + 4], edx
push esi
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], edi
call fcn.004715e6
cmp dword [ebp], 0xb
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 4]
mov ebx, dword [ebp + 0x38]
mov edi, dword [ebp + 0x3c]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x10]
pop ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esi]
pop ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
jne 0x46e17e
or dword [ebp + 0x1bc4], 0xffffffff
jmp 0x46e17e
mov edx, dword [ebp + 0x4c]
xor eax, eax
mov dword [ebp + 0x1bc4], ecx
inc eax
mov ecx, dword [ebp + 0x54]
shl eax, cl
dec eax
and eax, ebx
mov eax, dword [edx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, edi
jbe 0x46edc4
mov esi, dword [esp + 0x10]
test esi, esi
je 0x46f313
mov edx, dword [esp + 0x14]
mov ecx, edi
dec esi
add edi, 8
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edi
movzx eax, byte [edx]
shl eax, cl
mov ecx, dword [ebp + 0x54]
add ebx, eax
mov eax, dword [ebp + 0x4c]
inc edx
mov dword [esp + 0x14], edx
xor edx, edx
inc edx
mov dword [esp + 0x1c], ebx
shl edx, cl
dec edx
and edx, ebx
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, edi
ja 0x46ed7d
test al, al
je 0x46ee83
test al, 0xf0
jne 0x46ee83
xor edi, edi
movzx ecx, al
mov ebx, eax
inc edi
shr ebx, 8
mov edx, eax
movzx esi, bl
add ecx, esi
shr eax, 0x10
shl edi, cl
mov ecx, esi
dec edi
mov dword [esp + 0x34], edx
and edi, dword [esp + 0x1c]
shr edi, cl
mov ecx, dword [ebp + 0x4c]
add edi, eax
mov eax, dword [ecx + edi*4]
mov ecx, eax
mov edi, dword [esp + 0x18]
shr ecx, 8
movzx esi, cl
movzx ecx, bl
mov ebx, dword [esp + 0x1c]
add esi, ecx
cmp esi, edi
jbe 0x46ee76
mov esi, dword [esp + 0x10]
test esi, esi
je 0x46f313
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
add edi, 8
mov esi, dword [esp + 0x14]
mov dword [esp + 0x18], edi
movzx edi, dh
movzx eax, byte [esi]
shl eax, cl
add ebx, eax
movzx ecx, dl
movzx eax, word [esp + 0x36]
inc esi
mov dword [esp + 0x14], esi
add ecx, edi
xor esi, esi
inc esi
shl esi, cl
mov ecx, edi
dec esi
and esi, ebx
shr esi, cl
add esi, eax
mov eax, dword [ebp + 0x4c]
mov eax, dword [eax + esi*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add ecx, edi
mov edi, dword [esp + 0x18]
cmp ecx, edi
ja 0x46ee19
movzx ecx, dh
shr ebx, cl
sub edi, ecx
mov dword [ebp + 0x1bc4], ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add dword [ebp + 0x1bc4], ecx
sub edi, ecx
shr ebx, cl
mov ecx, eax
shr ecx, 0x10
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
mov dword [ebp + 0x40], ecx
test al, al
jne 0x46eeb5
mov dword [ebp], 0x19
jmp 0x46e17a
test al, 0x20
je 0x46eec5
or dword [ebp + 0x1bc4], 0xffffffff
jmp 0x46e6b0
test al, 0x40
jne 0x46e173
movzx eax, al
and eax, 0xf
mov dword [ebp], 0x15
mov dword [ebp + 0x48], eax
mov edx, dword [ebp + 0x48]
test edx, edx
je 0x46ef35
cmp edi, edx
jae 0x46ef16
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x46f313
movzx eax, byte [ecx]
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp edi, edx
jb 0x46eef0
xor eax, eax
mov ecx, edx
inc eax
sub edi, edx
shl eax, cl
dec eax
mov dword [esp + 0x18], edi
and eax, ebx
shr ebx, cl
add dword [ebp + 0x40], eax
add dword [ebp + 0x1bc4], edx
mov dword [esp + 0x1c], ebx
mov eax, dword [ebp + 0x40]
mov dword [ebp + 0x1bc8], eax
mov dword [ebp], 0x16
mov ecx, dword [ebp + 0x58]
xor eax, eax
mov edx, dword [ebp + 0x50]
inc eax
shl eax, cl
dec eax
and eax, ebx
mov eax, dword [edx + eax*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, edi
jbe 0x46efad
mov esi, dword [esp + 0x10]
test esi, esi
je 0x46f313
mov edx, dword [esp + 0x14]
mov ecx, edi
dec esi
add edi, 8
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edi
movzx eax, byte [edx]
shl eax, cl
mov ecx, dword [ebp + 0x58]
add ebx, eax
mov eax, dword [ebp + 0x50]
inc edx
mov dword [esp + 0x14], edx
xor edx, edx
inc edx
mov dword [esp + 0x1c], ebx
shl edx, cl
dec edx
and edx, ebx
mov eax, dword [eax + edx*4]
mov ecx, eax
shr ecx, 8
movzx ecx, cl
cmp ecx, edi
ja 0x46ef66
test al, 0xf0
jne 0x46f064
xor edi, edi
movzx ecx, al
mov ebx, eax
inc edi
shr ebx, 8
mov edx, eax
movzx esi, bl
add ecx, esi
shr eax, 0x10
shl edi, cl
mov ecx, esi
dec edi
mov dword [esp + 0x34], edx
and edi, dword [esp + 0x1c]
shr edi, cl
mov ecx, dword [ebp + 0x50]
add edi, eax
mov eax, dword [ecx + edi*4]
mov ecx, eax
mov edi, dword [esp + 0x18]
shr ecx, 8
movzx esi, cl
movzx ecx, bl
mov ebx, dword [esp + 0x1c]
add esi, ecx
cmp esi, edi
jbe 0x46f057
mov esi, dword [esp + 0x10]
test esi, esi
je 0x46f313
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
add edi, 8
mov esi, dword [esp + 0x14]
mov dword [esp + 0x18], edi
movzx edi, dh
movzx eax, byte [esi]
shl eax, cl
add ebx, eax
movzx ecx, dl
movzx eax, word [esp + 0x36]
inc esi
mov dword [esp + 0x14], esi
add ecx, edi
xor esi, esi
inc esi
shl esi, cl
mov ecx, edi
dec esi
and esi, ebx
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
mov edi, dword [esp + 0x18]
cmp ecx, edi
ja 0x46effa
movzx ecx, dh
shr ebx, cl
sub edi, ecx
add dword [ebp + 0x1bc4], ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
add dword [ebp + 0x1bc4], ecx
sub edi, ecx
shr ebx, cl
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
test al, 0x40
jne 0x46e173
mov ecx, eax
mov dword [ebp], 0x17
shr ecx, 0x10
movzx eax, al
and eax, 0xf
mov dword [ebp + 0x44], ecx
mov dword [ebp + 0x48], eax
mov edx, dword [ebp + 0x48]
test edx, edx
je 0x46f0f6
cmp edi, edx
jae 0x46f0d7
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
test esi, esi
je 0x46f313
movzx eax, byte [ecx]
dec esi
mov ecx, edi
mov dword [esp + 0x10], esi
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x14], ecx
cmp edi, edx
jb 0x46f0b1
xor eax, eax
mov ecx, edx
inc eax
sub edi, edx
shl eax, cl
dec eax
mov dword [esp + 0x18], edi
and eax, ebx
shr ebx, cl
add dword [ebp + 0x44], eax
add dword [ebp + 0x1bc4], edx
mov dword [esp + 0x1c], ebx
mov edx, dword [esp + 0x10]
mov dword [ebp], 0x18
mov esi, dword [esp + 0x28]
test esi, esi
je 0x46f313
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0x44]
sub eax, esi
cmp ecx, eax
jbe 0x46f14e
sub ecx, eax
cmp ecx, dword [ebp + 0x2c]
jbe 0x46f12e
cmp dword [ebp + 0x1bc0], 0
jne 0x46e664
mov edx, dword [ebp + 0x34]
cmp ecx, dword [ebp + 0x30]
jbe 0x46f140
sub ecx, dword [ebp + 0x30]
add edx, dword [ebp + 0x28]
sub edx, ecx
jmp 0x46f145
sub edx, ecx
add edx, dword [ebp + 0x30]
mov eax, dword [ebp + 0x40]
cmp ecx, eax
jbe 0x46f159
jmp 0x46f157
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 0x40]
sub edx, ecx
mov ecx, eax
cmp ecx, esi
cmova ecx, esi
sub esi, ecx
sub eax, ecx
mov dword [esp + 0x28], esi
mov esi, dword [esp + 0x24]
sub edx, esi
mov dword [ebp + 0x40], eax
mov al, byte [edx + esi]
mov byte [esi], al
inc esi
dec ecx
jne 0x46f16f
mov edx, dword [esp + 0x10]
mov dword [esp + 0x24], esi
cmp dword [ebp + 0x40], ecx
jne 0x46e180
mov dword [ebp], 0x14
jmp 0x46e180
mov esi, dword [esp + 0x28]
test esi, esi
je 0x46f313
mov edx, dword [esp + 0x24]
mov al, byte [ebp + 0x40]
inc dword [esp + 0x24]
dec esi
mov dword [esp + 0x28], esi
mov byte [edx], al
mov dword [ebp], 0x14
jmp 0x46e135
cmp dword [ebp + 8], ecx
je 0x46f28c
cmp edi, 0x20
jae 0x46f202
mov ecx, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [ecx]
dec edx
mov ecx, edi
mov dword [esp + 0x10], edx
shl eax, cl
add edi, 8
mov ecx, dword [esp + 0x14]
add ebx, eax
inc ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edi
cmp edi, 0x20
jb 0x46f1d1
xor ecx, ecx
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x28]
add dword [esi + 0x14], eax
add dword [ebp + 0x1c], eax
mov dword [esp + 0x2c], eax
test eax, eax
je 0x46f243
push eax
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x30]
push eax
push dword [ebp + 0x18]
cmp dword [ebp + 0x10], ecx
je 0x46f231
call fcn.0046f746
jmp 0x46f236
call fcn.0046f82e
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [ebp + 0x18], eax
mov dword [esi + 0x30], eax
mov eax, dword [esp + 0x28]
mov esi, 0xff00
mov dword [esp + 0x2c], eax
mov ecx, ebx
and ecx, esi
mov eax, ebx
shl eax, 0x10
add ecx, eax
mov eax, ebx
shr eax, 8
shl ecx, 8
and eax, esi
add ecx, eax
mov eax, ebx
shr eax, 0x18
add ecx, eax
cmp dword [ebp + 0x10], 0
cmovne ecx, ebx
cmp ecx, dword [ebp + 0x18]
jne 0x46e664
xor ecx, ecx
mov ebx, ecx
mov edi, ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edi
mov dword [ebp], 0x1b
cmp dword [ebp + 8], ecx
je 0x46f2dc
cmp dword [ebp + 0x10], ecx
je 0x46f2dc
cmp edi, 0x20
jae 0x46f2cf
mov esi, dword [esp + 0x14]
test edx, edx
je 0x46f313
movzx eax, byte [esi]
mov ecx, edi
shl eax, cl
dec edx
add ebx, eax
mov dword [esp + 0x10], edx
add edi, 8
mov dword [esp + 0x1c], ebx
inc esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], esi
cmp edi, 0x20
jb 0x46f2a6
xor ecx, ecx
cmp ebx, dword [ebp + 0x1c]
jne 0x46e1ef
mov ebx, ecx
mov edi, ecx
mov dword [ebp], 0x1c
xor eax, eax
inc eax
jmp 0x46f30f
mov eax, dword [esp + 0x24]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x14]
mov dword [esi], eax
mov dword [esi + 4], edx
mov dword [ebp + 0x38], ebx
mov dword [ebp + 0x3c], edi
push 2
jmp 0x46f420
push 0xfffffffffffffffd
pop eax
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x10]
mov esi, dword [esp + 0x40]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x28]
mov dword [esi], edx
xor edx, edx
mov dword [esi + 0x10], eax
mov dword [esi + 4], ecx
mov dword [ebp + 0x38], ebx
mov ebx, dword [esp + 0x2c]
mov dword [ebp + 0x3c], edi
cmp dword [ebp + 0x28], edx
jne 0x46f35b
cmp ebx, dword [esi + 0x10]
je 0x46f381
cmp dword [ebp], 0x1d
jge 0x46f381
cmp dword [ebp], 0x1a
jl 0x46f35b
cmp dword [esp + 0x44], 4
je 0x46f381
mov eax, ebx
sub eax, dword [esi + 0x10]
push eax
push dword [esi + 0xc]
push esi
call fcn.0046f665
add esp, 0xc
test eax, eax
je 0x46f37f
mov dword [ebp], 0x1e
push 0xfffffffffffffffc
jmp 0x46f420
xor edx, edx
mov edi, dword [esp + 0x38]
sub edi, dword [esi + 4]
sub ebx, dword [esi + 0x10]
add dword [esi + 8], edi
add dword [esi + 0x14], ebx
add dword [ebp + 0x1c], ebx
cmp dword [ebp + 8], edx
je 0x46f3c3
test ebx, ebx
je 0x46f3c3
mov eax, dword [esi + 0xc]
push ebx
sub eax, ebx
push eax
push dword [ebp + 0x18]
cmp dword [ebp + 0x10], edx
je 0x46f3b3
call fcn.0046f746
jmp 0x46f3b8
call fcn.0046f82e
add esp, 0xc
mov dword [ebp + 0x18], eax
mov dword [esi + 0x30], eax
xor edx, edx
cmp dword [ebp], 0x13
je 0x46f3cf
cmp dword [ebp], 0xe
jne 0x46f3d4
mov edx, 0x100
mov ecx, dword [ebp + 4]
neg ecx
mov dword [esp + 0x40], 0x80
sbb ecx, ecx
xor eax, eax
and ecx, 0x40
cmp dword [ebp], 0xb
cmove eax, dword [esp + 0x40]
add ecx, edx
add eax, ecx
add eax, dword [ebp + 0x3c]
mov dword [esi + 0x2c], eax
test edi, edi
jne 0x46f403
test ebx, ebx
je 0x46f40a
cmp dword [esp + 0x44], 4
jne 0x46f418
mov eax, dword [esp + 0x30]
test eax, eax
push 0xfffffffffffffffb
pop ecx
cmove eax, ecx
jmp 0x46f421
mov eax, dword [esp + 0x30]
jmp 0x46f421
push 0xfffffffffffffffe
pop eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret